Commit Graph

410 Commits

Author SHA1 Message Date
Takashi Iwai ccca7cdc1b ALSA: hda - Fix volume-knob setup for Dell laptops with STAC9228
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>
2009-10-13 15:32:21 +02:00
Takashi Iwai 54930531a0 ALSA: hda - Fix mute sound with STAC9227/9228 codecs
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>
2009-10-13 15:29:34 +02:00
Takashi Iwai 02d3332285 ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
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>
2009-10-01 16:38:11 +02:00
Takashi Iwai 69b5655a85 ALSA: hda - Fix Dell S14 pin setup
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>
2009-09-15 12:37:42 +02:00
Takashi Iwai 44da531e95 ALSA: hda - Fix IDT92HD83* codec setup
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>
2009-09-15 12:35:56 +02:00
Takashi Iwai 6e34c03321 ALSA: hda - Add support for HP dv6
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>
2009-09-14 15:42:18 +02:00
Takashi Iwai 5f380eb1ef ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
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>
2009-09-14 15:36:14 +02:00
Takashi Iwai fc64b26cfa ALSA: hda - Set default GPIO for IDT92HD71bxx
A smiliar fix for IDT 92HD71Bxx codecs like the previous commit for
other IDT/STAC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-14 15:33:01 +02:00
Takashi Iwai af6ee30202 ALSA: hda - Set default GPIO for STAC/IDT codecs
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>
2009-09-14 15:03:12 +02:00
Takashi Iwai 842ae63800 ALSA: hda - Add support of Alienware M17x laptop
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>
2009-09-02 07:43:08 +02:00
Takashi Iwai 4a9678909b ALSA: hda - Remove dead codes from patch_sigmatel.c
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>
2009-09-02 01:09:54 +02:00
Takashi Iwai e2aec17100 ALSA: hda - Fix input source selection of IDT92HD73xx
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>
2009-09-02 01:00:05 +02:00
Takashi Iwai 96f845de89 ALSA: hda - Create "Digital Mic Capture Volume" correctly for IDT codecs
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>
2009-08-29 00:49:36 +02:00
Takashi Iwai 1c11ce8118 Merge branch 'fix/hda' into topic/hda 2009-08-19 12:11:06 +02:00
Wu Fengguang ae709440ed ALSA: hda: add model for Intel DG45ID/DG45FC boards
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>
2009-08-19 12:10:25 +02:00
Takashi Iwai 7570ef1834 ALSA: hda - Add missing num_adc_nids definition for IDT92HD8xxx
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>
2009-08-15 11:57:53 +02:00
Takashi Iwai 667067d898 ALSA: hda - Fix / clean up IDT92HD83xxx codec parser
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>
2009-08-13 18:14:42 +02:00
Takashi Iwai a6cd7a71fd Merge branch 'topic/hda-dmic-fix' into topic/hda 2009-08-13 18:14:02 +02:00
Takashi Iwai 1c4bdf9be0 ALSA: hda - Enable line-out detection only with speakers
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>
2009-08-13 08:27:38 +02:00
Takashi Iwai da2a2aaa8e ALSA: hda - Fix Oops due to STAC/IDT auto-mic changes
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>
2009-08-10 07:44:09 +02:00
Takashi Iwai 1972d02504 ALSA: hda - Add quirks for some HP laptops
The new HP laptops have PCI SSID 103c:701x and requires model=hp-dv5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-06 08:44:43 +02:00
Takashi Iwai 16ffe32c77 ALSA: hda - Fix line-out jack handling with STAC/IDT codec
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>
2009-08-04 13:40:54 +02:00
Takashi Iwai 15cfa2b3db ALSA: hda - Fix line-out jack detection
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>
2009-08-03 14:23:33 +02:00
Takashi Iwai e44d4e4cee Merge branch 'fix/hda' into topic/hda 2009-08-03 08:37:17 +02:00
Chengu Wang 84d3dc200f ALSA: hda: Correct EAPD for Dell Inspiron 1525
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>
2009-08-03 08:30:56 +02:00
Takashi Iwai d195658bd7 Merge branch 'fix/hda' into topic/hda 2009-07-30 18:08:54 +02:00
Takashi Iwai fefd67f31e ALSA: hda - Add line-out jack detection on IDT/STAC codecs
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>
2009-07-30 18:08:46 +02:00
Takashi Iwai 5207e10ed4 ALSA: hda - Integrate Digital Input Source to Input Source
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>
2009-07-30 13:09:08 +02:00
Takashi Iwai bf677bd8fb ALSA: hda - Fix typos of Capture controls.
The commit 6479c63188
    ALSA: hda - Create Capture controls dynamically
