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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add the automatic mute of speakers via line-out jack plugging on
STAC/IDT codecs. The feature is enabled when the HP detect is present.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The patch below, to be applied on the latest sound-unstable-2.6.git,
enables headphones output on my MacBookPro 5,5, together with the
automuting feature.
Here is the exact soundcard id:
Vendor Id: 0x10134206
Subsystem Id: 0x106b4d00
Revision Id: 0x100301
Signed-off-by: Takashi Iwai <tiwai@suse.de>
STAC/IDT codecs provide both "Input Source" and "Digital Input Source"
controls to choose the analog input source and the digital input source.
But this is far user-unfriendly.
This patch merges the input source selections into one "Input Source"
control. To have separate digital and analog input source controls,
you can pass "separate_dmux = 1 " hint string.
At the same time, this patch gets rid of analog mixer stuff that was
already disabled in previous patches.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It auto mutes all 8-channel outputs at rear panel when
the front panel headphone is connected.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This 2-channel mode is useful in that it will broadcast
a 2-channel audio stream to all front/side/... ports.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The analog mix is disabled now as default (unless "analog_mixer" hint
is given), so it shoudn't appear in the digital input source as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the missing initialization of DMUX connection (to analog input)
for auto-mic mode with STAC/IDT codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We don't need any more static connection to the port F (which is often
used for docking stations) since its connection is done dynamically via
DAC assignment now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
e->sad[] is declared with size ELD_MAX_SAD=16, but the guard
allows range 0-31.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Support the automatic mic-switching with some devices with IDT/STAC
codecs. The condition is that the device has only two inputs, one
for an external mic and one for an internal mic.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since only one event can be associated to a (pin) widget, it's safer
to avoid the multiple mapping. This patch fixes the behavior of the
STAC/IDT codec driver.
Now stac_get_event() doesn't take the type argument but simply returns
the first hit element. Then enable_pin_detect() checks the validity
of the type, and returns non-zero only if a valid entry. The caller
can call stac_issue_unsol_event() after checking the return value.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The analog mixer unit on IDT 92HD71Bxx codecs is almost useless
since we use only the direct connections from DAC to pin.
Remove the controls to avoid unneeded confusion as default now.
This can be still back via "analog_mixer = 1" hint.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of static snd_kcontrol_new arrays, create "Capture Volume"
and "Capture Switch" controls dynamically based on the mixer attr
values (made via HDA_COMPOSE_AMP_VAL()).
This reduces the code size and gives more flexibility to change
the number of controls later.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current driver creates always the digital input source mixer
elements for IDT 92HD71x codecs no matter whether digital mics are
present. This patch adds the proper check to avoid the creation of
these controls if unnecessary.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The sentense "Unknown model for xxx, ..." makes people too nervous
and drives them to a direction to a wrong "fix" by giving any
mismatching model option.
Let's rephrase the messages to be more nice and easy (at least that
won't make people suspect conspiracies).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Volume-knob widgets may have connections even if they have no CONN_LIST
cap bit. Allow the query exceptionally in snd_hda_get_connections().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The master mute switch is wrongly implemented as checking the pointer
instead of its value, thus it can be never muted. This patch fixes
the issue.
Reference: Novell bnc#404873
https://bugzilla.novell.com/show_bug.cgi?id=404873
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
Here are the new sound enabling patches for IbexPeak.
Summary of tested features:
- playback
- Front Headphone: OK
- 8 channel audio: Front/Rear/CLFE/Side all OK
- recording
- Front Mic/Rear Mic: both OK
(front/rear/line mics are selectable in the "Input source" alsamixer control)
- Line In: not working
(in 6ch mode, its amp/mute, direction and route all looks fine,
so I'm a little puzzled)
(hopefully no one will care this feature)
- digital SPDIF input/output: not tested (no equipment)
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit 099db17e66 introduced a
regression at suspend/resume where the GPIO1 bit isn't properly
restored, thus the speaker output gets muted initially after resume.
The fix is simple, use the cached write for storing GPIO data.
Reference: Novell bnc#522764
https://bugzilla.novell.com/show_bug.cgi?id=522764
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds a check to snd_hda_get_connections() routine for
presence of AC_WCAP_CONN_LIST. Also, make sure that negative error
codes from noted route are handled on all places as errors.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Previous patch used widget type, but the presence flag of the connection
list is in the widget capabilities.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reading node connections for an unknown widget can confuse HDA codec bus.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the logic of ALC861 auto-mode parser for the outputs.
Instead of assuming the fixed DAC list, parse the conection and assign
the DAC dynamically.
Also, unmute the unused output connections to avoid noises on inputs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add some tricks to reduce the click noise at powering down to D3
in the power saving mode on STAC/IDT codecs.
The key seems to be to reset PINs before the power-down, and some
delay before entering D3. The needed delay is significantly long,
but I don't know why.
Signed-off-by: Takashi Iwai <tiwai@suse.de>