The ID used for detection of the BenQ R55E actually identifies the
Quanta TW3 ODM design, which is also used for the Gigabyte W551 laptop
series. Schematics on the internet clearly indicate that the "Port C"
(analog input connected to record source #4 and mixer input #4) is
unconnected.
Playing an audio CD through analog playback (using cdplay from cdtools)
produces no sound, even with the mixer input labelled "CD" enabled, and
the volume control in the CD drive set to maximum. This indicates the
connection is really not present.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The "input converter" widget of the CX20459 has only one input amplifier,
expose that one as "Capture Volume/Capture Switch". The actual record
source selection is already exposed through the separately installed
input mux.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This includes renaming "Line In" to line, also in the mixer settings.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The CX20549 has only one single input amp on it's input converter
widget. Fix printing of values in the codec file in /proc/asound.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The internal mic input is phase inverted on one channel.
To avoid people in userspace summing the channels together
and get zero result, use a separate mixer control for the
inverted channel.
BugLink: https://bugs.launchpad.net/bugs/903853
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A collection of small fixes for 3.4-rc1, including
- mic-recording regression fix for Realtek codec
- clean-up of dmaengine parameter mess
- WM8894 calibration tweak
- minor fixes for asihpi and some bool module parms
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQIcBAABAgAGBQJPdX6XAAoJEGwxgFQ9KSmkFMcP+wTpqgoQgfcb6IMCY9KVGstd
Uy2LgocxKSwcIv7a+OTN4WTfCJBjf045jY+coKHRhO0ybMqLIyqqeLzyCShksKdB
PQ8+T+deIgezkhWuNdr+e+h+v39lRHQOPLiDDzEbToKryGxmx2YVbGh9b/4/oJfK
U7oXYbMZu1RBm4btUR5jfyfC8dKMPwB0/gRG6662hw/WqkNalQyXnPvJPhl+Ky+J
fbC2sggPlSwz6IzUdX023B7zuzUexiY3CVqZrFFskMiAEwB4xDIJ+aroQYhRSO+f
C93EB4f3gQ0zr65n07QFIHICUogLDKdbx9GLUdfrFwoWMeKamd0YZBZNTIUEzrtc
OkrLU5IDKxB+smjGul0SvJV/EkwYYCIx4dASoCUBORHAtAmEYrbUnHR/ga5c+i0X
YIB5mvurSCYNZesmSzLeET6F7zS1VHbaK9qopHDrivK/ZMe90Y06D/gWuhNySHOm
lwo4vepDG5rlDQBxVhHQGI7J1JXHBC8KI/drSROBJKb3XLIt76Qf0nmyTfRyLAqa
xF3axkB53uiAyK9YXY2hWcOPH2klNCat9y45fQ9Z4o2wU0t74lO2VuQJzsePGWKc
MP6cGAQ75G86jPPbsOY650AS4Lu4t4ZRDal/5q/Y+c5gLqM6ZoHI7RMmpSVa8uUS
LTrgwwBT/V87snKMwAKW
=cW/4
-----END PGP SIGNATURE-----
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A collection of small fixes for 3.4-rc1, including
- mic-recording regression fix for Realtek codec
- clean-up of dmaengine parameter mess
- WM8894 calibration tweak
- minor fixes for asihpi and some bool module parms"
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: fix isa/opti9xx module param type
sound: fix oss/msnd_pinnacle module param type
ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
ASoC: dmaengine_pcm: use dmaengine cyclic wrapper
ASoC: Add extra parameter to device_prep_dma_cyclic
ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin
ASoC: wm8994: Update WM8994 DCS calibration
This patch updates Jonathan Woithe's contact details across the kernel tree.
Signed-off-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Here is the first big update chunk of sound stuff for 3.4-rc1.
In the common sound infrastructure, there are a few changes for
dynamic PCM support (used in ASoC) and a few clean-ups. Majority of
changes are found, as usual, in HD-audio and ASoC.
Some highlights of HD-audio changes:
- All the long-standing static quirk codes for Realtek codec were
finally removed by fixing and extending the Realtek auto-parser.
- The mute-LED control is standardized over all HD-audio codec
drivers using the extended vmaster hook.
- The vmaster slave mixer elements are initialized to 0dB as default
so that the user won't be annoyed by the silent output after
updates, e.g. due to the additions of new elements.
- Other many fix-ups for the misc HD-audio devices.
In the ASoC side, this is a very active release, including a quite a
few framework enhancements. Some highlights:
- Support for widgets not associated with a CODEC, an important part
of the dynamic PCM framework.
- A library factoring out the common code shared by dmaengine based
DMA drivers contributed by Lars-Peter Clausen. This will save a lot
of code and make it much easier to deploy enhancements to
dmaengine.
- Support for binary controls, used for providing runtime
configuration of algorithm coefficients.
- A new DAPM widget type for regulator supplies allowing drivers for
devices that can power down unused supplies while active to do
without any per-driver code.
- DAPM widgets for DAIs, initially giving a speed boost for playback
startup and shutdown and also the basis for CODEC<->CODEC DAI link
support.
- Support for specifying the number of significant bits on audio
interfaces, useful for allowing applications to know how much effort
to put into generating data for a larger sample format.
- Conversion of the FSI driver used on some SH processors to
DMAEngine.
- Conversion of EP93xx drivers to DMAEngine.
- New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics
WM2200.
- Move audmux driver from arc/arm to sound/soc
- McBSP move from arch/ to sound/ and updates
Also, a few small updates and fixes for other drivers like au88x0,
ymfpci, USB 6fire, USB usx2yaudio are included.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQIcBAABAgAGBQJPawmuAAoJEGwxgFQ9KSmkdR0QALDDI/eUo4il40C33Gt/OSDz
Wkz+FOwp2ddbIqHc0n41sV7+FV1MuyzQ37uSw8zhK724Vd4tCqX6O5K1uvS1iSbh
jxHsy5XtfvCs2cjb61H6N+rfWcqC69gGhpc1mLoelj/PYl7S2iV5xOgTr4trVk2Y
UN7Y13b4hzZvubRUozoTldaIgdhrj8D8KO7qQNYehyG19b4bJ00Rk4K5JdjsFwbE
dTGl/ZUv50Fnx6PAWwqzh1a3cPabHA1TZDiKQM2nuE91e/Ecs4c7t1CRvW8m8mlr
u4D4N8PJcCN4SPDd2YuVBgan4SQ0kxKTaup11bHSvAWai2zPX5xMB1yoJNxgjSMt
5NHrGdR4+lQEVlBVXe2sWb4/3vE2kr2dtcGGR/FBFJTuLWDFFtRcnxeQJI8qRNUw
UdwDuGXdActoc1cZz2dsKvXMOs0TKT6OCdQH+dHBglW/W8wMkVocZclUgbQM66/X
gwvk0jfZ9p3UcKnYt3RkxiXQvAJsr8v0HhYcKvQCFhJArZufdeRHB7LCVRTm692Y
/BKZgK4QHxtGw3Yc7emYidKeRSP1ml5QlvC4zMIoGqiahqa8LI8Qcb5knvIEmU8q
kY5k0fVP+paf0dceAVXyFZsRB9AyX2eUdufDPifXtydQZgj4o9A7Sy/teWl77EgF
Mafq4QUzo1U4i8JpAM4d
=5FJq
-----END PGP SIGNATURE-----
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull updates of sound stuff from Takashi Iwai:
"Here is the first big update chunk of sound stuff for 3.4-rc1.
In the common sound infrastructure, there are a few changes for
dynamic PCM support (used in ASoC) and a few clean-ups. Majority of
changes are found, as usual, in HD-audio and ASoC.
Some highlights of HD-audio changes:
- All the long-standing static quirk codes for Realtek codec were
finally removed by fixing and extending the Realtek auto-parser.
- The mute-LED control is standardized over all HD-audio codec
drivers using the extended vmaster hook.
- The vmaster slave mixer elements are initialized to 0dB as default
so that the user won't be annoyed by the silent output after
updates, e.g. due to the additions of new elements.
- Other many fix-ups for the misc HD-audio devices.
In the ASoC side, this is a very active release, including a quite a
few framework enhancements. Some highlights:
- Support for widgets not associated with a CODEC, an important part
of the dynamic PCM framework.
- A library factoring out the common code shared by dmaengine based
DMA drivers contributed by Lars-Peter Clausen. This will save a
lot of code and make it much easier to deploy enhancements to
dmaengine.
- Support for binary controls, used for providing runtime
configuration of algorithm coefficients.
- A new DAPM widget type for regulator supplies allowing drivers for
devices that can power down unused supplies while active to do
without any per-driver code.
- DAPM widgets for DAIs, initially giving a speed boost for playback
startup and shutdown and also the basis for CODEC<->CODEC DAI link
support.
- Support for specifying the number of significant bits on audio
interfaces, useful for allowing applications to know how much
effort to put into generating data for a larger sample format.
- Conversion of the FSI driver used on some SH processors to
DMAEngine.
- Conversion of EP93xx drivers to DMAEngine.
- New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics
WM2200.
- Move audmux driver from arc/arm to sound/soc
- McBSP move from arch/ to sound/ and updates
Also, a few small updates and fixes for other drivers like au88x0,
ymfpci, USB 6fire, USB usx2yaudio are included."
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (446 commits)
ASoC: wm8994: Provide VMID mode control and fix default sequence
ASoC: wm8994: Add missing break in resume
ASoC: wm_hubs: Don't actively manage LINEOUT_VMID_BUF
ASoC: pxa-ssp: atomically set stream active masks
ASoC: fsl: p1022ds: tell the WM8776 codec driver that it's the master
ASoC: Samsung: Added to support mono recording
ALSA: hda - Fix build with CONFIG_PM=n
ALSA: au88x0 - Avoid possible Oops at unbinding
ALSA: usb-audio - Fix build error by consitification of rate list
ASoC: core: Fix obscure leak of runtime array
ALSA: pcm - Avoid GFP_ATOMIC in snd_pcm_link()
ALSA: pcm: Constify the list in snd_pcm_hw_constraint_list
ASoC: wm8996: Add 44.1kHz support
ALSA: hda - Fix build of patch_sigmatel.c without CONFIG_SND_HDA_POWER_SAVE
ASoC: mx27vis-aic32x4: Convert it to platform driver
ALSA: hda - fix printing of high HDMI sample rates
ALSA: ymfpci - Fix legacy registers on S3/S4 resume
ALSA: control - Fixe a trailing white space error
ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()
ALSA: hda - Add "Mute-LED Mode" enum control
...
The recent Realtek driver tries to assign an extra input via the
headphone plug when only a single input source is found. The code
worked on Samsung Q1, but it broke ASUS 1015 where the mic is a
digital-mic and only a specific ADC works.
This patch fixes the assignment of ADC in the shared mic/hp case.
Instead of assuming the single ADC at first, reduce the ADCs after
trying to assign both mic and HP pins.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42973
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pull trivial tree from Jiri Kosina:
"It's indeed trivial -- mostly documentation updates and a bunch of
typo fixes from Masanari.
There are also several linux/version.h include removals from Jesper."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
kcore: fix spelling in read_kcore() comment
constify struct pci_dev * in obvious cases
Revert "char: Fix typo in viotape.c"
init: fix wording error in mm_init comment
usb: gadget: Kconfig: fix typo for 'different'
Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
writeback: fix typo in the writeback_control comment
Documentation: Fix multiple typo in Documentation
tpm_tis: fix tis_lock with respect to RCU
Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
Doc: Update numastat.txt
qla4xxx: Add missing spaces to error messages
compiler.h: Fix typo
security: struct security_operations kerneldoc fix
Documentation: broken URL in libata.tmpl
Documentation: broken URL in filesystems.tmpl
mtd: simplify return logic in do_map_probe()
mm: fix comment typo of truncate_inode_pages_range
power: bq27x00: Fix typos in comment
...
A previous commit af65cbf296 (ALSA: hdmi: fix printout of SAD sampling
rates) fixed the sample rates shown in /proc/asound/cardX/eldY and
kernel log to not be entirely wrong. However, a missing rate from the
array added in the patch causes HDMI rates 88.2 kHz, 96 kHz, 176.4 kHz,
and 192 kHz to be shown as 96 kHz, 176.4 kHz, 192 kHz, and 384 kHz,
respectively.
Fix the reporting by adding the ALSA rate 64 kHz into the conversion
array between 48 kHz and 88.2 kHz.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since it's not always safe to assume that the vmaster hook is purely the
mute-LED control, add the flag indicating whether to expose the mute-LED
enum control or not. Currently, conexant codec sets this off for non-HP
laptops where EAPD may be used really as EAPD.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Create snd_hda_add_vmaster_hook() and snd_hda_sync_vmaster_hook()
helper functions to handle the mute-LED in vmaster hook more
commonly. In the former function, a new enum control "Mute-LED Mode"
is added. This provides user to choose whether the mute-LED should be
turned on/off explicitly or to follow the master-mute status.
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the vmaster hook for controlling EAPD dynamically to Conexant
auto-parser. When the Master is muted, EAPDs are turned off as well.
This will fix the missing mute-LED control on some machines in
addition to the more power-saving in the auto-parser mode.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've had ugly static handling of the mute-LED with a powersave hook
for ALC269 HP laptops just like done in patch_sigmatel.c. This is now
rewritten with the new vmaster hook and a fixup code.
For that, the new fixup action, ALC_FIXUP_ACT_BUILD, is introduced.
It's called after build_controls is called. The reason of this new
action is that vmaster hook must be added at this stage (not in init
or probe).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The mute-LED is controlled in patch_sigmatel.c by (ab-)using the
powersave hook. This can be now rewritten with the vmaster hook
instead, which is much simpler and can work even without
CONFIG_SND_HDA_POWER_SAVE kconfig.
A drawback is that the mute-LED corresponds _only_ to the Master mixer
switch instead of checking the whole DACs. But usually this shouldn't
be a big problem as PA enables the mixer elements accordingly.
Also, this patch changes the code to create vmaster always even on
STAC9200 and STAC925x. The former "Master" on these chips are renamed
as "PCM" now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the driver is changed to use vmaster or a new slave element is
added by the improvement of the parser code, user may face often the
silent output because of the muted slave mixer although Master volume
is properly set. And they complain. And I get upset.
Although such a mixer element should be initialized via "alsactl init",
it'd be more user-friendly if the known output slaves are unmuted and
set to 0dB so that user can control the volume only with Master as
default. Since Master is still set muted as default even with this
change, no risk of the speaker blow up, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've seen a problem with a pop-noise at suspend/resume on a HP
machine with ALC269, and it turned out to be an issue that the
controller going to D3 while the codec is unused.
When the device is once suspended and resumed and kept unused, the
driver doesn't initialize the codecs. Instead, the codec chips are
set up dynamically at the first usage. Now, suppose the device going
to suspend again before the codec is set up. The controller is turned
off to D3 while the codec chips are untouched. This caused a pop
noise because the codec chip might have been turned on implicitly by
the hardware.
As a workaround, the codec chip needs to be set to D3 when going to
suspend no matter whether it was used or not. Also, for making it
happening, the controller has to be always set up in the resume path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move the currently unused spec->init_hook at the beginning of the init
sequence so that the recently added ALC269VB coef setup can be put
there. The alc_init() is again clean without an ugly check.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The coef setup in alc269_fill_coef() was designed only for ALC269VB
model, and this has some bad effects for other ALC269 variants, such
as turning off the external mic input. Apply it only to ALC269VB.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
My CD input got lost in commit 68ef0561ef.
Raymond helped me to add the necessary pin fixup to make it appear again. In
fact, this is basically his patch. It fixes alsa bug #5541.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent addition of volume-knob widget in the auto-parser broke
automute/autoswitch for some Realtek devices.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It seems that Lenovo machines (or codec chip itself?) leave the unsol
event tags and the enablement-flag from other pins bogusly even on the
unused pins. Although this shouldn't be too critical, it's better to
clear them up sanely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some codecs don't supply the mute amp-capabilities although the lowest
volume gives the mute. It'd be handy if the parser provides the mute
mixers in such a case.
This patch adds an extension amp-cap bit (which is used only in the
driver) to represent the min volume = mute state. Also modified the
amp cache code to support the fake mute feature when this bit is set
but the real mute bit is unset.
In addition, conexant cx5051 parser uses this new feature to implement
the missing mute controls.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42825
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A bug report with an old Sony laptop showed that we can't rely on BIOS
setting the pins of headphones but the driver should set always by
itself.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The docking-station of Thinkpad X200 & co supports also an SPDIF output,
and the corresponding pin 0x1c has to be enabled for using it.
Reported-and-tested-by: Sebastian Glita <sebastian.glita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds a new position_fix option value, 4, as a combo mode
to use LPIB for playbacks and POSBUF for captures. It's the way
recommended by Intel hardware guys.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Enables port E of IDT 92HD91 codec as output and sets correct output
phase between ports E and D and high pass filter.
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When there are multiple input sources, the driver wrongly overwrites with
the value of the last input source on other slots at resume. Thus the
primary input source may be shown wrongly.
Reported-and-tested-by: Julian Sikorski <belegdol@gmail.com>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added sanity checks in a few places not to assume the pins having the
certain amp caps or the input-source being always assigned to a mux.
No actual bugs have been triggered by these, but surely better to be a
bit more robust.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The driver may create duplicated mic boost controls when there are
multiple mics with the very same type / location, and this leads to
the error at actual kcontrol creation. It needs to check the validity
of the created control and add a proper index if it's duplicated.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A few clean-ups for post-static-quirk time:
- Call alc_auto_init_std() statically in alc_init() instead of setting
spec->init_hook in each caller. spec->init_hook field is left
unused for any future use.
- Move the call of set_capture_mixer() to to alc_parse_auto_config()
instead of each caller.
- Get rid of the ADC-filling and imux check in each parser function.
This is no longer needed since the auto-parser always check ADCs and
imux. It was only for the static quirks.
- Kill unused defines
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the machine has two speakers but wants to put more multi-io
jacks, the parser shouldn't consider about the shared DAC but try to
assign the individual DACs. Otherwise the channel mapping would be
fairly confused and lead to the wrong DACs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the multi-io is added to the two speaker output configuration,
the parser would try to add yet another "Bass Speaker" control since
it checks only cfg->line_outs. Add a workaround for it by simply
passing the channel name in the case of multi-io outputs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Even if the outputs are using shared DACs, we can still create individual
mute siwtches since they are assigned per pin. This allows to create,
e.g. Speaker and Bass Speaker mute switches while the single volume is
used for these outputs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When BIOS is damn crazy and gives no pin-config at all, the driver might
lead to a NULL dereference. Let's add a NULL check for such a case.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The below patch fixes some typos "aditional" to "additional", and also fixes
a comment with another word mispelled.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Similarly in patch_via.c, parse the active analog-loopback connections
and create a list dynamically rather than static arrays.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Resitance is futile. The remaining static model quirks for Apple
machines with ALC882-compatible codecs are converted to the auto-parser
now. We can remove all alc*_quirks.c finally.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If anyone wants to debug the driver and avoid the existing fix-ups,
pass model=nofixup option. Then the driver will skip to pick up the
fixup list.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Finally the all static quirks for ALC880 are converted to the
auto-parser. Since we are never sure whether the BIOS on so many old
machines are really correct, the quirk table entries are copied as
they are, but just providing the proper pin-config values
accordingly.
Since alc880_quirks.c is removed, alc882_quirks.c has to be adjusted
slightly to be built again. There might be some compile warnings due
to the remaining alc882 quirks, but these shall be killed sooner or
later, I don't care it much at this point.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It turned out that BIOS on most of ASUS mobo's set the pin-config tables
reasonably well for the auto-parser. We'd need GPIO setups, but should
work as is other than that.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASUS Z71V has a totally broken BIOS setup (at least the info I got),
thus we need to override the whole pin-config table to make the
auto-parser working correctly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The model=uniwill would work almost as is, but a couple of adjustments
are needed to make the mutli-io working correctly. The headphone and
speaker pins have to be marked properly in pin configs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Uniwill p53 has a sane BIOS setup but just needs the volume-knob handling
like Fujitsu laptops with ALC880.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Similar as the previous patch for model=fujitsu, we can now move the
static quirk for F1734 to the auto-parser. The only difference is the
default pin configurations: F1734 has less pins than Amilo's.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now adding the support for the volume-knob widget, we can move the static
quirk for ALC880 model=fujitsu to the auto-parser completely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move the call of alc_apply_fixup() with ALC_FIXUP_ACT_PROBE after the
whole setups of patch_ops & co, so that the fix-up function may override
the default setup. This will be needed for installing the own unsol
event handler (e.g. for volume-knob controls).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clevo machines with ALC880 are all well with proper BIOS setup.
It seems still requiring the additional COEF setup for the EAPD.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Refactor the DAC filling function to be used for both the primary
line outputs and extra outputs using the individual badness tables.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Medion W810 with ALC880 has a typical BIOS bug, copying the
pin-defaults without disabling the unused pins. At least, the pin
0x17 must be disabled. Also, it requires GPIO-2 setup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALC880 model=lg could work fine with the auto-parser due to the recent
rewrite, but it still needs the manual adjustment; namely, the BIOS leaves
unused pins as some real active jacks. This confuses the parser.
Thus we just cover these pins and override the pin-configs as a fix-up.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Try harder to fit the multi-io pins also by checking the hard-wired
connections for multi-ios. Also, the badness values are adjusted to
prioritize the multi-ios as more valuable. These changes will enable
the multi-io on some machines without losing the current capability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous fix for the speaker on Acer Aspire 59135 introduced
another problem for surround outputs. It changed the connections on
the line-in/mic pins for limiting the routes, but it left the modified
connections. Thus wrong connection indices were written when set to
4ch or 6ch mode.
This patch fixes it by restoring the right connections just after
parsing the tree but before the initialization.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, the Realtek driver tires to assign the single-connected routes
for all pins only once at the beginning. However, since some DACs have
been already mapped, the rest pins might have also single conections.
In this patch, the driver does the single-connection assignment in a
loop until all possbile single-connections are checked. This will
improve the DAC assignment, e.g. for ASUS G72.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch improves the Realtek auto-parser for assigning the DACs and
mixers in more suitable ways by evaluating the assignment with "badness"
calculations.
When assigning a DAC hinders the assignment of individual DACs for
other pins, some badness point is given. Similarly, when it blocks the
assignment of unique mixer controls, another badness point is added.
Also, if no DAC, even shared DAC, can be assigned, more badness is
pointed. Finally, comparing the accumulated badness, the best route is
chosen among several trials.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
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>
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>
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>
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>
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>
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>
If cs_automic is called twice (like it is during init) while the mic
is present, it will over-write the last_input with the new one,
causing it to switch back to the automic input when the mic is
unplugged. This leaves the driver in a state (cur_input, last_input,
and automix_idx the same) where the internal mic can not be selected
until it is rebooted without the mic attached.
Check that the mic hasn't already been switched to before setting
last_input.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If a codec has both a front and a rear Line In, two controls both
named "Line Jack" will be created, which causes parsing to fail.
While a long term solution might be to name the jacks differently,
this extra check is consistent with what is already being done in many
auto-parsers, and will also protect against other cases when two
inputs have the same label.
BugLink: https://bugs.launchpad.net/bugs/923409
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It turned out that other ASUS laptops require the similar fix to
enable the VREF on the pin 0x0f for the secret output amp, not only
ASUS A6Rp. Moreover, it's required even when the pin is being used
as the output. Thus, writing a fixed value doesn't work always.
This patch applies the VREF-fix for all ASUS laptops with ALC861/660
in a fixup function that checks the current value and turns on only
the VREF value no matter whether input or output direction is set.
The automute function is modified as well to keep the pin VREF upon
muting/unmuting via pin-control; otherwise the pin VREF is reset at
plugging/unplugging a jack.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The user reports that he needs to add model=auto for audio to
work properly. In fact, since node 0x15 is not even a pin node,
the existing fixup is definitely wrong. Relevant information can
be found in the buglink below.
Cc: stable@kernel.org (3.2+)
BugLink: https://bugs.launchpad.net/bugs/918254
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The very same problem is seen on Haier W18 laptop with ALC861 as seen
on ASUS A6Rp, which was fixed by the commit 3b25eb69.
Now we just need to add a new SSID entry pointing to the same fixup.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42656
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HP laptop models with buggy BIOS are apparently frequent, including
machines with different codecs. Set the polarity of the mute led based
on the SSID and include an entry for the HP Mini 110-3100.
Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Tested-by: Predrag Ivanovic <predivan@open.telekom.rs>
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The refactoring of Realtek codec driver in 3.2 kernel caused a
regression for ASUS A6Rp laptop; it doesn't give any output.
The reason was that this machine has a secret master mute (or EAPD)
control via NID 0x0f VREF. Setting VREF50 on this node makes the
sound working again.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent change of the power-widget handling for IDT codecs caused
the silent output from the docking-station line-out jack. This was
partially fixed by the commit f2cbba7602
"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
But the line-out on the docking-station is still silent when booted
with the jack plugged even by this fix.
The remainig bug is that the power-widget is set off in stac92xx_init()
because the pins in cfg->line_out_pins[] aren't checked there properly
but only hp_pins[] are checked in is_nid_hp_pin().
This patch fixes the problem by checking both HP and line-out pins
and leaving the power-map correctly.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It turned out that Nvidial (HDMI) controllers require the buffer
alignment. Thus it's better to mark it requiring the alignment, so that
we can switch to non-aligned behavior as default in future.
Also, change the module paramter to be bint, in order to let user
overriding the default value.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The user reports that model=auto works fine for him. Using
model=auto bring in new features such as jack detection notification
to userspace.
Alsa info is available at http://paste.ubuntu.com/805351/
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit 2ae66c2655
ALSA: hda: option to enable arbitrary buffer/period sizes
introduced a regression on machines with Intel controller and Nvidia
HDMI. The reason is that the driver modifies the global variable
align_buffer_size when an Intel controller is found, and the Nvidia
HDMI controller is probed after Intel although Nvidia chips require
the aligned buffers.
This patch fixes the problem by moving the flag into the local struct
so that it's not affected by other controllers.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42567
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I have been told that this way the rear headphone connector is
working as well; with model=alienware only laptop speakers work.
The subsystem of both controller and codec is 1028:0490.
Signed-off-by: Albert Pool <albertpool@solcon.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now that all quirks have the own unsol handlers, we don't need to check
use_jack_tbl flag any more. Let's kill it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recently added jack-kctl support sets the unsol event tags
dynamically, while static quirks usually set the fixed tags in the
init_verbs array. Due to this conflict, the own unsol event handler
can't retrieve the tag and handle it properly any more.
For fixing this, avoid calling snd_hda_jack_add_kctls() for static
quirks, and always let them use own handlers instead of the standard
one for the auto-pareser.
Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a machine has multiple speakers, we don't need to create the
controls for multi-ios. Check the number of primary outputs beforehand.
Note that this workaround might not work always with new codecs in
future; this assumes that both speakers and multi-io jacks share the
same mixers/DACs. If they are routed with different mixers, the
individual mixer controls should be needed. But, so far, this doesn't
happen with the existing ALC codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
More than one user reports that changing the model from "both" to
"dmic" makes their Internal Mic work.
Cc: stable@kernel.org
Tested-by: Martin Ling <martin-launchpad@earth.li>
BugLink: https://bugs.launchpad.net/bugs/795823
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Several users have reported "choppy" audio under the 3.2 kernel,
and that changing position_fix to 1 has resolved their problem.
The chip is an nVidia Corporation MCP89 High Definition Audio,
[10de:0d94] (rev a2).
Cc: stable@kernel.org (v3.2+)
BugLink: https://bugs.launchpad.net/bugs/909419
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When multiple headphone or other detectable output pins are present,
the power-map has to be updated after resume appropriately, but the
current driver doesn't check all pins but only the first pin (since
it's enough to check it for the mute-behavior). This resulted in the
silent output from the secondary outputs after PM resume.
This patch fixes the problem by checking all pins at (re-)init time.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently the driver checks only the out_mix_path[] for the primary
output route for judging whether to create the loopback-mixing control
or not. But, there are cases where aamix-routing is available only on
headphone or speaker paths but not on the primary output path. So, the
driver ignores such cases inappropriately.
This patch fixes the check of the loopback-mixing control by testing
all mix-routing paths.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When an invalid NID is given, get_wcaps() returns zero as the error,
but get_wcaps_type() takes it as the normal value and returns a bogus
AC_WID_AUD_OUT value. This confuses the parser.
With this patch, get_wcaps_type() returns -1 when value 0 is given,
i.e. an invalid NID is passed to get_wcaps().
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These laptops can work well with the auto-parser and their BIOS setups,
and in addition, the auto-parser fixes the problem with S3/S4 where
the unsol event handling is killed after resume due to fallback to the
single-cmd mode.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This early 2011 model just need to have headphones on GPI02
instead of GPI01, and use BIOS pincfgs.
It is detected by codec SSID.
The iMac12,1 model is known to work the same way, although maybe
not with the same codec SSID.
Signed-off-by: Jérémy Lal <kapouer@melix.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now that we have changed the poulsbo chip to use LPIB position fix,
we can remove the individual machine quirks that do the same thing.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This fixup is not actually used, so in practice this is just a
cosmetic fix.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The CS4213 chip is similar to the CS4210, but it does not have
SPDIF capabilities. Also, it has fewer pins, and the vendor specific
nid is different. With this patch, we have working inputs and outputs
(and automute/autoswitch). However, we don't know anything about
the vendor specific processing coefficients, so we don't read or write
to that node in this patch.
BugLink: https://bugs.launchpad.net/bugs/910792
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There was a bug in the automute logic causing speakers not to
mute when headphones were plugged in.
Cc: stable@kernel.org
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The control name "HP/Speakers" is non-standard, and since there is
only one DAC on this chip there is no need for a virtual master
anyway.
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Oaktrail has 0x8086, 0x080a - AZX_DRIVER_SCH
Taken from the Meego patches for Oaktrail
Signed-off-by: Li Peng <peng.li@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.
It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Several people with this chipset have reported inconsistent/sloppy
values for position reporting when the DMA position buffer is used,
and that setting position_fix=1 have fixed their problems.
BugLink: https://bugs.launchpad.net/bugs/825709
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds HDMI audio support for new AMD products. As HW default
disable snoop, force non-snoop mode in HD audio driver.
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit b99a776d0b removed all effects of
the STAC92HD83* model quirk "hp". However, it left the model selection
and documentation behind, confusing users with inverted mute
leds. Completely remove this quirk and its documentation.
Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some HP laptop models do not have a properly filled OEM string used
to set the gpio and polarity of the mute led. Make the mute led
configuration work for this case.
Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This may lead to problems (like loss of sound) as GPIO pin may be used
for different function (SPDIF OUT, EAPD etc) on those systems. This patch
disables default mute LED GPIO configuration on all new codecs as all new
HP systems are expected to provide explicit mute LED configuration in SMBIOS.
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With the auto-parser we can choose the dac nid for vmaster from
the DACs we already know, instead of hard-coding it. This is more
future-proof and was actually wrong on one machine.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For the Asus 1101HA, reporting position by reading the DMA position
buffer map seems unstable and often wrong. The reporter says that
position_fix=LPIB works much better (although not 100%, but this is
probably due to other issues).
The controller chip is an Intel Poulsbo 8086:811b (rev 07) controller,
and complete alsa-info is available here:
https://launchpadlibrarian.net/86691768/alsa-info.txt.1TNwyE5Ea7
Cc: stable@kernel.org (3.0+)
BugLink: http://bugs.launchpad.net/bugs/825709
Tested-by: Stefano Lodi
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When there are the same or more number of HP pins are available, HP pins
are used as the primary outputs instead of the speaker pins. But, in
some cases (especially with ALC663 & co), some DACs are available only
with a later pin and it's assigned to a speaker, and since the driver
parses the pins from the lower NID, such a DAC was skipped eventually
without assignments. This resulted in a regression, the missing speaker
volume control in the new parser.
As a workaround for this, now the driver retries the pin->DAC mapping
again after restoring the speaker-pins as primary. This is still an ad
hoc fix, but it works so far for most of Realtek codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On systems with two speaker pins, the secondary speaker pin is mostly
assigned to a bass speaker instead of a surround. Thus it makes more
sense to rename the control properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The multiple headphone or speaker pins are usually provided to
output the same stream unlike line-out jacks (which are supposed
to be multi-channel surrounds). Thus giving a mixer name like
"Headphone Surround" is rather confusing. Instead, when multiple
headphone volumes are available, use index with the same "Headphone"
name.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some HP laptops with IDT 92HD75 codecs may use a GPIO > 4 for the mute
LED, but currently the driver doesn't check this properly, and confuses
the mute LED behavior. This ended up with the silent output on some
HP laptops due to having another GPIO used as external amp control.
This patch fixes the problem by checking the max GPIO count and
comparing with the given value from DMI entry instead of magic fixed
value 4 and 8, and adding a new field to indicate the VREF mute-LED
behavior.
Reported-and-tested-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When no imux is available (e.g. a single capture source),
alc_auto_init_input_src() may trigger an Oops due to the access to -1.
Add a proper zero-check to avoid it.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of managing input-jack stuff separately, call all stuff inside
the kctl-jack creation, deletion and report. The caller no longer needs
to care about input-jack.
The better integration between input-jack and kctl-jack should be done
in the upper layer in near future, but for now, it's implemented locally
for more tests.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The verb command in stac92xx_post_suspend caused the audio to stop
working after resuming from S3 mode on HP laptops with the VREF-pin
mute-LED control. Removing relevant post_suspend registering.
Although removing D3 on AFG is no optimal solution, the impact should
be small in comparison with the broken S3/S4.
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This quirk sould be reverted. It has the following probems:
1) The quirk was intended to "ASUS MV2-MX SE" motherboards only, but the
ID used matches a much broader range, potentially all boards containing a
VIA chipset model in the family of vendor VIA 0x1106 and audio device ID
0x3288, which encompasses VIA-VT82xx, VIA-VT1xx and VIA-VT20xx chipsets.
2) VIA chipsets rely on azx_via_get_position() to handle correctly dma
transfers during capture. Using POS_FIX_LPIB instead of POS_FIX_VIACOMBO
leads to partially corrupted input buffers during capture. The effects
of this bug are not immediately visible, it took strong DSP expertise,
some expensive signal generator and a spectrum analyzer to identify it
and verify correct behaviour using original default.
3) It's almost certain that the quirk did not fix the real problem,
if there was one. Refer to original submission:
http://mailman.alsa-project.org/pipermail/alsa-devel/2010-February/025109.html
Signed-of-by: Marc Vertes <mvertes@sigfox.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VT1708 has no support for unsolicited events per jack-plug, the driver
implements the workq for polling the jack-detection. The mixer element
"Jack Detect" was supposed to control this behavior on/off, but this
doesn't work properly as is now. The workq is always started and the
HP automute is always enabled.
This patch fixes the jack-detect control behavior by triggering / stopping
the work appropriately at the state change. Also the work checks the
internal state to continue scheduling or not.
Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The CS420X_IMAC27 was copied from the line before but CS420X_APPLE
was clearly intented.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The new hardware tends to have more and more. As a temporary fix, just
increase the number for now.
For a long-term solution, we should assign the cvts/pins dynamically.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, the driver supports up to 10 streams. This is a restriction in
hda_intel.c and hda_codec.c: in the former, the fixed array size limits
the amount, and in the latter, the fixed device-number assignment table
(in get_empty_pcm_device()) limits the possibility.
This patch reduces the restriction by
- using linked list for managing PCM instances in hda_intel.c, and
- assigning non-fixed device numbers for the extra devices
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(),
the initialization of index field is missing. It may work without it
casually when the original imux was created by the auto-parser, but
it's definitely broken in the case of static configs where no imux was
parsed beforehand. Because of this, the auto-mic switching doesn't
work properly on some model options.
This patch adds the missing initialization of index field.
Reported-by: Dmitry Nezhevenko <dion@inhex.net>
Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The PCI SSID 8086:7270 is commonly used for multiple Apple machines,
thus we can't use it as identifier for a unique model. Because of this
conflict, some machines show weird behavior. For example, MacBook Air
shows Front and Surround speakers although only Surround works due to
the wrongly overridden pin-configuration for imac27.
This patch fixes two things:
- Stop the wrong pin-config override of imac27 by removing PCI SSID
entry for avoiding the wrong mappings,
- Add the generic GPIO setup for Apple machines by checking the codec
SSID vendor bits
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In snd_hda_check_board_codec_sid_config(), not only comparing with the
exact value but allow the bit-mask comparison for vendor-only, etc.
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With the ELD repoll mechanism, we can (and should) fail the ELD reading
immediately when find something obviously wrong and let the caller retry
after some delay.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Improve the one-shot ELD repoll to up to 6 retries.
Up to now the 300ms looks sufficient for the test boxes. However
I'm a bit worried about how well it can fit the wider user base.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The multiple headphone pins are usually handled as copied from the same
source, not as individual channels like front and surround. Thus it'd
be more correct to avoid the channel suffix for "Headphone" pin labels
in snd_hda_get_pin_label() but give an index number instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
spec->cur_adc isn't set until cs_capture_pcm_prepare() is called although
the driver tries to select the connection at init time and at auto-mic
switch. This results in the access to the widget NID 0, which is
obviously invalid, also a wrong capture source.
This patch fixes the issue by issuing the connect-select verb conditionally
at appropriate places.
Reported-and-tested-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The function now gives more unique names for the output pins by adding
some prefix and suffix for the location and the channels. Otherwise, it
can pass the index number.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Otherwise the jack kctls will report invalid values until the jack
is re-plugged.
Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These two functions are being used by the codec-idt and codec-hdmi
modules, so they need to be exported properly.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now move the helper function for creating and reporting the jack-detection
to the common place. The driver that needs this functionality should
select CONFIG_SND_KCTL_JACK kconfig.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Manage the tags assigned for unsolicited events dynamically together
with the jack-detection routines. Basically this is almost same as what
we've done in patch_sigmatel.c. Assign the new tag number for each new
unsol event, associate with the given NID and the action type, etc.
With this change, now all pins looked over in snd_hda_jack_add_kctls()
are actually enabled for detection now even if the pins aren't used for
jack-retasking by the driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Create kcontrols for pin jack-detections, which work similarly like
jack-input layer. Each control will notify when the jack is plugged or
unplugged, and also user can read the value at any time via the normal
control API.
The control elements are created with iface=CARD, so that they won't
appear in the mixer apps.
So far, only the pins that enabled the jack-detection are registered.
For covering all pins, the transition of the common unsol-tag handling
would be needed. Stay tuned.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Introduce a table containing the pins and their jack-detection states
for avoiding the unnecessary verbs to check the pin status at each time.
When the unsol event is enabled via snd_hda_jack_detect_enable(), it
automatically adds the given NID to the table. Then the driver supposes
that the codec driver will set the dirty flag appropariately when an
unsolicited event is invoked for that pin.
The behavior for reading other pins that aren't registered in the table
doesn't change. Only the pins assigned to the table are cached, so far.
In near futre, this table can be extended to use the central place for
the unsolicited events of all pins, etc, and eventually include the
jack-detect kcontrols that replace the current input-jack stuff.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Create a new helper function snd_hda_get_pin_label() for getting a label
string for both input and output pins. hda_get_input_pin_label() is
obsoleted by this function, and the callers are replaced appropriately
now by this patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Intel HDMI chips (ironlake at least) are found to have ~250ms delay
between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes
actually readable. During the time the ELD buffer is mysteriously all 0.
Fix it by scheduling a delayed work to re-read ELD buffer after 300ms.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
memset(eld) clears eld->proc_entry which will leak the struct
snd_info_entry when unloading module.
Fix it by
- memset only the fields before eld->eld_buffer
- set eld->eld_valid to true _after_ all eld fields have been filled
Cc: <stable@kernel.org>
Cc: Pierre-louis Bossart <pierre-louis.bossart@intel.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Translate ALC880 medion-rim static configs to the auto-parser with the
additional GPIO2 verb and COEF setup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The ALC882 macpro and imac24 static configs can be transferred to the
auto-parser with the additional GPIO setup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the commit [c3e837bb: ALSA: hda/realtek - Rewrite ALC882 acer-aspire-*
models with the auto-parser], the check of the model option got removed
mistakenly. Re-added the board_config check again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the pin or the DAC doesn't support the stereo, create a mono
control instead of creating a stereo control blindly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clean up and fix pwr_nids for 92HD71 / 73 / 83 family codecs; remove
pwr_mapping which was incorrect.
The original pwr_nids support of 92HD83xxx was incorrect and never
actually worked before. Now we should have things working correctly
without having to hack by DID anymore.
It is also not necessary to explicitly turn on all the pins near the
beginning of patch_stac92hd83xxx() now, the pins will go though
initialization properly.
Tested on 92HD66 / 71 / 73 / 75 / 83 / 89 / 91 demo boards.
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now we can move the big acer-aspire-* static quirks to the auto-paresr
with some additional pin-configs and verbs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far the driver creates the multi-io jacks only when a single output
jack, i.e. no multiple speakers are assigned. This patch adds the
similar multi-io detection even with multiple speakers are assigned
primarily, so that 5.1-speakers + HP/mic/LI combination can work.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We disabled the check of NO_PRESENCE bit of the default pin-config
in commit f4419172 temporarily. One problem was that the first
implementation was wrong -- the bit after the shift must be checked.
However, this would still give many regressions on machines with broken
BIOS. They set this bit wrongly even on active pins.
A workaround is to check whether all pins contain this bit. As far as
I've checked, broken BIOSen set this bit on all pins, no matter whether
active or not. In such a case, the driver should ignore this bit check.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a virtual mater control is created, the driver looks for slave
elements from the assigned card instance. But this may include the
elements of other codecs when multiple codecs are on the same HD-audio
bus. This works at the first time, but it'll give Oops when it's once
freed and re-created via reconfig sysfs.
This patch changes the element-look-up strategy to limit only to the
mixer elements of the same codec.
Reported-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now we're touching the desktop static configs for ALC88x codecs.
These are mostly OK with the auto-parser, but some models need careful
handling; ALC889 intel mobo requires the COEF setup, and W2JC needs
GPIO1 and COEF.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
All ALC882 targa-* models can be replaced with the auto-parser just
with the additional GPIO3 setup. And it's generically applied to all
MSI boards unless other quirks are present.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove all ALC882 static configurations for all Lenovo and Haier-w66
quirks. They work fine with the auto-parser now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These models work fine with the auto-parser with the additional COEF
setup. The iMac 7,1 (106b:3200) also uses the same quirk, so remove it
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Not only PCI SSIDs but also look through codec SSIDs for fix-up table
entries. MacBook tend to give the same PCI SSID but unique codec SSIDs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The ASUS EEE1601 works almost fine with the auto-parser but the static
configuration has a certain specific COEF verb. Add this to the fix-up
list so that we can drop the whole EEE1601 static config from
alc882_quirks.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the
new model dell-vostro-3500.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
According to the bug reporter, model=auto is needed to make the
internal microphone work.
BugLink: https://bugs.launchpad.net/bugs/819699
Reported-by: Andrej (agno01)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Providing a pincfg fix for VAIO-TT with ALC889 codec to work with the
auto-parser, and drop the static configuration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now that model=ultra is supported well by the auto-parser, we can get rid
of the whole alc262_quirks.c and its related codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A machine like Q1-ultra which has only a single HP but no mic-jack, we
can re-task the headhpone as an external mic jack. This was done formerly
in ALC262 model=ultra quirk, and now the auto-parser supports this mode.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Both entries for ALC262 model=hippo work well with the auto-parser and
the default BIOS setup. No static configs are needed, so drop them.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This model (actually BenQ Joybook) works fine with the default auto-parser
and the BIOS setup. Just drop the static quirks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It works well with the auto-parse and the default BIOS setup when an
additional COEF setup (for benq) is used.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The conversion from ALC262 model=benq and model=benq-t31 static configs
to auto-parser requires the manual COEF setups for corresponding models.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The static quirks for ALC262 Lenovo 3000 can be covered by the auto-
parser with a fixup of the mic-pin to VREF50 and the additional COEF
verb.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This laptop works fine with the current auto-parser and the BIOS setup,
so let's drop the static configuration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use the auto-parser for ALC262 model=toshiba-rx1 with the fixed pin-
configs. The BIOS table seems incorrect, so many pin entries are
overwritten to match with the former quirk.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a Realtek codec has a matrix-style capture-source selection, we
need to scan all connections instead of only imux items. Otherwise some
input might be kept unmuted. Although the corresponding input must be
dead so there should be no input from it, it's still safer to mute the
route completely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
Revert "tracing: Include module.h in define_trace.h"
irq: don't put module.h into irq.h for tracking irqgen modules.
bluetooth: macroize two small inlines to avoid module.h
ip_vs.h: fix implicit use of module_get/module_put from module.h
nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
include: replace linux/module.h with "struct module" wherever possible
include: convert various register fcns to macros to avoid include chaining
crypto.h: remove unused crypto_tfm_alg_modname() inline
uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
pm_runtime.h: explicitly requires notifier.h
linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
miscdevice.h: fix up implicit use of lists and types
stop_machine.h: fix implicit use of smp.h for smp_processor_id
of: fix implicit use of errno.h in include/linux/of.h
of_platform.h: delete needless include <linux/module.h>
acpi: remove module.h include from platform/aclinux.h
miscdevice.h: delete unnecessary inclusion of module.h
device_cgroup.h: delete needless include <linux/module.h>
net: sch_generic remove redundant use of <linux/module.h>
net: inet_timewait_sock doesnt need <linux/module.h>
...
Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
- drivers/media/dvb/frontends/dibx000_common.c
- drivers/media/video/{mt9m111.c,ov6650.c}
- drivers/mfd/ab3550-core.c
- include/linux/dmaengine.h
The implementation on commit [08a1f5eb: ALSA: hda - Check NO_PRESENCE
pincfg default bit] seems like a mis-interpretation of specification.
The spec gives the reversed bit definition. But, following the spec
also causes to change so many existing device configurations, thus we
can't change it so easily for now. For 3.2-rc1, it's safer to revert
this check (actually this patch comments out the code).
We may re-introduced the fixed version once after the wider test-case
coverages are done.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The regression-fix in 3.1 for the check of DMA-position validity caused
yet another regression for CA0110. As usual, this hardware seems working
only with LPIB properly. Adding the appropriate driver-caps bit to force
LPIB fixes the problem.
Reported-and-tested-by: Andres Freund <andres@anarazel.de>
Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The 3.1 kernel has a regression for ALC861 codec where no sound output
is heard with the default setup. It's because the amps in DACs aren't
properly unmuted while the output mixers are assigned only to pins.
This patch fixes the missing initialization of DACs when no mixer is
assigned to them.
Tested-by: Andrea Iob <andrea_iob@yahoo.it>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some BIOS report invalid pins as digital output pins. The driver checks
the connection but it doesn't do it fully correctly, and it leaves some
undefined value as the audio-out widget, which makes the driver spewing
warnings. This patch fixes the issue.
Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Revise stac92xx_parse_auto_config to automatically scan for digital input
and output converters.
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the driver finds multiple ADCs, it tries to create an alternative
capture PCM stream. However, these secondary ADCs might be useless or
in uncontrolled paths in some cases, e.g. when auto-mic or dynamic
ADC-switching is enabled. Also, when only a single capture source is
available, the multi-streams don't make sense, too.
With this patch, the driver checks such condition and skips the alt
stream appropriately.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These codecs have SPDIF-in, which is new to the 92HD83xxx compatible
families, so a bit of logic is added to support them.
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The power-widget control in patch_stac92hd83xxx() never worked properly,
thus it's safer to turn it off as default for now.
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HD-audio spec defines a bit in pin default configuration for indicating
that the pin isn't used for jack-detection although the codec is capable
of it. Better to check this bit as well in jack_is_detectable() helper
function.
Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If a line in the firmware file is larger than the given buffer size (and
so the firmware file size), size is set to a value larger than the actual
buffer size. This results in an overflow in the buffer passed.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These aren't modules, but they do make use of these macros, so
they will need export.h to get that definition. Previously,
they got it via the implicit module.h inclusion.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up. So
fix up those users now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
The implicit presence of module.h lured several users into
incorrectly thinking that they only needed/used modparam.h
but once we clean up the module.h presence, these will show
up as build failures, so fix 'em now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
It seems that Conexant CX20549 chip handle only a single input-amp even
though the audio-input widget has multiple sources. This has been never
clear, and I implemented in the current way based on the debug information
I got at the early time -- the device reacts individual input-amp values
for different sources. This is true for another Conexant codec, but it's
not applied to CX20549 actually.
This patch changes the auto-parser code to handle a single input-amp
per audio-in widget for CX20549. After applying this, you'll see only a
single "Capture" volume control instead of separate "Mic" or "Line"
captures when the device is set up to use a single ADC.
We haven't tested 20551 and 20561 codecs yet. If these show the similar
behavior like 20549, they need to set spec->single_adc_amp=1, too.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the old Conexant chips (5045, 5047, 5051 and 5066), a single EAPD
may handle both headphone and speaker outputs while it's assigned only
to one of them. Turning off dynamically leads to the unexpected silent
output in such a configuration with the auto-mute function.
Since it's difficult to know how the EAPD is handled in the actual h/w
implementation, better to keep EAPD on while running for such codecs.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALC260 has multiple mixer widgets connected to the shared DAC, but the
driver currently doesn't check this possibility and ignores when the DAC
is shared with others. This resulted in the silent output from some
routes because of lack of the amp setup.
This patch adds the workaround for it by checking the route even with the
shared DAC, but also checking the conflict with the existing control for
the very same widget NID.
Reference: https://bugzilla.novell.com/show_bug.cgi?id=726812
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The association numbers of surround/CLFE speaker pins aren't correctly
mapped by the auto-parser. This patch fixes the CLFE speaker pin to the
right assoc value (from 3 to 1).
Tested-by: Nika Topolchanskaya <nanodesuu@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When 5.1 or more headphone or speaker pins are provided, the parser still
takes as is without fixing the order of channel mapping, which leads in
the unexpected strange channel order by surround outputs.
This patch fixes the issue by applying the same fix-up not only to
line_out_pins[] but also hp_pins[] and speaker_pins[].
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The revision 0x100300 was found for ALC662. It seems to work well
with patch_alc662.
Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/877373
Tested-by: Shengyao Xue <Shengyao.xue@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a device has multiple speakers and still has the auto-mute support,
the driver copies line_outs[] to speaker_outs[]. And then it tries to
assign DACs for both. This ended up with the assignment only to the
primary DAC to all speakers.
This patch fixes the situation by checking the duplicated LO/SPK case
appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is patch for Conexant codec of Intel HDA driver, adding new quirk
for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
T520 (similar subsystem ID is used also in W520 model) and detects more
mixer features compared to generic (fallback) Lenovo quirk with
hardcoded options in Conexant codec.
Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
problems.
Signed-off-by: Daniel Suchy <danny@danysek.cz>
Cc: <stable@kernel.org> [3.0+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous fix for the position-buffer check gives yet another
regression on a Dell laptop. The safest fix right now is to add a
static quirk for this device (and better to apply it for stable
kernels too).
Reported-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The COEF #0 value represents a sort of device id, so it's supposedly
constant while operation. Better to use the cached value instead of
reading it at each time from the performance POV.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use a static table for detecting the codec renames.
Also clean up the error paths in each patch_*() function.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This typo caused headphone pins not to be initialized correctly.
BugLink: https://bugs.launchpad.net/bugs/871582
Reported-by: Effenberg
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The purpose of this patch is to remove a section of "bad" code that
assigns the last DAC to ports E or F in order to support notebooks
with docking in earlier days, around ALSA 1.0.19 - 21. This is not
necessary now and actually breaks some configurations that use these
ports as other devices. This have been tested on several different
configurations to make sure that it is working for different combinations.
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit ef18beded8 introduced a
mechanism to assign the previously used slot for the next reopen of a
PCM stream. But the PCM device number isn't always unique (it may
have multiple substreams), and also the code doesn't check the stream
direction, thus both playback and capture streams share the same
device number.
For avoiding this conflict, make a unique key for each substream and
store/check this value at reopening.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the speaker outputs are more than the headphone outputs, it implies
that the system has surround speakers while the headphones are only for
monitoring the front. In such a case, it's better to put speakers as
the primary outputs so that the driver can build up and keep the
surround setup. Otherwise the system will pick up the headphone as
primary, and offers less channels than the speakers do support.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since hda_proc.c is now the only user of snd_print_pcm_rates(), better to
put it back locally to hda_proc.c and revert to the old style.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
SAD sampling rate information reported in
/proc/asound/cardX/eldX is incorrect due to a mismatch
between HDA and HDMI frequencies. Add new routine to provide
relevant values.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Similar to Line Out, these constants form the base for future
patches enabling input jack reporting for Line in jacks.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If we run out of DACs when trying to assign a DAC to a secondary
headphone, prefer the DAC of the first headphone to the primary
(usually line out) DAC.
BugLink: http://bugs.launchpad.net/bugs/845275
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Sigmatel/IDT parser should have the same naming convention
for input jacks as the other codecs have.
BugLink: http://bugs.launchpad.net/bugs/859704
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Applications may want to read ELD information to
understand what codecs are supported on the HDMI
receiver and handle the a-v delay for better lip-sync.
ELD information is exposed in a device-specific
IFACE_PCM kcontrol. Tested both with amixer and
PulseAudio; with a corresponding patch passthrough modes
are enabled automagically.
ELD control size is set to zero in case of errors or
wrong configurations. No notifications are implemented
for now, it is expected that jack detection is used to
reconfigure the audio outputs.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit a810364a04
ALSA: hda - Handle -1 as invalid position, too
caused a regression on some machines that require the position-buffer
instead of LPIB, e.g. resulting in noises with mic recording with
PulseAudio.
This patch fixes the detection by delaying the test at the timing as
same as 3.0, i.e. doing the position check only when requested in
azx_position_ok().
Reported-and-tested-by: Rocko Requin <rockorequin@hotmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the ugly real world, there area really broken devices that don't set
codec SSID correctly. In such a case, the ID can be random, thus the
patching won't work reliably.
For applying the patch forcibly to such a device, the driver will skip
the vendor and/or subsystem ID checks when zero or a negative number is
given in [codec] section.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added a new option "snoop" for the traffic control of the HD-audio
controller chip. When set to 0, the non-snooping mode is used with
the traffic control bit is set in each stream control register.
This may allow better operations in the low power mode, but the actual
implementation is depending pretty much on the chipset.
As already implemented, more or less each chipset has own snoop-control
register bit. Now this setup refers to the snoop option, too.
Also, a new VIA chipset may require the non-snooping mode when set so
in BIOS. In such a case, the option value is overridden.
As default, it's still set to snoop=1 for keeping the same behavior as
before. In near future, it'll be set to 0 as default after checking
it works in every system well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since really_cleanup_stream() is called from both purity_inactive_streams()
and hda_cleanup_all_streams(), the verbs to clear the PCM channel and
format may be called multiple times unnecessarily.
This patch adds checks to skip these unneeded verbs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The spec->autocfg.line_out_pins[] may contain the same pins as hp_pins[]
depending on the configuration. When they are identical, detecting the
line_jack_present flag screws up the auto-mute because alc_line_automute()
is called unconditionally at initialization while it won't be triggered
by unsol events, thus the old line_jack_present flag is kept for the
whole run.
For fixing this buggy behavior, the driver needs to check whether the
line-outs are really individual, and skip if same as headphone jacks.
Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the headphone pin is assigned as primary output to line_out_pins[],
the automatic HP-pin assignment by ASSID must be suppressed. Otherwise
a wrong pin might be assigned to the headphone and breaks the auto-mute.
Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
This patch is necessary to make internal speakers work on this chip.
Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/854468
Tested-by: Alex Wolfson <alex.wolfson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
- Add "AD198x Headphone" playback device for independent headphone playback
while playing 7.1 surround using rear panel audio jacks.
- Remove "6stack-dig-fp" model since "Headphone Playback Volume" control using
DAC0 instead of DAC1 (HDA_FRONT) was already added to all models.
- Add "Independent HP" switch to enable/disable this playback device.
When the switch is OFF, headphone use "copy front" mode to get the front
channel as the green jack.
When the switch is ON, you can play stereo sound through "AD198x Headphone"
device to headphone while playing 7.1 surround sound through "AD198x Analog"
device.
The switch cannot be changed when either "AD198x Headphone" or "AD198X Analog"
is open.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since modern HDMI cards often have more than one output pin and thus
input device, we need to know which one has actually been plugged in.
This patch adds a name hint that indicates which PCM device is connected
to which pin.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Increase readability and understandability in the automute code.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the system has only the headphone and the line-out jacks without
speakers, the current auto-mute code doesn't work. It's because the
spec->automute_lines flag is wrongly referred in update_speakers().
This flag must be meaningless when spec->automute_hp_lo isn't set, thus
they should be always coupled.
The patch fixes the problem and add a comment to indicate the
relationship briefly.
BugLink: http://bugs.launchpad.net/bugs/851697
Reported-by: David Henningsson <david.henningsson@canonical.com>
Tested-By: Jayne Han <jayne.han@canonical.com>
Cc: stable@kernel.org (3.0)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes "Surround Speaker Playback Volume" being cut off.
(Commit b4dabfc452 was probably meant to fix this, but it fixed
only the "Switch" name, not the "Volume" name.)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recursive search of widget connections in snd_hda_get_conn_index()
must be terminated at the pin and the audio-out widgets. Otherwise
you'll get "too deep connection" warnings unnecessarily.
Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
- use DAC0 instead of DAC1 for Port-A Headphone
- assign 0x03 to spec->multiout.hp_nid except model="6stack-dig-fp"
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Headphones has stopped working for the original reported (a regression
compared to 2.6.38). This is because Speaker and Headphones share the
same DAC, in which case no Headphones volume control was created.
This patch fixes so that both Speaker and Headphones volume
controls are created in such scenario.
BugLink: http://bugs.launchpad.net/bugs/817943
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>