When the power state of ALC283 codec goes to D3, it gives a noise via
headphone output. This is because the driver tries to clear all pins
via snd_hda_shutup_pins(). Setting the mic pin to zero triggers such
a noise.
Define a new shutup call specific to this codec and control the pins
there more precisely. Also, add the power-save enable/disable
sequences in the resume and the new shutup calls.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of calling snd_hda_shutup_pins() unconditionally, allow it be
called in spec->shutup callback. In this way, we can avoid calling
this function if it causes a problem like we see in the next patch
following this.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The usage of strict_strto*() is not preferred, because
strict_strto*() is obsolete. Thus, kstrto*() should be
used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
snd_hda_jack_detect() function returns a boolean value for a jack
plugged in or not, but it also returns always true when the
corresponding pin is phantom (i.e. fixed). This is OK in most cases,
but it makes the generic parser misbehaving about the auto-mute or
auto-mic switching, e.g. when one of headphone pins is a fixed.
Namely, the driver decides whether to mute the speaker or not, just
depending on the headphone plug state: if one of the headphone jacks
is seen as active, then the speaker is muted. Thus this will result
always in the muted speaker output.
So, the problem is the function returns a boolean, after all, although
we need to think of "phantom" jack. Now a new function,
snd_hda_jack_detect_state() is introduced to return these tristates.
The generic parser uses this function for checking the headphone or
mic jack states.
Meanwhile, the behavior of snd_hda_jack_detect() is kept as is, for
keeping compatibility in other driver codes.
Acked-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The quirk for Dell laptops with STAC9228 overrides the pin default
config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit
on. I'm not quite sure why this was done so, but can guess that this
was introduced for avoiding this to be muted by another headphone
plug. Now, after transition to the generic parser, this workaround
rather causes a problem (notably as unexpected speaker mutes) because
the pin is seen as if it's always plugged in.
Since the generic parser can handle multiple headphone plugging
gracefully, we can get rid of this override now.
Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The EAPD GPIO is dynamically turned on/off for some machines with
Sigmatel codecs, but this didn't work as expected, and it resulted in
spontaneous lost of speaker outputs per HP plugging or power-saving.
This patch fixes the bug by simply including spec->eapd_mask into
spec->gpio_mask and spec->gpio_data bits.
Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This Conexant codec has a single jack that can be used as either
headphone or mic (but not headset). The existing hp_mic functionality
does not apply here, because the mic and the HP are on separate pins.
Hence make a lighter version of what has been earlier done for Realtek
codecs.
BugLink: https://bugs.launchpad.net/bugs/1198030
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vendor ID 0x10de0060 is used by a yet-to-be-named GPU chip.
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pull drm updates from Dave Airlie:
"Okay this is the big one, I was stalled on the fbdev pull req as I
stupidly let fbdev guys merge a patch I required to fix a warning with
some patches I had, they ended up merging the patch from the wrong
place, but the warning should be fixed. In future I'll just take the
patch myself!
Outside drm:
There are some snd changes for the HDMI audio interactions on haswell,
they've been acked for inclusion via my tree. This relies on the
wound/wait tree from Ingo which is already merged.
Major changes:
AMD finally released the dynamic power management code for all their
GPUs from r600->present day, this is great, off by default for now but
also a huge amount of code, in fact it is most of this pull request.
Since it landed there has been a lot of community testing and Alex has
sent a lot of fixes for any bugs found so far. I suspect radeon might
now be the biggest kernel driver ever :-P p.s. radeon.dpm=1 to enable
dynamic powermanagement for anyone.
New drivers:
Renesas r-car display unit.
Other highlights:
- core: GEM CMA prime support, use new w/w mutexs for TTM
reservations, cursor hotspot, doc updates
- dvo chips: chrontel 7010B support
- i915: Haswell (fbc, ips, vecs, watermarks, audio powerwell),
Valleyview (enabled by default, rc6), lots of pll reworking, 30bpp
support (this time for sure)
- nouveau: async buffer object deletion, context/register init
updates, kernel vp2 engine support, GF117 support, GK110 accel
support (with external nvidia ucode), context cleanups.
- exynos: memory leak fixes, Add S3C64XX SoC series support, device
tree updates, common clock framework support,
- qxl: cursor hotspot support, multi-monitor support, suspend/resume
support
- mgag200: hw cursor support, g200 mode limiting
- shmobile: prime support
- tegra: fixes mostly
I've been banging on this quite a lot due to the size of it, and it
seems to okay on everything I've tested it on."
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (811 commits)
drm/radeon/dpm: implement vblank_too_short callback for si
drm/radeon/dpm: implement vblank_too_short callback for cayman
drm/radeon/dpm: implement vblank_too_short callback for btc
drm/radeon/dpm: implement vblank_too_short callback for evergreen
drm/radeon/dpm: implement vblank_too_short callback for 7xx
drm/radeon/dpm: add checks against vblank time
drm/radeon/dpm: add helper to calculate vblank time
drm/radeon: remove stray line in old pm code
drm/radeon/dpm: fix display_gap programming on rv7xx
drm/nvc0/gr: fix gpc firmware regression
drm/nouveau: fix minor thinko causing bo moves to not be async on kepler
drm/radeon/dpm: implement force performance level for TN
drm/radeon/dpm: implement force performance level for ON/LN
drm/radeon/dpm: implement force performance level for SI
drm/radeon/dpm: implement force performance level for cayman
drm/radeon/dpm: implement force performance levels for 7xx/eg/btc
drm/radeon/dpm: add infrastructure to force performance levels
drm/radeon: fix surface setup on r1xx
drm/radeon: add support for 3d perf states on older asics
drm/radeon: set default clocks for SI when DPM is disabled
...
ALC5505 DSP is enabled even though we don't use the features yet at
all. This results in the unnecessarily high power consumption, more
than 100mV higher. Until we implement the DSP support, better to
bypass DSP for saving more power.
Reported-by: Mengdong Lin <mengdong.lin@intel.com>
[Patch modified by Mengdong to cal alc5505_dsp_init() with extra
acl5505_dsp_halt().]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Finally all the static quirks in patch_analog.c are reduced by this
patch. As machines with AD1986A codec are all old and often their
BIOS are buggy, we need to keep at least a few static pin conifgs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pull trivial tree updates from Jiri Kosina:
"The usual stuff from trivial tree"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
treewide: relase -> release
Documentation/cgroups/memory.txt: fix stat file documentation
sysctl/net.txt: delete reference to obsolete 2.4.x kernel
spinlock_api_smp.h: fix preprocessor comments
treewide: Fix typo in printk
doc: device tree: clarify stuff in usage-model.txt.
open firmware: "/aliasas" -> "/aliases"
md: bcache: Fixed a typo with the word 'arithmetic'
irq/generic-chip: fix a few kernel-doc entries
frv: Convert use of typedef ctl_table to struct ctl_table
sgi: xpc: Convert use of typedef ctl_table to struct ctl_table
doc: clk: Fix incorrect wording
Documentation/arm/IXP4xx fix a typo
Documentation/networking/ieee802154 fix a typo
Documentation/DocBook/media/v4l fix a typo
Documentation/video4linux/si476x.txt fix a typo
Documentation/virtual/kvm/api.txt fix a typo
Documentation/early-userspace/README fix a typo
Documentation/video4linux/soc-camera.txt fix a typo
lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment
...
BIOS on Samsung R55, M55 and M50 provide the proper pin-configs,
so we can remove the corresponding static quirk entries gracefully.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For removing static quirks for AD1988 variants, a new fixup defining
the 6stack pinconfig has been added for the buggy BIOS. Other than
that, we can cut off straightforwardly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since the necessary device-specific fixups for Thinkpad and HP devices
have been already ported, we can remove all static quirks for AD1884,
AD1984, AD1884A and AD1984A codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now the generic parser can work stably enough, we can get rid of the
static quirks. Let's start from AD1882.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The AD1884 HP laptop/mobile quirks control GPIO1 bit as the primary
mute as well. Add the similar control to ad1884 fixup for auto
parser, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ad1884_fixup_hp_eapd() tries to set the NID for controlling the
speaker EAPD from the pin configuration. But the current code can't
work expectedly since it sets spec->eapd_nid before calling the
generic parser where the autocfg pins are set up.
This patch changes the function to set spec->eapd_nid after the
generic parser call while it sets vmaster hook unconditionally. The
spec->eapd_nid check is moved in the hook function itself instead.
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The char arrays with size 44 are for the name string of
snd_ctl_elem_id. Define the constant and replace the raw numbers with
it for clarifying better.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
add_control_with_pfx() in hda_generic.c assumes a shorter name string
for the control element, and this resulted in the truncation of the
long but valid string like "Headphone Surround Switch" in the middle.
This patch aligns the max size to the actual limit of snd_ctl_elem_id,
44.
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add two more machines that need quirks for headset mics to work.
Tested-by: Shawn Wang <shawn.wang@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1195636
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This quirk is needed for the headset mic to work on this Dell
machine.
BugLink: https://bugs.launchpad.net/bugs/1195597
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the power-saving control for ALC5505 DSP on some
Realtek codecs.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Tested-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Last 3.11 feature pull. I have a few odds bits and pieces and fixes in my
queue, I'll sort them out later on to see what's for 3.11-fixes and what's
for 3.12. But nothing to hold this here up imo.
Highlights:
- more hangcheck work from Mika and Chris to prepare for arb robustness
- trickle feed fixes from Ville
- first parts of the shared pch pll rework, with some basic hw state
readout and cross-checking (this shuts up the confused pch pll refcount
WARN that Linus just recently forwarded)
- Haswell audio power well support from Wang Xingchao (alsa bits acked by
Takashi)
- some cleanups and asserts sprinkling around the plane/gamma enabling
sequence from Ville
- more gtt refactoring from Ben
- clear up the adjusted->mode vs. pixel clock vs. port clock confusion
- 30bpp support, this time for real hopefully
* tag 'drm-intel-next-2013-06-18' of git://people.freedesktop.org/~danvet/drm-intel: (97 commits)
drm/i915: remove a superflous semi-colon
drm/i915: Kill useless "Enable panel fitter" comments
drm/i915: Remove extra "ring" from error message
drm/i915: simplify the reduced clock handling for pch plls
drm/i915: stop killing pfit on i9xx
drm/i915: explicitly set up PIPECONF (and gamma table) on haswell
drm/i915: set up PIPECONF explicitly for i9xx/vlv platforms
drm/i915: set up PIPECONF explicitly on ilk-ivb
drm/i915: find guilty batch buffer on ring resets
drm/i915: store ring hangcheck action
drm/i915: add batch bo to i915_add_request()
drm/i915: change i915_add_request to macro
drm/i915: add i915_gem_context_get_hang_stats()
drm/i915: add struct i915_ctx_hang_stats
drm/i915: Try harder to disable trickle feed on VLV
drm/i915: fix up pch pll enabling for pixel multipliers
drm/i915: hw state readout and cross-checking for shared dplls
drm/i915: WARN on lack of shared dpll
drm/i915: split up intel_modeset_check_state
drm/i915: extract readout_hw_state from setup_hw_state
...
Conflicts:
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/i915/intel_sdvo.c
As some of ALC269 quirks use the inverted dmic feature, we need to
call alc_inv_dmic_sync() in the resume callback like in alc_resume(),
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The stac_resume() is exactly what the default resume code does, so
we don't have to define and use it doubly. Let's cut it off.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Hdmi driver may not receive intrinsic event from gfx side when
it's in runtime suspend mode. There's no ELD info when exit from
runtime suspend. This patch avoid missing ELD info.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch is a cleanup to the previous patch "reset hda link during system/
runtime suspend".
In this patch
- azx_enter_link_reset() and azx_exit_link_reset() are defined for entering and
exiting the link reset respectively. azx_link_reset() is no longer used and
replaced by azx_enter_link_reset().
- azx_reset() reuses the above two new functions for a link reset cycle
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pin's connection list may change dynamically with hot-plug event
on Intel Haswell chip. Users would see connections be "0" in codec#.
when play audio on this pin, software driver choose converter from cache
connections. So add "In-driver connection" info to avoid confuse when
raw connections are different with cache connection.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've got bug report wrt many machines with VT1708 (e.g. IBM POS
machines) showing the broken auto-mute behavior. It turned out that
the problem is that the pin control values of the speaker and line-out
pins are completely ignored. As a workaround, let's use the newly
introduced feature of the generic parser, to control the mute via amp
on pins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new flag, auto_mute_via_amp, to determine the behavior of the
headphone / line-out auto-mute. When this flag is set, the generic
driver mutes the speaker and line outputs via the amp mute of each
pin, instead of changing the pin control values.
This is introduced for devices that don't work expectedly with the pin
control values; for example, some devices are known to keep enabling
the speaker outputs no matter which pin control values are set on the
speaker pins.
The driver doesn't check actually whether the pins have the output amp
caps, but assumes that the proper mixer (mute) controls are created on
all these pins. If not the case, you can't use this flag for your
device.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If all the codecs report ClkStopOK (OK to stop bus clock) after being put to
D3, this patch will reset the HDA link before the controller is put to D3.
So the link will be in reset during system or runtime suspend, the bus clock
stops and the codecs are in D3(ClkStop) state.
This may help to reduce power consumption by dozens of mW on some peripheral
hda codecs.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Like the X220, this quirk was added to support docking station,
so enable the fixup instead.
According to Jan, the generic parser works equal or better
than the current parser. This was tested under a 3.9 kernel.
Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some VIA codecs like VT1708S have Mic boost amps in the mic pins but
they aren't exposed in the capability bits. In the past driver code,
we override the pin caps and create mic boost controls forcibly.
While transition to the generic parser, we lost the mic boost controls
although the pin caps are still overridden, because the generic parser
code checks the widget caps, too.
So this patch adds a new helper function to allow the override of the
given widget capability bits, and makes VIA codecs driver to add the
missing input-amp capability bit.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59861
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For Intel Haswell HDMI codecs, the pins choose converter 0 by default.
This would cause conflict when playing audio on unused pins,the pin with
physical device connected would get audio data too.
i.e. Pin 0/1/2 default choose converter 0, pin 1 has HDMI monitor connected.
when play audio on Pin 0 or pin 2, pin 1 could get audio data too.
This patch configure unused pins to choose different converter.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a selection to a converter MUX is changed in hdmi_pcm_open(), it
should be cached so that the given connection can be restored properly
at PM resume. We need just to replace the corresponding
snd_hda_codec_write() call with snd_hda_codec_write_cache().
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Haswell converters maybe in wrong power state before usage.
i.e. only converter 0 is in D0, converter 1/2 are in D3.
When pin choose converter 1/2, there's no audio output, this
cause dependency when playing differnt stream on pins.
AUD_PWRST ConvertorA_Widget_Power_State_Current D0
AUD_PWRST ConvertorA_Widget_Power_State_Requsted D0
AUD_PWRST ConvertorB_Widget_Power_State_Current D3
AUD_PWRST ConvertorB_Widget_Power_State_Requested D3
AUD_PWRST ConvC_Widget_PwrSt_Curr D3
AUD_PWRST ConvC_Widget_PwrSt_Req D3
This patch check converter's power state and set D0 if it's in D3 mode.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The refactoring by commit 9040d102 introduced the new function
snd_hda_check_power_state(). This function is supposed to return true
if the state already reached to the target state, but it actually
returns false for that. An utterly stupid typo while copy & paste.
Fortunately this didn't influence on much behavior because powering up
AFG usually powers up the child widgets, too. But the finer power
control must have been broken by this bug.
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These headset jacks keep coming in on more and more platforms, and
it's possible I don't catch them all. Make it easier to test and
verify by making models.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* for-linus: (635 commits)
ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
ALSA: hda - Fix pin configurations for MacBook Air 4,2
ALSA: usb-audio: work around Android accessory firmware bug
ALSA: hda - Headset mic support for three more machines
Linux 3.10-rc6
smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
powerpc: Fix missing/delayed calls to irq_work
powerpc: Fix emulation of illegal instructions on PowerNV platform
powerpc: Fix stack overflow crash in resume_kernel when ftracing
snd_pcm_link(): fix a leak...
use can_lookup() instead of direct checks of ->i_op->lookup
move exit_task_namespaces() outside of exit_notify()
fput: task_work_add() can fail if the caller has passed exit_task_work()
xfs: don't shutdown log recovery on validation errors
xfs: ensure btree root split sets blkno correctly
xfs: fix implicit padding in directory and attr CRC formats
xfs: don't emit v5 superblock warnings on write
mei: me: clear interrupts on the resume path
mei: nfc: fix nfc device freeing
mei: init: Flush scheduled work before resetting the device
...
MacBook Air 4,2 requires the whole default pin configuration table to
be overridden by the driver, as usual, as Apple's machines don't set
up properly after boot. Otherwise mic won't work, and other ill
effect may happen.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59381
Reported-and-tested-by: Peter John Hartman <peterjohnhartman@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
They need these quirks to have headset mic support.
BugLink: https://bugs.launchpad.net/bugs/1189363
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For Intel Haswell chip, HDA controller and codec have
power well dependency from GPU side. This patch added support
to request/release power well in audio driver. Power save
feature should be enabled to get runtime power saving.
There's deadlock when request_module(i915) in azx_probe.
It looks like:
device_lock(audio pci device) -> azx_probe -> module_request
(or symbol_request) -> modprobe (userspace) -> i915 init ->
drm_pci_init -> pci_register_driver -> bus_add_driver -> driver_attach ->
which in turn tries all locks on pci bus, and when it tries the one on the
audio device, it will deadlock.
This patch introduce a work to store remaining probe stuff, and let
request_module run in safe work context.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This is a preliminary work for the upcoming Haswell HDMI audio fixes.
azx_first_init() function can be safely called after the f/w loader,
since the f/w loader doesn't require the sound hardware initialization
beforehand. Moving it into azx_probe_continue() cleans up the code
flow a bit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The device can support runtime PM no matter whether it support
signal wakeup or not. For some chips like Haswell which doesnot
support PME by default, this patch let haswell Display HD-A controller
enter runtime suspend, and bring more power saving whith power-well
feature enabled.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
When a codec is powered off, some systems don't respond properly after
D3 FG transition, while the driver still expects the response and
tries to fall back to different modes (polling and single-cmd). When
the fallback happens, the driver stays in that mode, and falling back
to the single-cmd mode means it'll loose the unsol event handling,
too.
The unresponsiveness at D3 isn't too serious, thus this fallback is
mostly superfluous. We can gracefully ignore the error there so that
the driver keeps the normal operation mode.
This patch adds a new bit flag for codec read/write, set in the power
transition stage, which is notified to the controller driver via a new
bus->no_response_fallback flag.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
snd_hda_codec_read(), snd_hda_codec_write() & co take the argument
"direct" that indicates whether the given NID is a direct reference or
an indirect reference. However, the indirect reference is practically
unimplemented and never exists. And moreover, we don't need the
indication of indirect reference at this high level, as NID can be
represented in 16bit values at this point.
Meanwhile, there are some cases where it'd be nice to give some
operational options to these functions. So, we can reuse this
argument as a new bit flag! Pretty frugal, eh?
All callers so far pass zero to this argument, thus there is no
behavior change by this replacement.
The real usage of this new bit option will be added in the following
patches.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently HDMI codec driver sets the hard dependency (reverse
selection) on CONFIG_SND_DYNAMIC_MINORS because the recent codecs may
support more than two PCMs. But, this doesn't mean that we need
always this option, since there can be a single PCM stream even with
the modern codecs.
This patch drops the hard dependency again but give more sensible
error message when no enough PCMs are available due to the lack of
this option.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* for-linus: (778 commits)
ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
ALSA: hda/via - Clean up duplicated codes
ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802
ALSA: hda - Add keep_eapd_on flag to generic parser
ALSA: hda - Allow setting automute/automic hooks after parsing
ALSA: hda/via - Disable broken dynamic power control
ALSA: usb-audio: fix Roland/Cakewalk UM-3G support
ALSA: hda - Add headset quirk for two Dell machines
ALSA: hda - add dock support for Thinkpad T431s
ALSA: sis7019: fix error return code in sis_chip_create()
ASoC: cs42l52: fix default value for MASTERA_VOL.
ASoC: wm8994: check for array index returned
ASoC: wm8994: Fix reporting of accessory removal on WM8958
ASoC: wm8994: use the correct pointer to get the control value
Linux 3.10-rc3
ipc/sem.c: Fix missing wakeups in do_smart_update_queue()
score: remove redundant kcore_list entries
ASoC: wm5110: Correct DSP4R Mixer control name
ARC: lazy dcache flush broke gdb in non-aliasing configs
...
This fixes the internal and external mic on Ordissimo EVE2, also known
as Malata PC-B1303.
We still don't know how to detect mic jack like Realtek's windows
driver.
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous commit was written in the way to make the backport to
3.9.y easier, and left the duplicated open codes intentionally.
Now let's clean up the duplicated codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VIA driver has a special suspend handling only for VT1802 to reduce
the pop noise. During the transition to the generic parser, the
behavior of snd_hda_set_pin_ctl() was also changed to modify the
cached values, too. And this caused a regression where the pin is
still cleared even after the resume (including the resume from power
save), resulting in the silent output.
The fix is simply to replace snd_hda_set_pin_ctl() with the explicit
call of snd_hda_codec_write() again.
Reported-by: Alex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VT1802 codec seems to reset EAPD of other pins in the hardware level,
and this was another reason of the silent headphone output on some
machines. As a workaround, introduce a new flag indicating to keep
the EPAD on to the generic parser, and set it in patch_via.c.
Reported-by: Alex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some codec drivers (VIA codecs and some Realtek fixups) set the
automute and automic hooks after calling
snd_hda_gen_parse_auto_config(). In the current code, the hook
pointers are referred only in snd_hda_gen_parse_auto_config() and
passed to snd_hda_jack_detect_enable_callback(), thus changing the
hook values won't change the actually called callbacks properly.
This patch fixes this bug by setting the static functions as the
primary callback functions for the jack detection, and let them
calling the appropriate hooks dynamically.
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since the transition to the generic parser, the actual routes used
there don't match always with the assumed static paths in some
set_widgets_power_state callbacks. This results in the wrong power
setup in the end. As a temporary workaround, we need to disable the
calls together with the non-functional dynamic power control enum.
Reported-by: Alex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This quirk is required for the headset mic to work on these
two machines.
BugLink: https://bugs.launchpad.net/bugs/1186170
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a model/fixup string "lenovo-dock", for Thinkpad T431s, to allow sound in docking station.
Tested on Lenovo T431s with ThinkPad Mini Dock Plus Series 3
Signed-off-by: Ebben Aries <earies@dscp.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As drvdata is cleared to NULL at probe failure or at removal by the
driver core, we don't have to call pci_set_drvdata(pci, NULL) any
longer in each driver.
The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
hda_intel.c. Since this function itself releases the card instance,
we need to clear drvdata here as well, so that it won't be released
doubly in the remove callback.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The newer HP laptops have SSID 103c:20xx and 103c:21xx, and these
usually have the mic-mute LED on Fn-F8. Let's enable it, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add HD Audio Device PCI ID for the Intel BayTrail platform.
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When an inactive path is powered down with spec->power_down_unused
flag, we should check the activity of each widget in the path whether
it's still referred from any active path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit affdb62b81.
The commit introduced a regression with AD codecs where the stream is
always clean up. Since the patch is just a minor optimization and
reverting the commit fixes the issue, let's just revert it.
Reported-and-tested-by: Michael Burian <michael.burian@sbg.at>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a revised patch based on Mengdong Lin's fix patch, which is a
supplement to a previous patch [1611a9c9: ALSA: hda - Add fixup for
Haswell to enable all pin and convertor widgets].
Some Haswell BIOS will disable the 2nd and 3rd pin/covertor widgets
when the HD-A controller changes state from D3 to D0. So when the
controller resumes after a system or runtime suspend, these widgets
are disabled and programming these widgets to D0 will cause H/W error
and codec will not respond.
In addition, we found out that some BIOS disables the pins at S3
although it shows up at boot. This confuses the driver utterly, and
the hardware falls into the fatal communication error like the above.
So in this patch, we apply intel_haswell_enable_all_pins() not only as
a fixup to a certain device (with 8086:2010) but to all Haswell
machines. The codec driver basically assumes that all pins are
exposed, so it's anyway better to see them from the beginning. Even
if all pins and converters are shown by this call, there should be no
regression in practice: the pin default configurations are still kept,
thus the disabled pins are handled as disabled by the driver
properly.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The interrupt handler azx_interrupt will call azx_update_rirb,
which may call snd_hda_queue_unsol_event, snd_hda_queue_unsol_event
will dereference chip->bus pointer.
The problem is we alloc chip->bus in azx_codec_create
which will be called after we enable IRQ and enable unsolicited
event in azx_probe.
This will cause Oops due dereference NULL pointer. I meet it, good luck:)
[Rearranged the NULL check before the tracepoint and added another
NULL check of bus->workq -- tiwai]
Signed-off-by: Wang YanQing <udknight@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The older Conexant codecs have up to two EAPDs and these are supposed
to be rather statically turned on. The new generic parser code
assumes the dynamic on/off per path usage, thus it resulted in the
silent output on some machines.
This patch fixes the problem by simply assuming the static EAPD on for
such old Conexant codecs as we did until 3.8 kernel.
Reported-and-tested-by: Christopher K. <c.krooss@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The audio driver mistakenly allows 64 bit addresses to be created for
the audio driver on Nvidia GPUs. Unfortunately, the hardware normally
only supports up to 40 bits of DMA. This can cause system panics as
well as misdirected data when the address is > 40 bits as the upper
part the address is truncated.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This enables better volume controls than the current model parser.
Also, because the original quirk for X220 was added to fix
docking station support, add the TP410 fixup instead.
Reported-by: Willian Jon McCann <william.jon.mccann@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These are being reported as being so noisy at high mic boost levels,
so they are unusable in practice.
Therefore artificially limit the boosts.
BugLink: https://bugs.launchpad.net/bugs/1089795
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When pin default configs are overridden via patch option, these are
evaluated before fixups are applied. Since some fixups change the
whole codec trees and/or add pins dynamically, this sanity check might
not pass when pins aren't present at the time the function is called.
We may reorder the execution, but an easier fix is simply to disable
this sanity check.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The flag bus->shutdown implies that the control elements might have
been already destroyed. When a codec is resumed at this state and
tries to call vmaster hook (e.g. in snd_hda_gen_init()), it would
refer to a non-existing object, resulting in Oops in the end.
This patch just adds a check of the flag in the caller side for
avoiding such a crash.
Though, the best would be to clear hook->sw_kctl by the destructor of
the corresponding ctl element, but vmaster uses its own private_free,
it can't be done easily. So let it be for a while.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When graphics initializes the HDMI chip, sometimes this leads to
pins going into D3 and right channel being muted. If the audio driver
finishes initialization before the graphic driver does, this situation
becomes permanent.
This is a workaround that checks for this situation and corrects it on
playback prepare. It has been verified working on at least one machine.
BugLink: https://bugs.launchpad.net/bugs/1167270
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When setting up the aamix output paths, use the primary DAC instead of
the individual DAC for each output as default. Otherwise multiple
DACs will be turned on for a single aamix widget, which results in
doubly or more volumes, because the duplicated signals will be sent
through all these DACs for a single stream.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When we have a loopback mixer control, this should manage the state
whether the output paths include the aamix or not. But the current
code blindly initializes the output paths with aamix = true, thus the
aamix is enabled unless the loopback mixer control is changed.
Also, update_aamix_paths() called by the loopback mixer control put
callback invokes snd_hda_activate_path() with aamix = true even for
disabling the mixing. This leaves the aamix path even though the
loopback control is turned off.
This patch fixes these issues:
- Introduced aamix_default() helper to indicate whether with_aamix is
true or false as default
- Fix the argument in update_aamix_paths() for disabling loopback
Reported-by: Lydia Wang <LydiaWang@viatech.com.cn>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For capture, the delay through the codec contributes to the time stamp
of the sample recorded at the A to D. Rename the codec time stamp
function appropriately.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A bunch of changes here, the most interesting one subsystem wise being
Morimoto-san's work to create snd_soc_component which doesn't do much
for now but will be pretty important going forwards:
- Add a new component object type which will form the basis of moving
to a more generic handling of SoC and off-SoC components, contributed
by Kuninori Morimoto.
- A fairly large set of cleanups for the dmaengine integration from
Lars-Peter Clausen, starting to move towards being able to have a
generic driver based on the library.
- Performance optimisations to DAPM from Ryo Tsutsui.
- Support for mixer control sharing in DAPM from Stephen Warren.
- Multiplatform ARM cleanups from Arnd Bergmann.
- New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJRa//sAAoJELSic+t+oim95J8P/A0ia+ergNHjM7VuV89XyDxJ
qT+hciD2F7HGiGqCluyIxWTWY4NCG8JUMVj4j+qDltc+DZA7DGX654gUXOlyYIFb
Otbt7s8CNGIGRuUkRAzoSCewL2B/veFjOdnw6XW2w9YcYHeYbjl9BOlXOdCJtPRb
yroKHl6mzD99eD8y26QVjk7z3bJGmdBkckilYz+Fws+NACGZqu5KpzF11+DnrAL+
0Bl3F/fafDEUwFqDvWaQD2728aXxJL1pg0aR8mueRCcGBPnk3qWycj9kQZqVFBpV
i8Q+xNEnIVECfDKclT0j0bAL+2ftcg2Jm2lryupMtopGxR3Uii1kgGKSMwYHz82E
bvQ8y3phLc6u5VtIIJj0iPE7ZE5H/2///KgFEj6z/P2tZPWobMkURb+9bGQTJ8Qv
pUYGiOV0S/+59WAv0qnN4XpomA69EPPu5AuiPd30T+iNna998OjFEBRmIc/wJ519
QYlhj1ThWsa3Uoi1V0hmhAPHCXVtOKHnZfj95cyaD4Vq8zdqUmptJI+UvUJFgRUm
30eVVNwcIb0XE+0K4skMbVbpCkRA4m+pBGE7+Z+x72kYTfmg6uVET1T/sGgDFIAG
XCZ8QOXXYxpmpXMDqTKO30oBHdN6V0tClkSCuQ6H2PoICi0VYX3ZZWT8/Qno3JuN
bBxyWhz3gYL/MII6qJpE
=lx37
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.10
A bunch of changes here, the most interesting one subsystem wise being
Morimoto-san's work to create snd_soc_component which doesn't do much
for now but will be pretty important going forwards:
- Add a new component object type which will form the basis of moving
to a more generic handling of SoC and off-SoC components, contributed
by Kuninori Morimoto.
- A fairly large set of cleanups for the dmaengine integration from
Lars-Peter Clausen, starting to move towards being able to have a
generic driver based on the library.
- Performance optimisations to DAPM from Ryo Tsutsui.
- Support for mixer control sharing in DAPM from Stephen Warren.
- Multiplatform ARM cleanups from Arnd Bergmann.
- New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
With this patch, a TRRS headset mic cannot be successfully detected
on the Asus X101CH, and we can also distinguish between headphone
and headset automatically.
Buglink: https://bugs.launchpad.net/bugs/1169138
Co-authored-by: Kailang <kailang@realtek.com>
Tested-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On some machines, there is a headset jack that can support both
headphone, headsets (of both CTIA and OMTP type) and mic-in.
On other machines, the headset jack supports headphone, headsets
(both CTIA and OMTP), but not mic-in.
This patch implements that functionality as different capture sources.
Buglink: https://bugs.launchpad.net/bugs/1169143
Tested-by: David Chen <david.chen@canonical.com>
Co-authored-by: Kailang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now that we have a flag for headphone mics, we can use that flag
in the jack creation instead of creating the jack manually.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I never liked that we move our speaker and hp pins to line out
if there are not any line outs; but now that we do,
add some convenience functions to find hp and speaker pins even
if they have been moved.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This allows a specific mic to get the "Headphone Mic" name, in addition
to the existing "Headset Mic" name.
Also, it allows for a special mark: if the sequence number is set
to 0xc, that's an indication to prefer it for headset mic, and if it's
set to 0xd, that's an indication to prefer it for headphone mic.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For playback add the codec-side delay to the timestamp, for capture
subtract it. This brings the timestamps in line with the time that
was recently added to the delay reporting.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Correct pin configs for the Acer AC700. Most importantly indicate
that SPDIF is connected, it routes to HDMI out.
Similar to Aspire models, chain in the DMIC fixup and allow it to be
applied to this codec (ALC269VB) as well.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The DSP in the CA0132 codec adds a variable latency to audio depending
on what processing is being done. Add a new patch op to return that
latency for capture and playback streams. The latency is determined
by which blocks are enabled and knowing how much latency is added by
each block.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new codec PCM ops, get_delay(), to obtain the codec/stream-
specific PCM delay count. When it's NULL, nothing changes.
This new feature was requested for CA0132, which has significant
delays in the path depending on the running DSP code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
changed is not initialized in path_power_down_sync, but it is expected
to be false in case no change happened in the loop. So set it to
false.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit 6ab317419c.
The commit [6ab317419c: ALSA: hda - Allow power_save_controller option
override DCAPS] changed the behavior of power_save_controller so that
it can override the driver capability. This assumed that this option
is rarely changed dynamically unlike power_save option. Too naive.
It turned out that the user-space power-management tool tries to set
power_save_controller option to 1 together with power_save option
without knowing what's actually doing. This enabled forcibly the
runtime PM of the controller, which is known to be broken om many
chips thus disabled as default.
So, the only sane fix is to revert this commit again. It was intended
to ease debugging/testing for runtime PM enablement, but obviously we
need another way for it.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=56171
Reported-and-tested-by: Nikita Tsukanov <keks9n@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rename "Digitial In" to "Digital In". This function is only used for
proc output, so should not cause any problems to change.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Added the device ID to the modalias list and assinged ALC662 patches
for it
* Added 4 port support for the device ID 0671 in alc662_parse_auto_config
Signed-off-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch let ELD debug message show 'pin_eld->monitor_present' which reflects
the real pin response to verb GET_PIN_SENSE.
'eld->monitor_present' should not be used here because 'eld' is a temp
structure now and so its "monitor_present" is not set.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In function snd_hdmi_get_eld(), the variable 'ret' should be initialized to 0.
Otherwise it will be returned uninitialized as non-zero after ELD info is got
successfully. Thus hdmi_present_sense() will always assume ELD info is invalid
by mistake, and /proc file system cannot show the proper ELD info.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: stable@vger.kernel.org
Acked-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Turing on the headphone amp interferes with the impedance measurement
used to detect a TRRS style headset microphone. Delay the HP turn on
until 500ms after the jack is detected, allowing the mic detection
state machine to run to completion.
Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent fix for the independent HP reduced the availability of the
side surround output, because there are only 4 DACs for 7.1 and a HP
outputs. Adjust the badness tables for VIA so that 7.1 outputs are
activated for the cost of missing independent HP.
Once when we implement the dynamic DAC switching to multiple outputs,
this conflicts will be eased in future...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The lack of independent HP mode shouldn't be too bad, but currently
its badness is set a bit too high. Let's lower it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The standard badness values don't seem to fit to all preferences.
Some configuration prefer the side output over the headphone, some
want the speaker over the surround, etc.
This patch moves the badness table pointers into hda_gen_spec, so that
the codec driver can override them.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge back for-linus branch for the badness table adjustment for VIA codecs
* for-linus:
ALSA: hda - Fix DAC assignment for independent HP
ALSA: hda - Fix abuse of snd_hda_lock_devices() for DSP loader
ALSA: hda - Fix typo in checking IEC958 emphasis bit
ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls()
ALSA: snd-usb: mixer: propagate errors up the call chain
ALSA: usb: Parse UAC2 extension unit like for UAC1
ALSA: hda - Fix yet missing GPIO/EAPD setup in cirrus driver
The generic parser should evaluate the availability of the independent
HP when specified. Otherwise a DAC without the direct connection to
the corresponding pin may be assigned for the HP, but the driver
doesn't check it at all. The problem was actually seen on some
machines with VT1708s or equivalent codec, where DAC0 is assigned to
HP although it can be connected only via aamix.
This patch adds the badness evaluation for the independent HP to make
it working properly.
Reported-by: Lydia Wang <LydiaWang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now that we have a "Headset Mic" name, let's use it for some devices
we know for sure has a headset mic jack.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Headset mic jacks, i e TRRS style jacks with Headphone Left,
Headphone Right, Mic and GND signals, are becoming increasingly
common and are now being shipped by several manufacturers.
Unfortunately, the HDA specification does not give us any hint
of whether a Mic pin belongs to such a jack or not, but it would
still be helpful for the user to know (especially if there is one
TRS Mic jack and one TRRS headset jack).
This new fixup causes the first (non-dock, non-internal) mic to
be a headset mic jack. The algorithm can be later refined if needed.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current DSP loader code abuses snd_hda_lock_devices() for ensuring
the DSP loader not conflicting with the other normal operations. But
this trick obviously doesn't work for the PM resume since the streams
are kept opened there where snd_hda_lock_devices() returns -EBUSY.
That means we need another lock mechanism instead of abuse.
This patch provides the new lock state to azx_dev. Theoretically it's
possible that the DSP loader conflicts with the stream that has been
already assigned for another PCM. If it's running, the DSP loader
should simply fail. If not -- it's the case for PM resume --, we
should assign this stream temporarily to the DSP loader, and take it
back to the PCM after finishing DSP loading. If the PCM is operated
during the DSP loading, it should get an error, too.
Reported-and-tested-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There is a typo in convert_to_spdif_status() about checking the
emphasis IEC958 status bit. It should check the given value instead
of the resultant value.
Reported-by: Martin Weishart <martin.weishart@telosalliance.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I forgot to update spec->gpio_data in the automute hook, so it will be
overridden at the init sequence, thus the machine is still silent when
no headphone jack is plugged at boot time.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The new HP desktop machines have Realtek codecs and their LEDs are
controlled via GPIO as for many laptop models. Add similar hooks as
well as in patch_sigmatel.c for controlling LEDs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The verb to set up the digital beep via AC_VERB_SET_DIGI_CONVERT_2
should be executed at resume as well. Use the cached write for it
being performed automatically at resume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
While playing the digital beep tone, the codec shouldn't be turned
off. This patch adds proper snd_hda_power_up()/down() calls at each
time when the beep is played or off.
Also, this fixes automatically an unnecessary codec power-up at
detaching the beep device when the beep isn't being played.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of calling snd_hda_attach_beep_device() and
snd_hda_detach_beep_device() in each codec driver, move them to the
generic parser. The codec driver just needs to set spec->beep_nid for
activating the digital beep.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The argument passed to snd_hda_attach_beep_device() is a widget NID
while spec->beep_amp holds the composed value for amp controls.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
During the transition to the generic parser, the hook to the codec
specific automute function was forgotten. This resulted in the silent
output on some MacBooks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
spec->dsp_state is initialized to DSP_DOWNLOAD_INIT, no need to reset
and check it in ca0132_download_dsp().
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of using the dspload_is_loaded() function, check the dsp_state
that is kept in the spec. The dspload_is_loaded() function returns
true if the DSP transfer was never started. This false-positive leads
to multiple second delays when ca0132_setup_efaults() times out on
each write.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If dspload_image() fails, it was ignored and dspload_wait_loaded() was
still called. dsp_loaded should never be set to true in this case,
skip it. The check in dspload_wait_loaded() return true if the DSP is
loaded or if it never started.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If there are no internal speakers, we should not turn the eapd switch
off, because it might be necessary to keep high for Headphone.
BugLink: https://bugs.launchpad.net/bugs/1155016
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, the driver doesn't power down the widget at going down to D3
when the widget node has an EAPD capability and EAPD is actually set
on all codecs unless codec->power_filter is set explicitly.
This caused a problem on some Conexant codecs, leading to click
noises, and we set it as NULL there. But it is very unlikely that the
problem hits only these codecs.
Looking back at the development history, this workaround for EAPD was
introduced just for some laptops with STAC9200 codec, then we applied
it blindly for all. Now, since it's revealed to have an ill effect,
we should disable this workaround per default and apply only for the
known requiring systems.
The EAPD workaround is implemented now as snd_hda_codec_eapd_power_filter(),
and this has to be set explicitly by the codec driver when needed.
As of now, only patch_stac9200() sets this one.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use the dynamic array allocations for pins, converters and PCM arrays
instead of the fixed size arrays. The modern HDMI codecs get more and
more pins, and we don't know the sensitive limit.
Most of the patch are spent for the straight conversions from the
fixed array access to snd_array helpers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the connection list expansion in hda_codec.c and hda_proc.c, the
value returned from snd_hda_get_num_raw_conns() is used as the array
size to store the connection list. However, the function returns
simply a raw value of the AC_PAR_CONNLIST_LEN parameter, and the
widget list with ranges isn't considered there. Thus it may return a
smaller size than the actual list, which results in -ENOSPC in
snd_hda_get_raw_conections().
This patch fixes the bug by parsing the connection list correctly also
for snd_hda_get_num_raw_conns().
Reported-and-tested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a headphone pin is set up as a shared hp/mic pin, we rather want
to keep it as a headphone primarily as default, but the driver
overrides it always as a mic pin, just because the input controls are
created after outputs. Add a check of pin NID and skip the
re-initialization of pinctl for such a shared hp/mic pin.
Reported-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the headphone mic jack enum control is created (via explicitly
specification by user), it doesn't make much sense to change the I/O
direction dynamically per capture source change, since the I/O
direction is rather controlled over the enum ctl.
This also reduces the implicit dependency between the capture source
and the hp mic jack enum ctls, which might confuse a program accessing
the whole control elements at once like alsactl.
In addition, this patch introduces update_hp_automute_hook() function
to call the proper hook function. It's just to remove the open codes
in multiple places in hda_generic.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There is no big merit to distinguish these two hints. Instead, just
have a single flag, add_jack_modes, for creating the jack mode enum
ctls for both I/O directions.
The hint string parser code is left and translated as add_jack_modes
just for keeping compatibility.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous commits added the capability to change the pin control of
hp/mic shared jack, but it actually didn't work as expected when the
value is changed from the output to the input, since I forgot to reset
the pin I/O bit in that case. This patch fixes the problem.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In order to let user test the known workaround more easily, give a few
known fixups for ALC260 to the model strings so that it can be passed
via the module option.
Also, move the unusual setups found in FSC S7020 fixup into a special
model, fujitsu-jwse, Jonathan Woithe Special Edition.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a headphone jack is configured as a shared hp/mic jack, the jack
mode enum needs to handle both input and output directions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch improves the generic parser code to allow to set up the
headphone jack as a mic input. User can enable this feature by giving
hp_mic hint string.
The former shared hp/mic feature for the single built-in mic is still
retained. This detection can be disabled now via hp_mic_detect hint
string, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move the zero check `hda_frame_size_words == 0' before the modulus
`buffer_size_words % hda_frame_size_words'.
Also remove the redundant null check `buffer_addx == NULL'.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If the new control cannot be created, this function will return to avoid
snd_hda_ctl_add dereferencing a NULL control pointer.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If the SPDIF control array cannot be reallocated, the function
will return to avoid dereferencing a NULL pointer.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ELD validity can change during the lifetime of a presence detect,
so we need to be able to listen for changes on the ELD control.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Because the eld buffer can be simultaneously accessed from both
workqueue context (updating) and process context (kcontrol read),
we need to protect it with a mutex to guarantee consistency.
To avoid holding the mutex while reading the ELD info from the
codec, we introduce a temporary eld buffer.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For better readability, the information that is parsed out of the
ELD data is now put into a separate parsed_hdmi_eld struct.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Previously, it was possible to read the eld data of the previous
monitor connected. This should not be allowed.
Also refactor the function slightly.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently, eld_valid is never set to false, except at kernel module
load time. This patch makes sure that eld is no longer valid when
the cable is (hot-)unplugged.
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the recent update, Fujitsu S7020 laptop with ALC260 codec lost the
speaker output, no matter how the amps and the pins are set. After a
long debugging session, we found out that the default codec init code
is harmful for this machine, and we have to reset it to
ALC_INIT_NONE.
Reported-and-tested-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These two machines have no mute LED string in BIOS.
BugLink: https://bugs.launchpad.net/bugs/1128934
Tested-by: Tammy Yang <tammy.yang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This chip needs the speaker pin to go to D3 to avoid clicks,
so default_power_filter does not work here.
This was found on Thinkpad R61i/T61i but I guess it applies to
the entire chip. If not, quirks should be set for at least
PCI SSID 17aa:20ac.
Thanks to c4pp4 for testing.
BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've got a regression report wrt the IRQ issue related with the
power-save on a Dell machine, and disabling runtime PM works around.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=53441
Cc: <stable@vger.kernel.org> [v3.7+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current badness value used for the missing multi-io seems too
weak, and the multi-io tends to be skipped for desktop configurations
when no enough DACs are available. It's because the total badness of
the multi-io becomes often larger than the badness with assigning an
individual DAC to a headphone jack. This is good for one side, but it
seems that the surround outputs are more demanded by that.
This patch increases the badness value for the missing multi-io
slightly so that the multi-io would be preferred than the individual
headphone DAC if they conflict. Through the tests with hda-emu,
mostly only desktop configurations with ALC662/663 and CMI codecs are
affected by this change, and all look reasonable.
Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit [dcda58061: ALSA: hda - Add workaround for conflicting
IEC958 controls] introduced a workaround for cards that have both
SPDIF and HDMI devices for giving device=1 to SPDIF control elements.
It turned out, however, that this workaround doesn't work well -
- The workaround checks only conflicts in a single codec, but SPDIF
and HDMI are provided by multiple codecs in many cases, and
- ALSA mixer abstraction doesn't care about the device number in ctl
elements, thus you'll get errors from amixer such as
% amixer scontrols -c 0
ALSA lib simple_none.c:1551:(simple_add1) helem (MIXER,'IEC958
Playback Switch',0,1,0) appears twice or more
amixer: Mixer hw:0 load error: Invalid argument
This patch fixes the previous broken workaround. Instead of changing
the device number of SPDIF ctl elements, shift the element indices of
such controls up to 16. Also, the conflict check is performed over
all codecs found on the bus.
HDMI devices will be put to dev=0,index=0 as before. Only the
conflicting SPDIF device is moved to a different place. The new place
of SPDIF device is supposed by the updated alsa-lib HDA-Intel.conf,
respectively.
Reported-by: Stephan Raue <stephan@openelec.tv>
Reported-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: <stable@vger.kernel.org> [v3.8]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The chip address is 32bit long but INVALID_CHIP_ADDRESS is defined as
an unsigned long. This makes dsp_chip_to_dsp_addx() misbehaving on
64bit architectures. Fix the INVALID_CHIP_ADDRESS definition to be
32bit.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The problem addressed by this fixup is not specific to Vaio Z, affecting
some Vaio all-in-one desktop PCs too. Update the code comments accordingly.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by
the same issue that caused Vaio Z laptops to become silent: the speaker pin
must be connected to the first DAC even though the codec itself advertises
flexible routing through any of the DACs.
Use the no-primary-hp fixup for choosing the speaker pin as the primary so
that the right DAC is assigned on this device.
Cc: stable@vger.kernel.org
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes a few obvious bugs in DSP loader stuff:
- Fix possible memory leaks in the error path
- Avoid double-free calls in dma_reset()
- Properly set/unset WC bits for DMA buffers
- Add missing error status checks
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Base the DSP firmware transfer and communication timeouts on jiffy values.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the HD Audio Device IDs for the Intel Wellsburg PCH
Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A Haswell test machine showed that the invalid connection list, but
this time it has only a single pin on the codec, thus the former fixup
code doesn't work as it assumes the three pins blindly.
This patch splits the former fixup code to two parts:
- Enable eDP 1.2 for Haswell codec
- Fix the connection list of pins on Haswell codec;
the converter list is recorded dynamically in hdmi_add_cvt(), and
applied in hdmi_add_pin()
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some Haswell machines support more than one display outputs (HDMI or DP),
but its BIOS may not enable the codec's 2nd and 3rd pin and output cvt widgets.
This patch implements a board-specific fixup for Intel Haswell Machines:
If the hidden pins are not enabled by BIOS, the driver will enable them
and call common code to update the codec tree.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A codec may allow software to hide some unused pin/cvt widgets.
Sometimes BIOS does not enable the hidden widgets properly although they are
needed for the board. Thus the driver need to enable them as a board-specific
fixup and the whole tree will change.
This patch implements a common code for rereading codec widgets. So the fixup
code can call it after enabling the hidden widgets.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently we set the max number of connections to be 32, but there
seems codec that gives longer connection lists like AD1988, and we see
errors in proc output and else. (Though, in the case of AD1988, it's
a list of all codecs connected to a single vendor widget, so this must
be something fishy, but it's still valid from the h/w design POV.)
This patch tries to remove this restriction. For efficiency, we still
use the fixed size array in the parser, but takes a dynamic array when
the size is reported to be greater than that.
Now the fixed array size is found only in patch_hdmi.c, but it should
be fine, as the codec itself can't support so many pins.
Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_ca0132.c: In function ‘ca0132_is_vnode_effective’:
sound/pci/hda/patch_ca0132.c:3331:15: warning: ‘nid’ may be used uninitialized in this function [-Wmaybe-uninitialized]
sound/pci/hda/patch_ca0132.c:4345:13: warning: ‘ca0132_download_dsp’ defined but not used [-Wunused-function]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The loopback list is referred by the VIA codec driver no matter
whether CONFIG_PM is set or not, thus we need to enable it always.
Otherwise it gets compile errors.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It's mostly harmless to apply it for new models even if they have no
mic mute LED (just toggling an unused GPIO pin).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These days, GUIs such as Gnome sound settings want to be able to
show the correct jack status even when no streams are currently
running. I doubt this gives any measurable difference in power,
but if it does, the "Jack Detect" control can still be used to
turn polling off.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The VT1708 has no unsol event capability, and polling is set using
the "Jack Detect" alsamixer control. In order not to create
phantom Jack controls, temporary enable jackpoll during build_controls.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
... to be less confusing for the update path.
This new kconfig will choose CONFIG_SND_HDA_DSP_LOADER, which is
basically a device-independent feature in hda_intel.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit d45e6889ee ("ALSA: hda - Provide
the proper channel mapping for generic HDMI driver") added support for
custom channel maps in the HDA HDMI driver. Due to a mistake in an
'if' condition the custom map is always used even when no such map has
been set. This causes incorrect channel mapping for multichannel audio
by default.
Pass per_pin->chmap_set to hdmi_setup_channel_mapping() as a parameter
so that it can use it for detecting if a custom map has been set instead
of checking if map is NULL (which is never the case).
Reported-by: Staffan Lindberg <pike@xbmc.org>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If the driver detects and invalid ELD, it gives an open error.
But it forgot to release the assigned pin, converter and spdif ctls
before returning.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add new PCI ID 0x0a0c for Haswell ULT platform.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For non-snoop mode, we fiddle with the page attributes of CORB/RIRB
and the position buffer, but also the ring buffers. The problem is
that the current code blindly assumes that the buffer is contiguous.
However, the ring buffers may be SG-buffers, thus a wrong vmapped
address is passed there, leading to Oops.
This patch fixes the handling for SG-buffers.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=800701
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently we use LPIB forcibly for both playback and capture for
Poulsbo and Oaktrail devices, and this seems rather problematic.
The recent fix for LPIB delay count seems working well with these
devices, so let's enable it instead.
Reported-by: Martin Weishart <martin.weishart@telosalliance.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes a regression of the external mic not working on
HP Probook 4520s.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Because currently snd_printd() and snd_printdd() macros are expanded
to empty when CONFIG_SND_DEBUG=n, a compile warning like below
appears sometimes, and we had to covert it by ugly ifdefs:
sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’:
sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable]
For "fixing" these issues better, this patch replaces snd_printd() and
snd_printdd() definitions with empty inline functions instead of
macros. This should have the same effect but shut up warnings like
above.
But since we had already put ifdefs, changing to inline functions
would trigger compile errors. So, such ifdefs is removed in this
patch.
In addition, snd_pci_quirk name field is defined only when
CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in
snd_printdd() argument triggers the build errors, too. For avoiding
these errors, introduce a new macro snd_pci_quirk_name() that is
defined no matter how the debug option is set.
Reported-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds a better power filter hook for powering down unused
widgets in the generic parser.
The feature is enabled by setting hda_gen_spec.power_down_unused
flag.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Put the power state synchronization at the end of the parsing of
codec. This is necessary when the power filter is changed during the
codec probe. Since the first power-up sequence is performed without
the special filter, all widgets are supposed to be ON at this point.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a hook to struct hda_codec for filtering the target power state of
each widget when powering up/down. The current hackish EAPD check is
implemented as the default hook pointer, too.
This allows codec drivers to implement own power filter. In the
upcoming changes, the generic parser will have the better power filter
based on the active paths.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AC_VERB_GET_POWER_STATE returns the combined bits of the actual state
and the target state. Thus, comparing the obtained value directly
with the target value can't work. The value has to be shifted and
masked properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The arguments to call is_active_nid() in activate_amp() were swapped,
and this resulted in the muted amp on some SPDIF output pins.
Also, the index to be passed to is_active_nid() must be idx_to_check.
Otherwise it checks the wrong connection in the case of implicit aamix
connection paths.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Using the new chained_before flag, we can correct the headphone jack
detection capability easily over the existing ALC880 6stack model
(which disables the jack detection intentionally for compatibility
reason).
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846
Signed-off-by: Takashi Iwai <tiwai@suse.de>