introduced typos of "Capture".  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-30 09:24:29 +02:00
Takashi Iwai 71443b0b74 ALSA: hda - No analog mix input source as default for IDT92HD71bxx
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>
2009-07-29 18:41:29 +02:00
Takashi Iwai 15b4f296fc ALSA: hda - Add missing DMUX initialization for auto-mic with STAC/IDT
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>
2009-07-29 16:32:55 +02:00
Takashi Iwai 26a2798053 ALSA: hda - Remove static connection in IDT 92HD71bxx
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>
2009-07-29 16:30:14 +02:00
Takashi Iwai 3d21d3f7e7 ALSA: hda - Support auto-mic switching with IDT/STAC codec
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>
2009-07-29 14:32:56 +02:00
Takashi Iwai 62558ce157 ALSA: hda - Avoid overwrite of jack events with STAC/IDT
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>
2009-07-29 14:28:37 +02:00
Takashi Iwai 50c62f068e ALSA: hda - Don't create analog mixer for IDT92HD71bxx
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>
2009-07-28 18:28:27 +02:00
Takashi Iwai 6479c63188 ALSA: hda - Create Capture controls dynamically
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>
2009-07-28 18:25:03 +02:00
Takashi Iwai 4417932315 ALSA: hda - Don't create unneeded digital input source for IDT 92HD71x
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>
2009-07-28 17:03:49 +02:00
Takashi Iwai 9a11f1aa8e ALSA: hda - Reword information messages for BIOS auto-probing mode
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>
2009-07-28 16:06:56 +02:00
Takashi Iwai 626f5cefc6 ALSA: hda - Add quirk for Dell Studio 1555
Added a quirk entry for Dell Studio 1555.

Reference: Novell bnc#525244
	https://bugzilla.novell.com/show_bug.cgi?id=525244

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28 00:54:39 +02:00
Takashi Iwai a22d543a95 ALSA: hda - Introduce get_wcaps_type() macro
Add a helper macro to retrieve the widget type from wiget cap bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-27 12:54:26 +02:00
Takashi Iwai a3daf68931 Merge branch 'fix/hda' into topic/hda 2009-07-24 16:54:59 +02:00
Jaroslav Kysela 16a433d8b3 ALSA: hda-intel: Cleanups for widget connection list handling
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>
2009-07-22 16:30:03 +02:00
Takashi Iwai 86de741660 ALSA: hda - Use snprintf() to be safer
Use snprint() for creating the jack name string instead of sprintf()
in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22 16:02:46 +02:00
Takashi Iwai 05ff7e11b7 ALSA: hda - Reduce click noise at power-saving
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>
2009-07-22 12:39:24 +02:00
Takashi Iwai b04add9566 ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs
The recent rewrite of the codec parser for STAC9872 caused a regression
for some Sony VAIO models that don't give proper pin default configs
by BIOS.  Even using model=vaio doesn't work because the pin definitions
are set after the pin overrides.

This patch fixes the pin definitions in patch_stac9872() to be put
in the right place before the pin overrides.  Also the patch adds the
new quirk entry for VAIO F/S to have the correct pin default configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-07-20 15:12:41 +02:00
Hao Song 42b95f0c6b ALSA: hda - Add quirk for Gateway T6834c laptop
Gateway T6834c laptops need EAPD always on while the default behavior
for the STAC9205 reference board is to turn it off upon every HP plug.
By using the special "eapd" model, which is first introduced for Gateway
T1616 laptops for this same reason, this peculiarity can be properly
handled.

Signed-off-by: Hao Song <baritono.tux@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-20 09:05:53 +02:00
Herton Ronaldo Krzesinski 02358fcfa5 ALSA: hda - move 8086:fb30 quirk (stac9205) to the proper section
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-04 12:20:16 +02:00
Takashi Iwai 8c8145b873 ALSA: hda - Make jack-plug notification selectable
Make the jack-plug notification via input layer selectable via Kconfig.
This is often unnecessary, and the similr function will be provided
using the ALSA control API in near future anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 17:02:03 +02:00
Takashi Iwai b8621516cc ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
Fix the comparison of unsigned int that causes a compile warning below
by changing to the right signed type:
  patch_sigmatel.c: In function ‘stac92xx_vref_set’:
  patch_sigmatel.c:658: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 08:03:38 +02:00
Simos Xenitellis a5c0f88678 ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073].
The following has been tested with Alsa 1.0.20 (git master).

Background details can be found at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561
http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290

Tested-by: Theodora Iliopoulou <th30dr@gmail.com>
Signed-off-by: Simos Xenitellis <simos@gnome.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-10 19:54:24 +02:00