A machine with AMD CPU with Nvidia board doesn't work with MSI.
Reported-by: Robert J. King <peritus@gurunetwork.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With the attached patch I am able to use the sound on a new IMac 27.
What works:
*) Internal speakers
*) Internal microphone
*) Headphone
I don't have an external mic or a SPDIF device to test the rest.
Signed-off-by: Rafael Avila de Espindola <rafael.espindola@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current Realtek code makes no specific provision for turning stuff
off. The codec chip is placed into low-power mode generically, but this
doesn't turn off any external hardware connected to it, in particular
external amplifiers.
This patch creates a hook function that is called by the codec
suspend/resume functions. It ought to disable any external hardware in a
device-specific way. I've implemented a generic ALC889 function that
sets the EAPD pin properly, and used it for the Acer Aspire 8930G which
can benefit from this feature.
On my laptop, this results in ~0.5W extra savings.
Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch removes some extra mixers that do nothing on the Acer Aspire
8930G.
The CD mixer is useless because the SATA DVD/Blu-Ray drive has no analog
audio output, and the Side mixer is useless because we max out at 6ch
anyway.
Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch just simplifies the 8930G verb array a bit. Just use the
common ALC889 EAPD verb array to make things more consistent. The file
is already huge enough already.
Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/479373
The OR has verified with hda-verb that the internal microphone needs
VREF50 set for audible capture.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use kzalloc rather than kcalloc(1,...)
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
@@
- kcalloc(1,
+ kzalloc(
...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of listing all individual PCI IDs, check the matching with
the PCI class together with the vendor id for Nvidia.
This simplifies the pci id entries.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some model quirks missed the corresponding capsrc_nids. This resulted in
non-working capture source selection.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
Conexant CX20583-10Z has digital beep device with volume control.
Making use of them.
Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixed initialization of internal mic and added internal mic boost control
Renamed analog mic boost control to ext mic boost contol.
Name pair analog/digital seems too confusing for a normal user.
Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1. Add more ASUS NB model.
2. Fixed alc663_m51va_setup
M51VA has Digital Mic that NID is 0x12. The record source index is
0x9 for ALC663.
So, to modify the alc663_m51va_setup function to index 0x9
and add analog Mic aupport function alc663_mode1_setup.
3. Add ASUS mode7 and mode8 modules for ALC663
Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: ac97_codec - increase timeout for analog sections to 5 second
ASoC: Correct code taking the size of a pointer
ALSA: hda - Add PCI IDs for Nvidia G2xx-series
ALSA: sound/isa/gus: Correct code taking the size of a pointer
ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.
It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
text data bss dec hex filename
64688 584 592 65864 10148 (TOTALS-BEFORE)
64641 584 592 65817 10119 (TOTALS-AFTER)
Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making it redundant. In other words,
"a char equals zero is never a space".
Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
and found occurrences of this pattern on 3 more files:
drivers/leds/led-class.c
drivers/leds/ledtrig-timer.c
drivers/video/output.c
@@
expression str;
@@
( // ignore skip_spaces cases
while (*str && isspace(*str)) { \(str++;\|++str;\) }
|
- *str &&
isspace(*str)
)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: David Howells <dhowells@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Previously, OLPC support for the mic extensions was only enabled in the
ALSA driver if CONFIG_OLPC and CONFIG_MGEODE_LX were both set. This was
because the old geode GPIO code was written in a manner that assumed
CONFIG_MGEODE_LX. With the new cs553x-gpio driver, this is no longer the
case; as such, we can drop the requirement on CONFIG_MGEODE_LX and instead
include a requirement on GPIOLIB.
We use the generic GPIO API rather than the cs553x-specific API.
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move
get_amp_nid_() call to the snd_hda_ctl_add() function.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The purpose of this changeset is to show information about amplifier
setting in the codec proc file. Something like:
Control: name="Front Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Control: name="Front Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=2, ofs=0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This set of changes add missing NID values to some static control
elemenents. Also, it handles all "Capture Source" or "Input Source"
controls.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
I have a Soundblaster 16PCI. For many years, alsa has had a bug where
not all of the card's controls are detected (many alsa versions,
many kernel versions). In particular, Master Playback Volume is
usually not detected, and so I get no sound or extremely faint sound.
The problem has always been inconsistent: sometimes all of the controls
are detected correctly, and sometimes a partial set is detected. It works
correctly about 10% of the time.
Finally, I got around to tracking down the problem. When the driver
fails, it prints the kernel message "AC'97 0 analog subsections not
ready". This message is generated from the function snd_ac97_mixer()
in ac97_codec.c. The message indicates that the card failed to come
back after reset within the time limit. The time limit is
120 milliseconds.
I tried increasing the time limit to 1 second, and found that this
made the driver work about 70% of the time. I tried increasing it
to 5 seconds, and it now seems to work 100% of the time.
I expect that this change would be completely harmless for
existing cards that work, and would only introduce additional
delay for cards that do not work.
ALSA bug#4032.
Signed-off-by: Steve Soule <sts11dbxr@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
BugLink: https://bugs.launchpad.net/bugs/461062
The original reporter states that PCM maxes at +12 dB and results in
very bad distortion. Cap PCM at 0 dB to resolve this symptom.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/418627
The original reporter states that this quirk is necessary to obtain
reasonable gain for playback. Without it, sound is inaudible. Tested
with playback (spkr and hp) and capture.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Overwrite pin config on intel DG45ID board.
intelhdmi - dont power off HDA link
ALSA: hrtimer - Fix lock-up
ALSA: intelhdmi - add channel mapping for typical configurations
ALSA: intelhdmi - channel mapping applies to Pin
ALSA: intelhdmi - accept DisplayPort pin
ALSA: hda - show HBR(High Bit Rate) pin cap in procfs
ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
ASoC: Fix build of OMAP sound drivers
ALSA: opti93x: fix irq releasing if the irq cannot be allocated
The pin config provided by BIOS have some problems:
0x0221401f: [Jack] HP Out at Ext Front <-- other association and sequence
0x02a19020: [Jack] Mic at Ext Front <-- other association
0x01113014: [Jack] Speaker at Ext Rear <-- line out (not speaker)
0x01114010: [Jack] Speaker at Ext Rear <-- line out
0x01a19030: [Jack] Mic at Ext Rear <-- other association
0x01111012: [Jack] Speaker at Ext Rear <-- line out
0x01116011: [Jack] Speaker at Ext Rear <-- line out
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x01451140: [Jack] SPDIF Out at Ext Rear
0x40f000f0: [N/A] Other at Ext N/A
just overwrite it.
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For codecs without EPSS support (G45/IbexPeak), the hotplug event will
be lost if the HDA is powered off during the time. After that the pin
presence detection verb returns inaccurate info.
So always power-on HDA link for !EPSS codecs.
KarL offers the fact and Takashi recommends to flag hda_bus. Thanks!
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
IbexPeak is the first Intel HDMI audio codec to support channel mapping.
Currently the outstanding problem is, the HDMI channel order do not
agree with that of ALSA. This patch presents workaround for some
typical use cases. It gives priority to the typical ALSA surround
configurations, and defines channel mapping for them.
We may need better kernel+userspace interactive channel mapping scheme.
For example, in current scheme if user plays with the surround50 device,
the kernel is unaware of this and will still select the surround41
channel allocation and channel mapping..
Thanks to Marcin for offering good tips!
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HDA036-A specifies that the Audio Sample Packet (ASP) Channel Mapping
verbs apply to Digital Display Pin Complex instead of Converter.
With this fix, channel mapping is working as expected for IbexPeak.
Thanks to Marcin for pointing this out!
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HDA036 spec states:
DP (Display Port) indicates whether the Pin Complex Widget supports
connection to a Display Port sink. Supported if set to 1. Note that
it is possible for the pin widget to support more than one digital
display connection type, e.g. HDMI and DP bit are both set to 1.
Also export the DP pin cap in procfs.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Note that the HBR capability only applies to HDMI pin.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes an error in processing of the HP BIOS configuration to enable
GPIO based mute LED indicator control. That error causes driver to enable
such control on all HP systems with the 92HD75 IDT codecs and results in
unnecessary toggling of the GPIO on mute control manipulation.
It also adds support of the future HP BIOS configuration extension for the
named control. New configuration string has a format HP_Mute_LED_P_G
where P can be 0 or 1 and defines mute LED GPIO control state (low/high)
that corresponds to the NOT muted state of the master volume
and G is the index of the GPIO to use (0..9)
Lastly, it adds more systems to the support of the audio implementation
as found on HP B-series systems
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The volume levels in original implementation are incorrect and does
not match the dB scale. The real range is linear (in the sense of
the dB scale) from 0dB to -100dB. Remove logaritmic table and make
all volumes from range 0dB..100dB.
The tests are in RedHat's bugzilla #540817.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Quirk for the ALC662 found on the Intel D945GCLF2 (and possibly other)
mainboards.
Signed-off-by: David Santinoli <david@santinoli.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Confirmed from vendor and tests in RedHat bugzilla #536782 .
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On Realtek codecs, a digital mic pin is connected often only to a single
ADC. But the parser tries to set up all ADCs no matter whether the
digital mic is available, and results in non-selectable input source.
This patch adds a check of input-source availability of each ADC, and
excludes ones that don't support all input sources.
Reference: Novell bnc#561235
http://bugzilla.novell.com/show_bug.cgi?id=561235
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is an updated patch for the Apple iMac 9,1 model to add sound.
Original patch posted here:
http://article.gmane.org/gmane.linux.alsa.devel/61361/match=
I have been using this patch for a while now
and have to say it works vary well, except for a few minor
things:
With the iMac 24-inch 3.06GHz Intel Core 2 Duo
everything seems to be working as it should,
although I have not looked into the microphone
(never really use one, nor have any apps to test,
my guess is it doesn't work, or I never figured out how
to get it to work).
With the iMac 24-inch 2.66GHz Intel Core 2 Duo
everything is the same as with the above machine
except I'm hearing a light scratchy/distortion noise
come out of the speakers when using headphones(above machine
does not do this).
Other than that the sound level is great(especially with good Dj headphones).
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When primary AC97 is not found, don't fail with tons of AC97 errors.
Assume that the card is SF64-PCR (tuner-only).
This makes the SF64-PCR radio card work "out of the box".
Also fixes a bug that can cause an oops here:
if (tea575x_tuner > 0 && (tea575x_tuner & 0x000f) < 4) {
when tea575x_tuner == 16, it passes this check and causes problems
a couple lines below:
chip->tea.ops = &snd_fm801_tea_ops[(tea575x_tuner & 0x000f) - 1];
Tested with SF64-PCR, but I don't have any of those sound or sound+radio cards
to test if I didn't break anything.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
FSC Amilo Pi 1505 has a buggy BIOS and doesn't set up the HP and
speaker pins properly. Add the pinfix entry for that.
Reference: Novell bnc#557403
https://bugzilla.novell.com/show_bug.cgi?id=557403
Signed-off-by: Takashi Iwai <tiwai@suse.de>
STAC/IDT codecs seem to behave weird when SET_PIN_SENSE verb is issued
before reading the jack-detection although the TRIG_REQ pin capability
is given by the hardware.
Since snd_hda_jack_detect() issues the SET_PIN_SENSE verb simply judging
from the pincap, we have to revert the change in the commit
d56757abc1
ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
to plain GET_PIN_SENSE verb without triggering.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4792
Cristian reported that these models have really bad sound above 6 dB
and proposed the original patch. I've updated the comment to reflect
this change.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Reported-by: Cristian Klein
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/487884
This Gateway model needs External Amplifier muted for audible playback,
so set the inv_eapd quirk for it.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dell Vostro 1015n uses Conexant CX20583-10Z (0x14f1:5067). Patch is
based on "olpc-xo-1_5" branch. Dell uses digital mic.
Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit f2624791a0.
Łukasz Wojniłowicz reported that the change causes both internal and
external mics not working any more. The headphone jacking issue was
fixed by his previous patch, it's better to revert to acer-aspire-4930g
model.
Reported-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
CONFIG_SND_JACK needs to be selected explicitly only when INPUT=y or
INPUT_SND. The current way, INPUT=SND_HDA_INTEL isn't strict enough.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Change the quirk for Acer Aspire 5930G from model=acer-aspire-4930g to
model=acer-aspre-6530g. The tuba bass gets muted along with the other
built-in speakers upon headphones insertion, the internal mic works
perfectly etc.
Reported-by: Claudio Viano <claudio.viano@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The mute-LED isn't synchronized with the actual mute state on some
HP laptops with IDT 92HD83xxx codecs. A similar hack using
check_power_status callback is added for this codec, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The dual-headphone mode with STAC/IDT codecs is useful only for machines
that have two (or more) built-in headphones.
But, some HP laptops give multiple headphone pin configs, one for the
built-in and another for the separate (likely a docking station) one.
This results in a missing speaker volume control.
This patch adds more check for the dual-headphone mode to avoid this
problem.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We tracked down the first-0.5s-hdmi-audio-samples-lost problem to the
AC_VERB_SET_CHANNEL_STREAMID command. It is suspected that many HDMI
sinks need some time to adapt to the new state.
The workaround is to avoid changing stream id/format whenever possible.
Proposed by David.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remember the active infoframe, so as to avoid stop/restart infoframe
transmission when switching between audio clips of the same format.
Proposed by Shang and David.
CC: Shane W <shane-alsa@csy.ca>
CC: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
And make it right when called for more than one times.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This avoids lost of presence info on module reloading.
The presence info used to be only updated at the (rare) hotplug events.
Proposed by David, thanks!
CC: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The ALC262 has a quirk entry matching with all Sony Vaio laptops
to use model=sony-assamd as default. But, model=auto works much better
for new models in the recent driver versions, thus it's safer to disable
that default quirk entry.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vaio type G laptop doesn't work with the current quirk setup.
After some tests, it turned out that it should be model=auto as default.
Reported-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The beep_mode option value was wrongly defined: it must be 0 = off and
1 = on.
Also, evaluate the beep_mode value at snd_hda_attach_beep_device()
properly so that no device is created when beep_mode=0 is given.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds support for dynamically created controls to proc codec file
(Control: lines).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The beep_mode parameter for snd-hda-intel module allows to choose among
different digital beep device registation to the input layer.
0 = do not register to the input layer
1 = register to the input layer all time
2 = use "Beep Switch" control exported to user space mixer applications
Also, introduce CONFIG_SND_HDA_INPUT_BEEP_MODE for default value.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The unregister work should be also canceled in snd_hda_detach_beep_device()
function.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The massive register/unregister calls for input device layer might be
overkill. Delay unregister call by one HZ as workaround.
Also, as benefit, beep->enabled variable is changed immediately now
(not from workqueue).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.
Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a clean up and doesn't change the behavior.
Bit fields should always be unsigned. Otherwise pm_suspend_enabled will
be -1 when you want it to be 1. The other bad thing is that the sparse
checker will complain 36 times if they aren't unsigned.
The other bitfields in that struct are unsigned already.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add proper suspend/resume code for Juli@ cards. Based on ice1724
suspend/resume work of Igor Chernyshev.
Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413
Tested on linux-2.6.31.6
Signed-off-by: Aleksey Kunitskiy <alexey.kv@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c: In function 'via_hp_bind_automute':
sound/pci/hda/patch_via.c:2074: internal compiler error: in do_SUBST, at combine.c:462
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[added a comment by tiwai]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
CONFIG_SND_HDA_POWER_SAVE is independent from CONFIG_SND_HDA_HWDEP.
Thus snd_hda_hwdep_add_power_sysfs() needs the check of both kconfigs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit e330323520
"ALSA: hda - proc - show which I/O NID is associated to PCM device"
introduces the access to substream pointer. But, PCMs may have no
substreams in one or both directions, and this results in NULL
dereference. Also, print the first substream number doesn't make
sense.
This patch removes the access to the substream pointer, and reformat
to fit to the standard coding style.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/462098
Until we can look closer at the verbs, let's use ALC885_MB5 for
codec SSID 0x106b4600 to enable playback and capture for MacBookPro
5,2s.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the power on/off counter and expose via sysfs files.
The sysfs files, power_on_acct and power_off_acct, are created under
each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0).
The files show the msec length of the codec power-on and power-off,
respectively.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.
Reference: Novell bnc#552154
https://bugzilla.novell.com/show_bug.cgi?id=552154
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add reboot notifier to each codec so that it can do some workarounds
needed for reboot.
So far, patch_sigmatel.c calls its shutup routine for avoiding noises
at reboot on some HP machines.
References: Novell bnc#544779
http://bugzilla.novell.com/show_bug.cgi?id=544779
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/478309
The internal microphone on this VAIO model does not work unless the
"auto" quirk is used.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch was generated by
git grep -E -i -l 's(le|el)ct' | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/
with only skipping net/netfilter/xt_SECMARK.c and
include/linux/netfilter/xt_SECMARK.h which have a struct member called
selctx.
Signed-off-by: Uwe Kleine-Knig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
something-bility is spelled as something-blity
so a grep for 'blit' would find these lines
this is so trivial that I didn't split it by subsystem / copy
additional maintainers - all changes are to comments
The only purpose is to get fewer false positives when grepping
around the kernel sources.
Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
So far, CORB/RIRB still remains even if the driver is switched to the
single_cmd mode. The specification says that this should be disabled,
but I hoped this isn't the case; indeed most devices worked together with
CORB/RIRB.
However, Poulsbo (US15W) seems problematic with this setup, and it
requires to disable CORB/RIRB when single_cmd is used.
Now this patch disables CORB/RIRB initialization when the single_cmd
mode is used. Also the unsolicited event is disabled because it can't
work without RIRB.
Reported-and-tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some laptops cause annoying clicks or noises at shutdown/reboot since
the speaker pin is set still high. Apply the same procedure used for
the suspend to avoid such clicks/noises for freeing the codec, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Function hp_bseries_system() is always used, outside of
CONFIG_ boundaries/controls, so move it.
sound/pci/hda/patch_sigmatel.c:5458: error: implicit declaration of function 'hp_bseries_system'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.
Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/474972
This Sony model needs External Amplifier muted for audible playback, so
make sure we set the inv_eapd quirk.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The XO-1.5 laptop now has a unique subvendor/subproduct ID, which can
be used to automatically select the correct CXT5066 configuration.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch enables GPIO to control mute LED indicator on the HP systems
with the special string in BIOS and applies it with the correct polarity on
HP B-series systems.
It also restores configuration of the pin intended as the second Headphone
on HP B-series systems but configured as something else in the BIOS to
pass MS DTM.
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alc_automute_pin() might be called even if any HP pin is defined, and
it will result in verbs with NID=0.
This patch adds a check for the validity of HP widget before issuing
any verbs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/368629
We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When any codec communication error happens, try to switch to the polling
mode first before turning off MSI. MSI gets more stable nowadays, thus
we should keep it on as much as possible.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Activate the DXS volume controls only when the corresponding stream is
being used. This makes the behaviour consistent with the other drivers
that have per-stream volume controls.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added a proper ifdef CONFIG_SND_DEBUG_VERBOSE to avoid a compile warning:
sound/pci/hda/patch_intelhdmi.c:406: warning: ‘hdmi_get_channel_count’ defined but not used
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.
In dac_audio_write() there does not occur a test for wrapped
values, but the test appears redundant.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for VT1818S codec, which is similiar with VT1708S.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.
In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
// <smpl>
@match exists@
expression x, E;
identifier fld;
@@
* x->fld
... when != \(x = E\|&x\)
* x == NULL
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Intel IbexPeak HDMI codec supports 2 converters and 3 pins,
which requires converting the cvt_nid/pin_nid to arrays.
The active pin number (the one connected with a live HDMI monitor/sink)
will be dynamically identified on hotplug events.
It exports two HDMI devices, so that user space can choose the A/V pipe
for sending the audio samples.
It's still undefined behavior when there are two active monitors
connected and routed to the same audio converter.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The new Intel HDMI codec supports 2 independant HDMI/DisplayPort pipes.
We'll be exporting them as 2 pcm devices. So bump up the allowed number
of HDMI devices.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This unifies the code and data structure,
and makes it easy to add more HDMI devices.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
An earlier patch merely adds id for 0x80862804.
It has 2/3 cvt/pin nodes and shall be tied to the IbexPeak handler.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.
Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The ALC662/663 parser calls wrongly alc880_auto_create_input_ctls()
to check the capture source selections. This should be alc882, instead.
Reference: Novell bnc#546918
http://bugzilla.novell.com/show_bug.cgi?id=546918
Signed-off-by: Takashi Iwai <tiwai@suse.de>
48 kHz limit is for slightly better stability, and sample rates other
than 48k (like 96k/192k) are for better sound quality.
We choose better quality, so remove the 48k limit.
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the commit f0613d5752
ALSA: hda - Add full rates/formats support for Nvidia HDMI
the flag LIMITIED_RATE_FMT_SUPPORT was set as default, as I forgot
to clear before commit.
Let's enable all formats/rates as default.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The volume-knob widget needs to be set with 0x7f instead of 0xff
for Dell laptops with STAC9228 codec, too, like the previous commit.
Reference: Novell bnc#545013
http://bugzilla.novell.com/show_bug.cgi?id=545013
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On FSC laptops, the sound gets muted gradually when the volume is chnaged.
This is due to the wrong volume-knob widget setup. The delta bit (bit 7)
shouldn't be set for these devices.
This patch adds a new quirk to set the value 0x7f to the widget 0x24
instead of 0xff.
Reference: Novell bnc#546006
http://bugzilla.novell.com/show_bug.cgi?id=546006
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALC861-VD lenovo model causes overflow of spec->init_verbs entries due to
the recent changes. Simply increase the array size to avoid the overflow.
Reported-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.
Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixes:
sound/pci/hda/patch_via.c: In function 'patch_vt1718S':
sound/pci/hda/patch_via.c:4951: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1716S':
sound/pci/hda/patch_via.c:5441: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt2002P':
sound/pci/hda/patch_via.c:5794: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1812':
sound/pci/hda/patch_via.c:6148: error: expected expression before 'return'
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.
Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
According to customer request, hp should be default to redirected mode,
i.e. PW4 connect select default to to MW0.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
To via_control_templates[].
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As init verbs, vt17xx_volume_init_verb is a better place to hold them.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With snd_hda_override_amp_caps.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Replaced with via_playback_multi_pcm_prepare/cleanup to support
multi-stream operations
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
like seqassoc 0xff, seqassoc 0xf0 of vt1708 should override Port
Connectivity field into 'AC_JACK_PORT_COMPLEX'
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VT1708 does not support unsolicited response, but we need hp detect to
automute speaker. Implemented in workqueue.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Smart 5.1 is for 3-jacks model, to reuse input pins as outputs.
While off, they act as "line out" / "line in" / "mic in".
While on, they acts as "line out" / "back left/right" / "center/lfe".
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use hp_independent_mode_index to store hp index, and simplify function
via_independent_hp_put with it.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For VT1708S and VT1702, deactivate "Headphone Playback Volume" and
"Headphone Playback Mute" control if "Independent HP" mode is OFF.
and rename VT1702 "Independent HP" text.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For VT1708B, VT1708S and VT1702, enter low current mode if no analog
stream is opened and all aa path mute.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Enter low power state if AA-Path volume is muted.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
according to customer request, VT1702 AA-Path max volume (12 dB) is too
high, so limit to 0 dB.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
IS_VT17*_VENDORID macros are used nowhere, so clean them up.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the num_total_dacs setting for Chaintech AV710. The existing comment
that only PSDOUT0 is connected is correct, but since the card is using
packed AC97 mode to send 6 channels to the codec, num_total_dacs should be
set to 6 and not 2. This allows 6-channel surround to work. Also clarify
a comment regarding the additional WM8728 codec on this card (it's connected
to the SPDIF output and always receives the same data).
Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow Nvidia HDMI to support more possible sample rates and formats.
At best, the really supported rates and formats should be determined
together with the negotiation with the HDMI receiver, but it's currently
not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3
standard in this regard). As a compromise, we enable all bits, assuming
that all recent devices do support such rates/formats.
Tested-by: Alan Alan <alanwww1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Increase the default and maximum PCM buffer prellocation size for ice1724's
SPDIF and independent stereo pair outputs to 256K, which is the hardware's
maximum supported size. This allows a reduction in interrupt rate and
potentially power usage when an application is not latency-critical.
Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PLEASE NOTE - this change requires the corresponding update of
envy24control for ice1712 - kind of an ABI change.
* The "Multi Track Peak" control is read-only level meters indicator.
* The control is VERY confusing to most users since it is currently displayed
in regular mixers. E.g. alsamixer ignores its read-only status
and allows changing the levels with keys which makes no sense.
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing. Otherwise the indices for
int/ext mics aren't set properly.
Reference: Novell bnc#544899
http://bugzilla.novell.com/show_bug.cgi?id=544899
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The "VIA DXS" controls are actually volume controls that apply to the
four PCM substreams, so we better indicate this connection by moving the
controls to the PCM interface.
Commit b452e08e73 in 2.6.30 broke the
restoring of these volumes by "alsactl restore" that most distributions
use; the renaming in this patch cures that regression by preventing
alsactl from applying the old, wrong volume levels to the new controls.
http://bugzilla.kernel.org/show_bug.cgi?id=14151http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05e9.
This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.
Refernece: Novell bnc#494309
http://bugzilla.novell.com/show_bug.cgi?id=494309
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent auto-parser doesn't work for machines with a single output
with ALC861, such as Toshiba laptops, because alc_subsystem_id() sets
the hp_pins[0] while it's listed in line_outs[0].
This ends up with the doubled initialization of the same mixer widget,
and it mutes the DAC route because hp_pins has no DAC assigned.
To fix this problem, just check spec->autocfg.hp_outs and speaker_outs
so that they are really detected pins.
Reference: Novell bnc#544161
http://bugzilla.novell.com/show_bug.cgi?id=544161
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The auto-parser for ALC662/663/272 codecs doesn't work properly when
a speaker is connected to mono NID 0x17, and doesn't handle the dynamic
DAC assignment properly.
This patch fixes the issues and also improves the assignment of DACs
so that HP and speakers can have independent volume controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On Soundblaster X-FI Titenium with emu20k2 the SIDE and SURROUND mute
functions are swapped.
It was checked with 'speaker-test -c 8 -s 3' and (un)mute surround or
'speaker-test -c 8 -s 7' and (un)mute side. The volume seems not
to be affected and works as expected.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/410933
This Sony VAIO model also needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the auto-mic switching between an analog and a digital mic is
needed with IDT codecs, the current driver doesn't reset the connection
of the digital mux.
This patch fixes the behavior by checking both mux connections properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Patch was tested on Toshiba NB200 and is found to enable sound.
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/410933
This Sony VAIO model needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mia has an undocumented line-out control, and it has to be exposed.
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the commit fdbc66266c, I mistakenly
replaced the capture mixer array for ALC268_ACER to nosrc version
although this should be kept to alt_mixer. Now fixed back.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reference: ALSA bug #0004614https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614
port-A (0x11) - front hp-out
port-D (0x12) - rear line out
port-E (0x1c) - front mic-in
port-F (0x16) - Internal speakers
digital-mic (0x17) - Internal mic
init verbs, mixers, jack sensing and PCI_QUIRK to support this hardware
Signed-off-by: Miguel de Barros <miguel.de.barros@bluewin.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since the recent kernel can handle MSI properly on non-Intel platforms,
let's enable MSI as default.
If any borken device is found, we can add the quirk entry to the list,
which is currently empty.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Insert "Playback" into the input monitor control names to prevent
alsa-lib from treating these controls as global controls.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a control that allows disabling the high-pass filter of the WM8785 ADC.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a control to select between sharp and slow roll-of filter responses
of the DACs.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a control to increase the oversampling factor to 128x on cards with
PCM1796 or PCM1792A DACs.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a callback that allows model drivers to modify the default I2S MCLK
rate.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a mixer control to adjust the headphone amplifier output for
headphones with different impedances.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Keep a cache of codec registers to avoid unnecessary writes.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the possibility to route a mix of the two channels of stereo data to
the center and LFE outputs. This is implemented only for models where
the DACs support this, i.e., for the Xonar D1 and DX.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On card models with two-channel outputs, the base driver can
automatically disable the upmixing control so that the model
drivers do not need to do this.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Essence ST uses the CS2000 chip to generate the DAC master clock, so
we better initialize and program it appropriately.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The virtuoso.c file has become rather big. This patch splits it up so
that only code for very similar card models is in one file.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If the card is used with a Pericom PI7C9X110 PCI-E/PCI bridge,
reconfigure the latter's PCI buffering to fix an unknown problem.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On cards where the EEPROM was deliberately omitted, we do not need to
try to restore the EEPROM's contents.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
After puting a cd-audio inside my laptop there was no sound out here,
so I decided to install alsa-driver with debug level and setup a
model=test, it didn't help, but then I look at source code and added
this few lines, now cd-audio is working both when playback/recording.
[Additional minor fixes of mixer element/item names by tiwai]
Signed-off-by: Lukasz Marcinowski <nowymarluk@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Support for customization of the external clock names
* Adding hooks to playback_pro_open and capture_pro_open, allowing e.g.
limiting available stream rates to a single value when the external
clock rate is detected
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pro-rate-locking applies to internal clock mode only
* required rate and current rate are compared for internal clock mode only
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* complete support for ak4620
* codec regs listed in proc for all codecs/chips
* adding total regs for each codec
* fixing nb. of steps in input attenuation controls
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
we cannot set the sampling rate of the device, but can only read it
from the board, so we don't need the member for it.
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
the rmh bus is not used asynchronously, so it is safe to remove the
specific code pieces.
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The headphone and speaker mixer elements aren't properly set for
MSI GX620 with targa-8ch-dig quirk.
Also fixed the speaker volume control for other ALC883-targa quirks,
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The pin setup for Dell S14 quirk is rather wrong for the latest driver.
Fixed pin 0x0a, 0x0b, 0x0d and 0x0f.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove unnecessary (and buggy) init sequences left for IDT92HD83*
codecs in the previous fixes. The DACs are now dynamically connected,
thus shouldn't be set statically in init verbs. Also, the mono_nid
is detected dynamically, thus shouldn't be set staticaly, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the quirk entry for HP dv6. Also add a workaround for the headphone
detection by setting hp_detect=1 beforehand. Without this, the driver
won't do auto-muting because BIOS doesn't give any HP pin but only a
line-out pin.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It's possible that hp_detect is set even though no headphone pin is
detected. The driver issues, however, an unsol event only to hp_pins[0],
which can be invalid.
This patch adds the check of the valid pin to send an unsol event
at initialization and resume callbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
IDT92HD73xx and STAC927x codecs use GPIO0 bit as EAPD on many machines.
However, currently we don't set it unless the model is specified just
for safety reason. But, most machines do need this bit, so this safety
handling is rather annoying.
This patch enables GPIO0 setup as default for them. Many HP / Dell
laptops should work even without model override with this change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topic/hda: (92 commits)
ALSA: hda - Use auto model for HP laptops with ALC268 codec
ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
ALSA: hda - Add support of Alienware M17x laptop
ALSA: hda - Remove dead codes from patch_sigmatel.c
ALSA: hda - Fix input source selection of IDT92HD73xx
ALSA: hda - Fix obsolete CONFIG_SND_DEBUG_DETECT
ALSA: hda - Unmute docking line-out as default with AD1984A codec
ALSA: hda - Add another entry for Nvidia HDMI device
ALSA: hda - Add missing GPIO initialization for AD1984A laptop model
ALSA: hda - Add support of docking auto-mute/mic for AD1984A laptop model
ALSA: hda - Fix ALC268/ALC269 headphone pin routing
ALSA: hda - Create "Digital Mic Capture Volume" correctly for IDT codecs
ALSA: hda - Add more quirk for HP laptops with AD1984A
ALSA: hda - Add / fix model entries for HD-audio driver
ALSA: hda - Add full audio support on Acer Aspire 7730G notebook
ALSA: hda - Improve auto-cfg mixer name for ALC662
ALSA: hda - Improve auto-cfg mixer name for ALC861-VD
ALSA: hda - Improve auto-cfg mixer name for ALC262
ALSA: hda - Improve auto-cfg mixer name for ALC260
ALSA: hda - Improve auto-cfg mixer name for ALC880
...
The HP laptops with ALC268 codec seem working better with model=auto
than model=toshiba; e.g. the auto model fixes missing digital outputs.
Let's fix quirk entry to choose auto model explicitly.
Tested-by: Jens Jorgensen <jbj1@ultraemail.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix minimum period size for cs46xx cards. This fixes a problem in the
case where neither a period size nor a buffer size is passed to ALSA;
this is the case in Audacious, OpenAL, and others.
Signed-off-by: Sophie Hamilton <kernel@theblob.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the volume is changed continuously (e.g., when the user drags a
volume slider with the mouse), the driver does lots of I2C writes.
Apparently, the sound chip can get confused when we poll the I2C status
register too much, and fails to complete a read from it. On the PCI-E
models, the PCI-E/PCI bridge gets upset by this and generates a machine
check exception.
To avoid this, this patch replaces the polling with an unconditional
wait that is guaranteed to be long enough.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Johann Messner <johann.messner at jku.at>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The model clevo-m540r was created with 6-channel and digital support. All
functions verified except spdif. Tested with a VIT D2000 laptop which has:
[lspci extract]
Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio
Controller [8086:284b] (rev 03)
Subsystem: CLEVO/KAPOK Computer Device [1558:5409]
[/proc/asound/card0/codec\#0 header]
Codec: Realtek ALC883
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0883
Subsystem Id: 0x15585409
Revision Id: 0x100002
[Added a comment about HP mute and the model description by tiwai]
Signed-off-by: Dhionel Diaz <ddiaz@cenditel.gob.ve>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The card model detection code introduced in 2.6.30 that tries to work
around partially broken EEPROM contents by reading the EEPROM directly
does not handle cards where the EEPROM has been omitted. In this case,
we have to use the default ID to allow the driver to load.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Ozan Çağlayan <ozan@pardus.org.tr>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the quirk for Alienware M17x with IDT 92HD73* codec chip.
It has two HP and one line-out jack, one mic jack, a built-in
speaker and a built-in mic.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Due to the previous fix of input source for IDT92HD73xx, the amp mux
and amp vol stuff became unused. Let's rip off dead codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the mux_nids to select directly the input source instead of mux
mixers so that it works with the current mux enum handler for IDT
92HD73xx codecs.
Also, clean up useless / unnecessary mixer controls and init verbs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Unmute the docking-station line-out as default on machines with
AD1984A codec chip. It can be still muted via "Dock" mixer switch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Do not forget to program the MCLK ratio for the I2S output.
Otherwise, the master clock frequency can be too high for
the DACs at sample frequencies above 96 kHz.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the support of automatic mute and mic-switching of the docking
station HP and mic plugs for AD1984A laptop model for some HP machines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the headphone pin routing of ALC268/ALC269 codecs. Using alc882
routine doesn't work because alc268/alc269 parser assumes the
independent DACs for both HP and speaker outputs. Need to assign the
DAC depending on the pin.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes the wrong headphone output routing for MacBookPro 3,1/4,1
quirk with ALC889A codec, which caused the silent headphone output.
Also, this gives the individual Headphone and Speaker volume controls.
Reference: kernel bug#14078
http://bugzilla.kernel.org/show_bug.cgi?id=14078
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
In patch_vt1708(), the check of MUX nids is missing and this results in
the -EINVAL error in accessing Input Source mixer element. Simpliy
adding the call of get_mux_nids() fixes the problem.
Reference: Novell bnc#534904
https://bugzilla.novell.com/show_bug.cgi?id=534904
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, the digital mic capture volume wasn't created. This is because
IDT codecs have output amps for digital mics, not input amps, while
input amps should be used for other analog pins. Thus the automatic
capture volume creation should check both directions for digital mics.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1) Added support of internal subwoofer (it sounds!!!)
2) Auto muting front speakers and internal subwoofer on headphones plug.
3) Internal mic works.
4) 3 channel mods (jack maps):
black pink blue
2ch: front ext mic line in
4ch: front ext mic surround
6ch: front CLFE surround
Can be changed in mixer.
5) Sound can be recorded from:
Internal mic
Ext mic
Cd
Line in
6) 2 separate capture channels.
Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
One more patch to give a better name for the primary output controls,
this time for ALC861-VD codec. The change is simple, just checking the
pin connection whether it's a speaker-out. When both speaker and HP
are assigned, we name the volume as "PCM" as this influences on both
outputs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Similar improvements for ALC262 codec like previous two commits:
assign a better name, either Master or Speaker, for the primary output
controls.
However, in the case of ALC262 codec, the necessary changes are larger
than others because we need to check the possibility of different mixer
amps depending on the pins. The pin 0x16 is mono, and bound with the
dedicated mixer 0x0e while other pins are bound with 0x0c. Thus, there
are two possible volumes.
When only one of them is used, we can name it as "Master". OTOH, when
both are used at the same time, they have to be named uniquely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of fixed "Front" mixer name, try to assign a better name, e.g.
"Master" or "Speaker" fot the primary output volume controls of ALC260
codec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When there is only one DAC is used for ALC880, try to assign a better
name, either Speaker or Front, depending on the output pin type.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Provide a standard parser for input pins to create the input mixer
and input source controls instead of having a difference one for each
Realtek codec. The new helper parses the codec connections dynamically
isntead of fixed indicies.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reuse a part of the code of ALC268 parser for ALC269.
This will change the default output volume either to Front or Speaker
depending on the pin configuration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix a logic error in the range check of the input level control that
would prevent setting any volume less than the maximum.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modify loops in such way that the register value is checked also after
the timeout condition, just in case the heavy interrupt load etc. caused
the thread to sleep for the time period exceeding the timeout value.
While at it remove an extra ALI_STIMER read from snd_ali_stimer_ready().
Reported-by: Jack Byer <ojbyer@usa.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There are many variants of Toshiba laptops with ALC268 codec, and
it seems that a few of them don't work with model=toshiba preset
since they have the secondary ALC268 codec just for HDMI output.
This is a regression due to the previous clean-up work to merge all
Toshiba quirk entries into a single check.
This patch adds the identification of such laptops to apply the
standard BIOS-probing method. Unfortunately, Toshiba laptops have
all the same PCI SSID, so we need to check the codec SSID to identify
each device.
Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The BIOS pin configs are in fact correct and shall not be overwritten.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HP Compaq 6530s and 6531s internal speaker is silence or becomes silence
within 1 minute after fresh boot. It is found that pin 0x1c must be set to
PIN_OUT mode to make the speaker work. This is weird - line-in pin 0x1c and
speaker pin 0x16 seem to be unrelated.
The codec differences before/after patch are:
@@ Node 0x17 [Pin Complex] wcaps 0x40020b:
Pin Default 0x41a6e130: [N/A] Mic at Ext Rear
Conn = Digital, Color = White
DefAssociation = 0x3, Sequence = 0x0
Misc = NO_PRESENCE
- Pin-ctls: 0x24: IN
+ Pin-ctls: 0x40: OUT
@@ Node 0x1c [Pin Complex] wcaps 0x40018d:
Pin Default 0x41813021: [N/A] Line In at Ext Rear
Conn = 1/8, Color = Blue
DefAssociation = 0x2, Sequence = 0x1
- Pin-ctls: 0x24: IN VREF_80
+ Pin-ctls: 0x40: OUT VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x24
Tests show that it won't impact (external) Mic recording.
Reported-by: "Lin, Ming M" <ming.m.lin@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The auto-mic clean-up patches caused regressions on some ALC268 models
that have no proper input_mux but with "Input Source" mixer elements.
Such a combination results in Oops when accessed.
[A reason why set_capture_mixer() isn't used in patch_alc268() is that
ALC268 codec have HDA_OUTPUT direction for capture volumes unlike other
codecs. Thus it needs own definitions of capture elements.]
This patch fixes the issues:
- Add a capture mixer definition without input-source
- Use the new capture mixer appropriately
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous fix removed the definition of num_adc_nids wrongly, and
this resulted in the missing input-source control. Now readded again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A few improvements for IDT 92HD83xxx codec pareser:
- Remove unused / deprecated mixer-amp controls
- Handle d-mics as normal inputs since this codec has no separate
MUXes for analog and digital
- Don't create duplicated controls for capture volumes with Mux
capture volumes
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Enable line-out detection for IDT/STAC codecs only when speaker pins
exist. In some cases, the speaker itself is identified as line-out,
and this confuses the situation. Only the extra line-outs should do
auto-muting.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
the hdsp driver refuses to report any information via the proc
interface, if the io box is not connected. with this patch, the
content of the control and status registers is printed before the
iobox check.
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With auto config model of alc268 realtek codec, it allows to select any
of possible available digital microphone inputs when only one is
available. For example, when only digital mic in nid 0x12 is available,
on second input source it will allow you to select unavailable digital
mic in nid 0x13. The problem is that selecting unavailable digital mic
creates a source of noise when recording (I'm not sure if this happens
on all machines with alc268 and only one digital mic input, but testing
on a quanta uw1 netbook a lot of noise is introduced in recording from
digital mic 0x12/first input source, when you select the unavailable
digital mic 0x13 for capture source 0x24 in the second input source in
mixer).
Then to avoid noise when recording from digital mic with auto model in
this case, prevent a digital mic input source to be selected if
microphone is not available.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move static codes to setup from init_hook for each model.
Also, use the common auto-mic selection helper for devices that support
auto-mic selection. They just need to set up ext_mic, int_mic and
auto_mic flag in the setup section.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added setup hook to ALC preset struct to be called at in the parser
but not at each init callback.
This can be used for setting up the static pins, etc, while the
init hook should be used for updating the status again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Created a white-list to enable MSI since some devices require MSI
explicitly due to BIOS/ACPI problems. Simply using a quirk list.
As the first case, take HP Compaq CQ40.
Reference: Novell bnc#529971
https://bugzilla.novell.com/show_bug.cgi?id=529971
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some Realtek codecs don't provide the full connections for certain pins
from each ADC; e.g. ACL662/ALC272 gives only one of two digital-mic pins
for each ADC. Thus, depending on the digital mic pin, the ADC/MUX to be
used has to be chosen properly.
This patch adds the check of the connectivity of pins at auto-mic mode.
If no proper connectivity is found, auto_mic flag is turned off to be
sure.
Also the mux_idx is determined during this check so it won't be checked
in the unsol event any more.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALC269 and ALC861-VD parsers override the ADC definitions
unconditionally without checking the spec definition. This causes
the problem when any inconsistent ADC is set up in the device quirk
(like ALC272 with digital-mic).
This patch avoids the overriding by adding the proper checks.
Reference: Novell bnc#529467
https://bugzilla.novell.com/show_bug.cgi?id=529467
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the support for automatic mic selection via plugging for
Realtek codecs (in auto-probing mode). The auto-mic mode is enabled
only when one internal mic and one external mic are present.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow the interval timer to be programmed with its full 96 kHz
precision.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Without the initialization of vmaster NID, the dB information got
confused for ALC269 codec.
Reference: Novell bnc#527361
https://bugzilla.novell.com/show_bug.cgi?id=527361
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
The previous auto-mic patch for STAC/IDT codecs causes the Oops on
machines without digital mic pins. This patch fixes the problem.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Read buffer overflow
ALSA: hda: Correct EAPD for Dell Inspiron 1525
ALSA: hda: warn on spurious response
ALSA: hda: remember last command for each codec
ALSA: hda: read CORBWP inside reg_lock
ALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io
ALSA: hda: take cmd_mutex in probe_codec()
ALSA: hda: track CIRB/CORB command/response states for each codec
ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527
When the line-out jack is plugged/unplugged, the driver needs to check
the headphone plug, not only the line-out jack itself. Otherwise the
headphone or the speaker may be wrongly muted/unmuted.
As a result, both STAC_HP_EVENT and STAC_LO_EVENT need to call the
same function, stac92xx_hp_detect().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit fefd67f31e
ALSA: hda - Add line-out jack detection on IDT/STAC codecs
enabled wrong pins for jack detections. Fixed to the correct ones.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The new IbexPeak HDMI codec has 3 pin nodes and 2 converter nodes.
Here we assume only the first ones will be used.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Check whether index is within bounds before testing the element.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit 24918b61b5 statically changes
the model from dell-bios to dell-3stack to solve the sound decreasing
regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another
problem that the 2nd headphone jack doesn't work
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think
the commit 249**2dc is just a workaround. I would like to give a true solution
here.
The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and
the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as
GPIO2. This patch changes EAPD to GPIO0 to solve the problem.
Signed-off-by: Chengu Wang <wangchengu@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This converts the last CORBWP access outside of reg_lock.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Just for safety. azx_init_cmd_io() and azx_free_cmd_io() may be
called when switching to single command mode.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now that each codec will have its own module, it is possible
for the user to load one codec while another one is running.
So cmd_mutex would be a safe addition to probe_codec().
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Recently we hit a bug in our dev board, whose HDMI codec#3 may emit
redundant/spurious responses, which were then taken as responses to
command for another onboard Realtek codec#2, and mess up both codecs.
Extend the azx_rb.cmds and azx_rb.res to array and track each codec's
commands/responses separately. This helps keep good codec safe from
broken ones.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use model=lenovo instead of model=dallas for Toshiba Satellite A135-S4527
with ALC861-VD codec.
Reference: Novell bnc#526325
https://bugzilla.novell.com/show_bug.cgi?id=526325
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The name buf with size 16 is too short for some codec names, e.g.
truncated like "ALC861-VD Analo". Now the size is doubled.
Signed-off-by: Takashi Iwai <tiwai@suse.de>