When the connections from the pin selector contain only two
widgets, a route to DAC and the aa-mixer, it's certainly a
single connection. In such a case, get_dac_if_single() should
return the connected DAC, too.
This will improve the detection of the individual DAC
assignment for each pin.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The bitmap introduced in the commit [527e4d73: ALSA: hda/realtek - Fix
missing volume controls with ALC260] is too narrow for some codecs,
which may have more NIDs than 0x20, thus it may overflow the bitmap
array on them.
Just double the number to cover all and also add a sanity-check code
to be safer.
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've enabled the static fixups for ASUS machines with ALC269 codec,
just for making things compatible during the transition to the auto-
parser. However, it seems that the static configurations do more harmful
than good, as some of entries don't match with the actual hardware setups.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now we can clean up all static quirks for ALC260.
Also many codes in alc_quirks.c can be ripped off since they have been
used only by ALC260 static quirks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HP Presario B1900 needs a similar hack like Replacer, toggling GPIO1
per the jack state, in addition to the COEF setup used for other Acer
laptops.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The support for Replacer 627V in the auto-parser needs the unique unsol
event handling: although the machine has a single output pin 0x0f, it's
used for both the headphone and the speaker, and the driver needs to
toggle the output route via GPIO 1.
In addition, it needs a special COEF setup with 0x3050.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The ALC260 model=acer needs GPIO1 setup. It could be selected well
if the codec SSID is set properly by BIOS, but to make sure, enable it
forcibly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The model=will for ALC260 requires the pin 0x0f to be a headphone and
some special verbs for the COEF to turn on the amp. Now added these as
fixup entries and removed the static model quirk.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A malicious USB device could feed in a large nr_rates value. This would
cause the subsequent call to kmemdup() to allocate a smaller buffer than
expected, leading to out-of-bounds access.
This patch validates the nr_rates value and reuses the limit introduced
in commit 4fa0e81b ("ALSA: usb-audio: fix possible hang and overflow
in parse_uac2_sample_rate_range()").
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/930842
The reporter states that audio is inaudible by default without muting
'External Amplifier'. Add a quirk to handle his SSID so that changing
the control is not necessary.
Reported-and-tested-by: Benjamin Carlson <elderbubba0810@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
driver.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPOZeyAAoJEBus8iNuMP3duOcP/AjGPC2hX+TH0SXYvZnTMUud
gWM8qBKE3DS887G3eX4zqt/1Kkhw8AA47H+28NaqEATVHBmaPXxRw+phnEFcU3ZC
h0LzO5gMtx3RcfwisHtRNTMf4Ps74/vjaYMqViknWMRxU7gtSvtCvmoOJqSvBBAy
J2a3//jWPCGyKQ1lc4diT/vr5f+YNi9VHlMDeauYS86wCslvi+cPgBsrVMz9rYsF
hXKnbMowNr5G50Gnh20tMwkYFmXgbGFkQIoZzWpik5O4fr1lk36ftCOjdLSVSNqb
CY470PUjEEy75wZigQ9gO+Dxc4/iUgMyC5R0qKEYI60cEOrXqurt3i+DqRvJwS9+
nqyJnoX46kzUbYj9+PAdtYudZc4mO0MMqSiF5iTB6uAQna3Cw6pCHjEY0Aw6VhdM
1KrkF0GhPjKl0uDM2ScYlW7965aNpjwlSVEwn7VPmowfMCCRv7tFR1n6dMhgtkhB
TrZBs4IRHeONa/pLmf1GGeOGb8Ij7Iz5b4ggulqmHJrcLpt7WfWvWfT7bhR59yMx
QEjCT1GPu8WUY8BgF37JwhVmI96+3NH5GPJmrA/DPIftmXd+e9iQS3DhdunGpCfu
E0pCs/xKtQZ96CYAtPeb7J2QlzDeS+e/8NcazQeqgyg3KT6NA4wN+k5zSreekzyS
bTuf9uJ6HWy7CURbP58c
=xHrB
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
A simple fix from Morimoto-san for the pointer() operation in the FSI
driver.
Conflicts:
sound/pci/hda/patch_realtek.c
Merged back the fix for Acer Aspire 6935 with ALC889 codec.
The fix commit was based on 3.2 kernel so that it can be applied to
stable kernel cleanly.
Since 3.2 kernel, the driver starts trying to assign the multi-io DACs
before the speaker, thus it assigns DAC2/3 for multi-io and DAC4 for
the speaker for a standard laptop setup like a HP, a speaker, a mic-in
and a line-in. However, on Acer Aspire 6935, it seems that the
speaker pin 0x14 must be connected with either DAC1 or 2; otherwise it
results in silence by some reason, although the codec itself allows
the routing to DAC3/4.
As a workaround, the connection list of each pin is reduced to be
mapped to either only DAC1/2 or DAC3/4, so that the compatible
assignment as in kernel 3.1 is achieved.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VT1705 codec has two ADCs where the secondary ADC has no MUX but only
a fixed connection to the mic pin. This confused the driver and it
tries always overriding the input-source selection by assumption of
the existing MUX for the secondary ADC, resulted in resetting the
input-source at each time PM (including power-saving) occurs.
The fix is simply to check the existence of MUX for secondary ADCs in
the initialization code.
Tested-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A few machines with ALC861 & co are reported not to work properly with
the auto-mute feature in software. The auto-mute feature is implemented
in the hardware level, and the jack-detection never works with them.
Also, rename the fixup index as ALC861_FIXUP_* to follow the standard.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new flag to indicate that the codec has no jack-detection cap.
This flag should be set for hardwares that have no jack-detect
implementation although the codec chip itself supports it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
current fsi_pointer() calculation was not correct for FSI driver.
This patch fix it up.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The new HP laptops turns off the mute LED with VREF50 or VREF80, but
not in HIZ unlike the previous models. Since VREF50 (also 80) works
with the previous models, let's use VREF50 for all.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
that were sent. They collide with some -next work so I'd really like to
get them into 3.3-rc3 if possible to merge back up into the -next code.
All driver specific and unexciting in the grand scheme of things.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPMtONAAoJEBus8iNuMP3dQeEP/ivFFNSnrONVDlDqn8KcJS6m
Eyl3lji8KFgv3nbEauJptubfzMA6BuuRCyVRlJod1y91iqqobgZFIHowTKrqT3dy
I74sKqtmmVBhgUbyoJhOIFw3/XzFtROLgqhb/5gaRuhtQufOQ7ye6tWA+WpPtc99
lVntuWh12GmtmQugx31dMjZX5R62Lf6UV3G86LSpZ/yuZI9L8pTTgqP5RLzgPOjt
VP/hE6i18NoSm1b+84PCag0i8EtPKMR0hdLmHpBn2ZbuY08nLRknD0Jr+rcq1xDA
L3w9jNzo68Nu/jN/PRHYeO76XNwOP5WmxrPw7UkphtZKu6yGLeHDviQXyzyc8Xx6
6eGWCCmEAO9pEAt2SmTrJS53Bj2iyrnnWoXMDdiOw4Hka9EOurs4Xe9meuxtv06/
ITcUGTCodzd5eTG+otolZXWrYdrBNVf6GAo3U2cLbUrkqHgt73a64GJLX2T9P5SC
WSOpfb1rBokBAmw41miIzhod402R/Up/X7fi7KB+EUpU3MoNrPXuaAOaCgZkO7Tp
dGw0MygtjwVjfJYoWovFjWuaXdMsXu71uE2cyd3qdpA4EL6AZRk1USf0yOpSY4Cx
OzI2cPRH+etSZIG+TC3GGtRCGJ6scur5o/TThGsFNLLjGXHQ6LKN34Ik4R4hv+5q
9wKlhGlpMpYqunGhx7vr
=lu2o
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
A few small WM8994 updates to go on top of the previous lot of things
that were sent. They collide with some -next work so I'd really like to
get them into 3.3-rc3 if possible to merge back up into the -next code.
All driver specific and unexciting in the grand scheme of things.
The VMID ramp rate is supposed to be 0x3, not 11b. Fix that.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
The driver accidentally exchanged the left/right fields for stereo AC'97
mixer registers. This affected only the aux and CD inputs because the
line input bypasses the AC'97 codec and the mic input is mono; cards
without AC'97 (Xonar DS/DG/HDAV Slim, HG2PCI, HiFier) were not affected.
Reported-and-tested-by: Abby Cedar <abbycedar@yahoo.com.au>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.31+ <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the HD Audio DeviceIDs for the Intel Lynx Point PCH.
Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This hardware requires same fixup for the node 0x0f like Asus A6Rp.
More information: https://bugzilla.redhat.com/show_bug.cgi?id=785417
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In patch_ca0132.c, the error returned from chipio_write() isn't checked
always. Also, the power-up/down sequence isn't tracked properly in some
error paths.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
the Android suspend ignore code for idle_bias_off CODECs. That one is
actually a regression fix as some of the new power savings that have
been introduced confused the suspend ignore code, making devices that
are active for non-audio reasons look like they are idle causing them to
be suspended instead of being kept active.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPLSlpAAoJEBus8iNuMP3d0JkP/jA3bSbSR2/qg0SeOP1uEN9G
5JBD12urid3+cPi8FzBw3ecIH2thf1SoSg8rL//4gENyX6N9Ia1jXNjhYsA701kH
7EXsCqmMBl9qUfVTaGGAIh1SsRbNVuSQlL5KmG3yQPwRooNX+K/slr6BuItUepzz
H4C1bl45a92Wh6Nc1t+jYDJXS5Z+o5fc45AVpeiw+xcPblFcXptKVuWpHXfBHgef
+qK8SpfrvKfGygrFnLteYIwDby7ZPA21znRiBjPg2jL+w3KsIgOlZWbWJHZdlJ7/
5oSKaYXYbuA3UCUBayteakeDqiAoxjv4aw6XzAVgtwaITyuOdkWtLjvmSVFAElF4
J0u7/CukK434qezds9bztaBqigoEpRj4EH0Dd5ybZi1vOJO5V9UA8/SNux+K6yWX
+MHizTDZFlZNMdYsoCfinVlpelmvNl1TJYTL7JLKMUmE0+ph2Jz6elgbIkvlwHFb
bEjm/+fLZIHnzam88FikmbAER96w/pc7EtFFXmWKDkQwy9wDvnt4wNhy/MhwXub3
XiMkmcb+cCoaN5nefs49mYvIMUP90INfLWTn8r30GqbByEWdASC4sj5GSC6Ak7/G
Y4e90zxFd10UiaZMFoGmfcMBQ49ZKNGgxJ3aWPoz7dfM8MI6Gy9qcLyoDWBlwBFN
uh159btp7tVAn4D/wgC+
=FOxW
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
The only particularly remarkable change here is the one for handling of
the Android suspend ignore code for idle_bias_off CODECs. That one is
actually a regression fix as some of the new power savings that have
been introduced confused the suspend ignore code, making devices that
are active for non-audio reasons look like they are idle causing them to
be suspended instead of being kept active.
We can enable VMID independently of the bias in some use cases so we need
to ensure that the core device is powered up.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
sparse complains that "spec->multiout.dac_nids" is a pointer.
sound/pci/hda/patch_realtek.c:2321:37: error: incompatible types for operation (>)
sound/pci/hda/patch_realtek.c:2321:37: left side has type unsigned short const [usertype] *dac_nids
sound/pci/hda/patch_realtek.c:2321:37: right side has type int
It was meant to be num_dacs instead of dac_nids.
Although the current code still works as expected (when num_dacs is zero,
dac_nids should be NULL, too), better to fix now, of course.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The header 'linux/moduleparam.h' is included twice in
'sound/isa/sb/emu8000_patch.c'. Once is enough.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In most cases, the slave strings for vmaster are identical between
volumes and switches except for "xxx Volume" and "xxx Switch" suffix.
Now snd_hda_add_vmaster() takes the optional suffix argument so that
each string can be composed with the given suffix, and we can share the
slave name strings in both volume and switch calls nicely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent changes in Realtek auto-parser added the new "Bass Speaker"
and "CLFE" mixer elements which should be tracked as vmaster slaves,
too.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42720
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Lenovo laptops with cx5066 chips seem to work better with
model=auto. Let's get rid of the fallback to the wrong model.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738397
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since the dynamic pin power-control and the analog low-current mode
may lead to pop-noise, it's safer to set it off as default.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=741128
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is an attempt to fix S3-resume problems reported for a few
laptops with different Conexant codecs. They show the communication
stalls at some time in S3, and the driver falls back into the
single-cmd mode. This leads to the silent output or the lack of
auto-mute feature.
As a workaround, here enables the sync_write and the bus-reset flags
to make the communication more stable.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738397
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VIA codecs have several different power-saving features, and one of
them is the analog low-current mode. But it turned out that the ALC
mode causes pop-noises at each on/off time on some machines. As a
quick workaround, disable the ALC when another power-saving feature,
the dynamic pin power-control, is turned off, too, since the dynamic
power-control is already exposed as a mixer enum element so that user
can turn it on/off freely.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=741128
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The analog low-current mode must be enabled when the no stream is
running but the current detection checks it in a wrong way.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=741128
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of always writing AC_VERB_SET_POWER_STATE, check the current
power-state and don't write again if the value is already set.
This may reduce the click noise upon the dynamic power-state change
(e.g. in analog-input mixer).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The second line output mixer has the controls for the line input bypasses
in the opposite order.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
This typo caused the wrong codec's nid to be checked for wcaps type.
As a result, sometimes speakers would duplicate the output sent to
HDMI output.
Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/924320
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>