ASUS A8JN with AD1986A codec seems following the normal EAPD in the
normal order (0 = off, 1 = on) unlike other machines with AD1986A.
Apply the workaround used for Toshiba laptop that showed the same
problem.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=75041
Cc: <stable@vger.kernel.org> [3.11+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Quite a busy release for ASoC this time, more on janitorial work than
exciting new features but welcome nontheless:
- Lots of cleanups from Takashi for enumerations; the original API for
these was error prone so he's refactored lots of code to use more
modern APIs which avoid issues.
- Elimination of the ASoC level wrappers for I2C and SPI moving us
closer to converting to regmap completely and avoiding some
randconfig hassle.
- Provide both manually and transparently locked DAPM APIs rather than
a mix of the two fixing some concurrency issues.
- Start converting CODEC drivers to use separate bus interface drivers
rather than having them all in one file helping avoid dependency
issues.
- DPCM support for Intel Haswell and Bay Trail platforms.
- Lots of work on improvements for simple-card, DaVinci and the Renesas
rcar drivers.
- New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the
CSR SiRF SoC.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJTIOhJAAoJELSic+t+oim90CoP/3CVTm9cWv1qhPSU6jjn6RJG
/djmhntJfHd/GXo+0TiiwNK9WmZjFrJUr+5ofkDTCqSzFz1Suc90B6oHxY4dFbgF
IyIpTexGwTLv3H6yDjadYAfmGDSsE9sM2dkID9oXy6aEzjNby/a1VEiBnRgx16X1
YGvMVK8AGFn/AyC/zOV6EcKJxUjdDogqZ5wkR2XHzwDoYjl9ufxK9BnSIygYABOW
ABAjyrZf3xx97AH82BB6iqcZMh5GxGNTvI3hQd/vjx0r7RFUDNLqmF2cPZAMTRW/
bXWxVmtNHie1+lCldyMFm8pV/Pv09zuqDAQKbPY2TeHj2zF8CM548NlkFHqwHlp0
S9K5E1N+/2wcXMjQa1wBELohUdl6dVh1OFOAz7M8o0TJdSOZyR6PJ9r0NprP8NgS
67FBU+ZqnWIK159m9rKkFfPhnaDuDzk+rpwyK0fQxQgpdGGjLyv7OK3GhS30oTnA
Z2GjEyUySM1BcEEWAtfUD5fHbjN28e1Icn53q5q4JK4gvx4DXBy08uY/vumvjXjO
8oum3q3RjRvqIhzMrJoVgs+c8RHwS/bZQhlu9Q3qNTsDNDyMnaZWHFAnP8RDqHjv
ojZiMJkJdpqceZ3z1k5ZG8GWJ2JaZBikSbeNk2Ltg17/0nackq2r8ekrIoEUPVk2
ph4DJNC2s1qCFtx7tzQj
=C5oo
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.15
Quite a busy release for ASoC this time, more on janitorial work than
exciting new features but welcome nontheless:
- Lots of cleanups from Takashi for enumerations; the original API for
these was error prone so he's refactored lots of code to use more
modern APIs which avoid issues.
- Elimination of the ASoC level wrappers for I2C and SPI moving us
closer to converting to regmap completely and avoiding some
randconfig hassle.
- Provide both manually and transparently locked DAPM APIs rather than
a mix of the two fixing some concurrency issues.
- Start converting CODEC drivers to use separate bus interface drivers
rather than having them all in one file helping avoid dependency
issues.
- DPCM support for Intel Haswell and Bay Trail platforms.
- Lots of work on improvements for simple-card, DaVinci and the Renesas
rcar drivers.
- New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the
CSR SiRF SoC.
For making the driver behavior compatible with the earlier kernels,
use the analog beep in the loopback path instead of the digital beep.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The mixer widget (NID 0x20) of AD1884 and AD1984 codecs isn't
connected directly to the actual I/O paths but only via another mixer
widget (NID 0x21). We need a similar fix as we did for AD1882.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AD1983 has flexible loopback routes and the generic parser would take
wrong path confusingly instead of taking individual paths via NID 0x0c
and 0x0d. For avoiding it, limit the connections at these widgets so
that the parser can think more straightforwardly. This fixes the
regression of the missing line-in loopback on Dell machine.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The mixer widget on AD1983 at NID 0x0e was missing in the commit
[f2f8be43c5: ALSA: hda - Add aamix NID to AD codecs].
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Toshiba Satellite L40 with AD1986A codec requires the EAPD of NID 0x1b
to be constantly on, otherwise the output doesn't work.
Unlike most of other AD1986A machines, EAPD is correctly implemented
in HD-audio manner (that is, bit set = amp on), so we need to clear
the inv_eapd flag in the fixup, too.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=67481
Cc: <stable@vger.kernel.org> [v3.11+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some old AD codecs don't like the independent HP handling, either it
contains a single DAC (AD1981) or it mandates the mixer routing
(AD1986A). This patch removes the indep_hp flag for such codecs.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The 3stack pin configs for AD1986A codec had incorrect values that
resulted in broken mic and line-in.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AD1986A codec is a pretty old codec and has really many hidden
restrictions. One of such is that each DAC is dedicated to certain
pin although there are possible connections. Currently, the generic
parser tries to assign individual DACs as much as possible, and this
lead to two bad situations: connections where the sound actually
doesn't work, and connections conflicting other channels.
We may fix this by trying to find the best connections more harder,
but as of now, it's easier to give some hints for paired DAC/pin
connections and honor them if available, since such a hint is needed
only for specific codecs (right now only AD1986A, and there will be
unlikely any others in future).
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AD and VIA codecs had stereo mixer input enabled as default before
moving to the generic parser, and people think the lack of such a
regression. In this patch, the stereo mixer input is added back to
the input selection if no auto-mic is available, and if it's not
disabled explicitly via hint. This should satisfy most of demands,
i.e. stereo mix on desktop machines like what it worked before, and it
still keeps the new auto-mic feature on laptops.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It seems that AD1986A cannot manage the dynamic pin on/off for
auto-muting, but rather gets confused. Since each output has own amp,
let's use it instead.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971
Cc: <stable@vger.kernel.org> [v3.11+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ad_vmaster_eapd_hook() needs to handle the inverted EAPD case
properly, too. Otherwise the output gets broken on Lenovo N100 with
AD1986A codec.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It seems that EAPD on NID 0x16 is the only control over all outputs on
HP machines with AD1984A while turning EAPD on NID 0x12 breaks the
output. Thus we need to avoid fiddling EAPD on NID. As a quick
workaround, just set own_eapd_ctrl flag for the wrong EAPD, then
implement finer EAPD controls.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66321
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Similarly as other laptops with AD1981 & co codecs, we can control
EAPD on AD1986A more safely depending on the Master switch, in order
to save some power.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The only EAPD on AD1986A is on NID 0x1b where usually the speaker.
But this doesn't control only the speaker amp but may influence on all
outputs, e.g. Lenovo N100 laptop seems to have this issue.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As EAPD on NID 0x12 (speaker pin) is used as the master amp on
Thinkpads with AD1984A codec, we can hook this to vmaster for saving a
bit more power at master mute state.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AD1984A codec has a couple of pins with EAPD controls, and the generic
codec driver tries to turn each of them on/off depending on the pin
active state. However, Thinkpads seem to use EAPD of the speaker pin
as a master EAPD for controlling the mute of all outputs, including
the headphone. This results in the dead headphone output via the
headphone plugging because it mutes the speaker and turns off EAPD.
The fix is to simply add spec->gen.keep_on_eapd flag.
[This is a regression fix on 3.12 where we moved the AD codec parser
to the generic parser. 3.11 and earlier didn't show this problem
because still static quirks have been used.]
Reported-and-tested-by: Vito Caputo <vcaputo@gnugeneration.com>
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>
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>
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>
AD1988 family and AD1882 codecs have another mixer widget (0x21)
between the analog-loopback mixer widget (0x20) and the actual
outputs. Due to this hole, the analog-loopbacks aren't sent properly
to the output pins.
As a band-aid fix, introduce another fields holding the aamix merge
path, and activate it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now all AD codecs have the proper BIOS auto-parser, and we can make
it for default, finally. (AD1988 already did it because it had the
auto-parser.)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As done for patch_conexant.c, put ifdef ENABLE_AD_STATIC_QUIRKS for
preparing t odrop the static quirk codes in patch_analog.c.
The whole static quirk code can be omitted by commenting out
ENABLE_AD_STATIC_QUIRKS define now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AD codecs have strange implementations for choosing the SPDIF-output
mux source: the digital audio out widget may take the sources from
multiple connections, where 0x01 indicates it's a PCM while others
point ADCs. It's obviously invalid in the HD-audio spec POV, but it's
somehow convincing, too. And, to make things more complex, AD1988A
and AD1882 have deeper connection routes that aren't expressed
correctly.
In this patch, the SPDIF mux control is implemented in two ways:
- For easier one like AD1981, AD1983, AD1884 and AD1984, where the
SPDIF audio out widget takes just two or three sources, we can
simply implement via the normal input_mux and connection verb
calls.
- For the complex routes like AD1988A (but not AD1988B) or AD1882, we
prepare "faked" paths represented statically, and switch the paths
using these static ones, instead of parsing the routes from the
widget tree.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The aamix NIDs are also missing for AD codecs. All AD codecs seem to
have a (more or less) working aamix widget.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the support for the generic auto-parser to AD codec
driver. For AD1988, the old code is replaced simply with the new
generic parser. For other codecs, new model "auto" is added and
directed to use the generic parser.
No fixup codes have been implemented yet as of now. Eventually we'd
replace each static quirk with the generic parser + fixup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a preliminary patch for introducing a protection to access
races of snd_array instances. Call snd_array_init() appropriately
at the initialization time and don't call it twice.
Also the allocations of codec-spec structs are cleaned up by helper
functions in patch_sigmatel.c and patch_analog.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The free callback is called at the state where no extra verbs are
executed, thus calling *_shutup() is useless, as it's checking the
shutdown flag. Remove such superfluous calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Several bug reports suggest that the forcibly resetting IEC958 status
bits is required for AD codecs to get the SPDIF output working
properly after changing streams.
Original fix credit to Javeed Shaikh.
BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361
Reported-by: Robin Kreis <r.kreis@uni-bremen.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The standard name (and what PulseAudio picks up) is "Dock Mic",
not "Docking Mic" or "Docking-Station".
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
CONFIG_SND_HDA_POWER_SAVE is no longer an experimental feature and its
behavior can be well controlled via the default value and module
parameter. Let's just replace it with the standard CONFIG_PM.
Signed-off-by: Takashi Iwai <tiwai@suse.de>