dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

212 Commits

Author SHA1 Message Date
Takashi Iwai 1c11ce8118 Merge branch 'fix/hda' into topic/hda 2009-08-19 12:11:06 +02:00
Wu Fengguang 150fe14c1a ALSA: hda: enable speaker output for Compaq 6530s/6531s
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>
2009-08-19 12:07:27 +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 a3daf68931 Merge branch 'fix/hda' into topic/hda 2009-07-24 16:54:59 +02:00
Takashi Iwai 4012ade933 ALSA: hda - Restore GPIO1 properly at resume with AD1984A
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>
2009-07-22 18:15:10 +02:00
Takashi Iwai e488fca79f Merge branch 'fix/hda' into topic/hda 2009-07-03 15:03:35 +02:00
Takashi Iwai 099db17e66 ALSA: hda - Add GPIO1 control at muting with HP laptops
HP laptops with AD1984A codecs (at least mobile models) need to set
GPIO1 appropriately to indicate the mute state.  The BIOS checks this
bit to judge whether the mute on or off is sent via F8 key.
Without changing this bit, the BIOS can be confused and may toggle
the mute wrongly.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 14:58:59 +02:00
Takashi Iwai c785786933 Merge branch 'fix/hda' into topic/hda 2009-07-01 18:09:15 +02:00
Takashi Iwai ff84847171 ALSA: hda - Add quirk for HP 6930p
Added a quirk model=laptop for HP 6930p (103c:30dc) with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 18:08:01 +02:00
Takashi Iwai c912e7a580 ALSA: hda - Fix support for Samsung P50 with AD1986A codec
Samsung P50 requires the HP auto-muting unlike other Samsung models.
Added a new model=samsung-p50 to support this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 14:14:34 +02:00
Takashi Iwai 03c405ad31 ALSA: hda - Generalize the pin-detect quirk for Lenovo N100
Add a new flag to ad_spec struct so that the same hack can be used for
any other models (if any).  This also allows other models to reuse the
auto-mute functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 14:10:15 +02:00
Takashi Iwai 16d11a829e ALSA: hda - Simplify AD1986A mixer definitions
Split mixer element arrays of AD1986A models to several pieces so that
each model can share the same mixer arrays.
This removes lots of duplicated data.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 14:07:53 +02:00
Takashi Iwai 7315613f87 ALSA: hda - Fix init verbs of AD1884A mobile model
The current ad1884a-mobile model has a problem that the speaker output
doesn't work sometimes after boot or power-saving on some HP laptops.
It seems that the verbs accessing to the non-functional widgets cause
this problem.

This patch simplifies the init verbs for mobile model not to touch
unnecessary setups so that it avoids the speaker-mute problem.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-23 08:24:48 +02:00
Takashi Iwai 4dc1f87f07 ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
Add the upper-limit of mixer amp for AD1884A-laptop model just like
the mobile model for some HP laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 14:20:23 +02:00
Akinobu Mita bca68467b5 ALSA: hda - add missing comma in ad1884_slave_vols
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07 04:20:04 +02:00
Takashi Iwai 873dc78a86 ALSA: hda - Clean up / fix quirks for HP laptops with AD1984A
Use SND_PCI_QUIRK_MASK() to clean up / support better HP laptops with
AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-25 18:12:13 +01:00
Takashi Iwai 209b140336 Merge branch 'test/hda-pincfg' into topic/hda 2009-02-23 14:15:47 +01:00
Takashi Iwai 13c989beba ALSA: hda - Don't give over 0dB volume for AD1984A HP laptops
Set the upper limit 0dB to the volume of mixer amp 0x20 for
AD1984A HP laptops.  The overloaded volume may damage the internal
speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23 11:33:34 +01:00
Takashi Iwai 2f334f92cf ALSA: hda - Remove codec-specific pin save/restore functions
Replace the accessor to pin defaults with the common code for caching.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20 16:48:40 +01:00
Takashi Iwai c23127566c ALSA: hda - Clean up quirks for HP laptops with AD1984A
Clean up quirks for HP laptops with AD1984A using SND_PCI_QUIRK_MASK()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16 15:20:41 +01:00
Takashi Iwai c8a1a8985d Merge branch 'fix/hda' into topic/hda 2009-02-13 11:59:26 +01:00
Takashi Iwai 9411e21cd0 ALSA: hda - Add snd_hda_multi_out_dig_cleanup()
Added the helper function snd_hda_multi_out_dig_cleanup() to clean up
the digital outputs with multi setup.  This call is needed in cases
the codec supports multiple digital outputs as slaves.  Otherwise the
slave widgets aren't properly cleaned up.

For a single digital output (e.g. in patch_conexant.c), this call isn't
needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13 11:59:13 +01:00
Takashi Iwai 3a08e30de2 ALSA: hda - Add missing terminator in slave dig-out array
Added the missing terminator for ad1989b_slave_dig_outs[].

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13 11:53:27 +01:00
Takashi Iwai 0852d7a654 ALSA: hda - Detect multiple digital-out pins
Detect multiple digital-out pins in snd_hda_parse_pin_defconfig().
The dig_out_pin and dig_out_type fields become arrays.

The codec parser still doesn't use this multiple pins detection, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-12 00:04:19 +01:00
Takashi Iwai dea0a5095b ALSA: hda - Clean up quirk lists
Clean up quirk lists with bit masks.
Also, sorted in numerical order for alc662_cfg_tbl[].

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-09 17:19:32 +01:00
Takashi Iwai c5a4bcd0ca ALSA: hda - Use digital beep for AD codecs
Use digital beep instead of analog pc-beep for AD codecs.
Create the beep mixer controls dynamically on demand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-06 17:22:05 +01:00
Takashi Iwai 632da7321b ALSA: hda - Add quirk for another HP laptop
Add model=laptop entry for another HP laptop (103c:3077) with AD1984A.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 15:02:40 +01:00
Takashi Iwai 67f7857ab1 ALSA: hda - Add quirk for HP zenith laptop
Added model=laptop for another HP laptop (103c:3072) with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 12:14:52 +01:00
Takashi Iwai 70040c0740 ALSA: hda - Fix wrong initial verb for AD1984 thinkpad model
The docking mic-boost (0x25) has no mute bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 14:18:11 +01:00
Takashi Iwai 60e388e89c ALSA: hda - Fix invalid verbs for mic-boosts on AD1884*
The mic-boosts (0x14 and 0x15) on AD1884* codecs are input-amps,
not output-amps.  Fix the invalid initialization verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 12:37:09 +01:00
Takashi Iwai 19a2d3e9b9 ALSA: hda - Remove invalid amp initializations for AD1988* codecs
The ADC widgets on AD1988* codecs have no amp controls.
Remove invalid initialization verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 12:35:25 +01:00
Takashi Iwai 6d6e17de4f ALSA: hda - Fix initial verbs for mic-boosts on AD1981HD
The mic boosts (NID 0x08 and 0x18) are input-amps, not output-amps.
Fix the initial verbs for them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 12:33:54 +01:00
Clemens Fruhwirth c247ed6f52 ALSA: hda - Fix typos for AD1882 codecs
Fixed typos of codec-id checks for AD1882/AD1882A.

Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-07 11:43:48 +01:00
Takashi Iwai d5337debac ALSA: hda - Add quirk for HP 2230s
Added a quirk for HP 2230s, model=laptop, with AD1984A codec.
Reference: Novell bnc#461660
	https://bugzilla.novell.com/show_bug.cgi?id=461660

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-07 11:41:57 +01:00
Takashi Iwai 11d518e07d ALSA: hda - Add quirk for HP6730B laptop
Added model=laptop for HP 6730B laptop with AD1984A codec.
Reference: Novell bnc#457909
	https://bugzilla.novell.com/show_bug.cgi?id=457909

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org
2008-12-10 10:39:17 +01:00
Takashi Iwai 1289e9e8b4 ALSA: hda - Modularize HD-audio driver
Split the monolithc HD-audio driver into several pieces:
 - snd-hda-intel   HD-audio PCI controller driver; loaded via udev
 - snd-hda-codec   HD-audio codec bus driver
 - snd-hda-codec-* Specific HD-audio codec drivers

When built as modules, snd-hda-codec (that is invoked by snd-hda-intel)
looks up the codec vendor ID and loads the corresponding codec module
automatically via request_module().

When built in a kernel, each codec drivers are statically hooked up
before probing the PCI.

This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module
information for each driver, and driver-linking codes between
codec-bus and codec drivers.

TODO:
  - Avoid EXPORT_SYMBOL*() when built-in kernel
  - Restore __devinit appropriately depending on the condition

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 15:47:11 +01:00
Takashi Iwai 1725b82a6e ALSA: hda - make laptop-eapd model back for AD1986A
The changes specific for Samsung laptops seem unapplicable to other
hardware models like ASUS.  The mic inputs are lost on such hardware
by the change 5d5d5f43f1.

This patch adds back the old laptop-eapd model, and create a new
model "samsung" for the new one specific to Samsung laptops with
automatic mic selection feature.

Reference: kernel bugzilla #12070
	http://bugzilla.kernel.org/show_bug.cgi?id=12070

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 02:25:48 +01:00
Takashi Iwai 90d0be2fc3 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-12 10:02:04 +01:00
Travis Place 254248313a ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
Added a QUIRK to patch_analog.c for the HP Elitebook 8530p
(IDs 0x103c:0x30e7) to use AD1884A model 'laptop' by default.
Playback and Capture confirmed working.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-10 17:57:14 +01:00
Michel Marti 65b92e5cbc ALSA: hda - Add another HP model (6730s) for AD1884A
Added model=laptop for another HP machine (103c:3614) with AD1884A
codec.

Signed-off-by: Michel Marti <mma@objectxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-09 12:47:12 +01:00
Takashi Iwai 1b063c3d09 Merge branch 'topic/fix/hda' into topic/hda 2008-10-29 08:17:05 +01:00
Takashi Iwai 5695ff4416 ALSA: hda - Add another HP model for AD1884A
Added a quirk entry for another HP mobile device with AD1884A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-28 15:39:26 +01:00
Takashi Iwai 603c401992 ALSA: hda - Use generic array helpers
Use generic array helpers to simplify array handling in snd-hda-intel.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:42:59 +02:00
Robin H. Johnson f51ff9937b ALSA: HDA: patch_analog: Quirk for Asus P5Q Premium/Pro boards.
Use 6STACK_DIG for the AD2000BX variant of the AD1989B chip used by Asus
on their Asus P5Q Premium and Pro boards.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23 08:18:04 +02:00
Robin H. Johnson 9cae0c6378 ALSA: HDA: patch_analog: Implement multiple outputs for AD1988
Implement the slave_dig_outs for AD1989 cards. Untested due to lack of
hardware.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23 08:18:03 +02:00
Robin H. Johnson e8bfc6c1d2 ALSA: HDA: patch_analog: Fix SPDIF output on AD1989B
The SPDIF pins for AD1989 are not enabled by default. Set OUT bit so that they
actually work. Also initialize the HDMI SPDIF at the same time.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23 08:18:00 +02:00
Takashi Iwai 9e44c6e40f ALSA: hda - Add AD1882A codec support
Added the basic support of AD1882A codec chip.
It's almost compatible with AD1882, but with a digital mic and some
differences in connections.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25 09:57:05 +02:00
Takashi Iwai db3da6c135 ALSA: hda - initialize node 0x21 properly on AD1988 codecs
The widget node 0x21 should be initialized as unmuted/full (0dB)
as default.  This will reduce additional manual work by user at the
first time use.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13 11:47:02 +02:00
Takashi Iwai 470eaf6be7 ALSA: hda - Add missing Thinkpad Z60m support
Added the missing SSID of Thinkpad Z60m for model=thinkpad with
AD1981HD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:31:58 +02:00
Takashi Iwai 43785eaeb1 ALSA: hda - Fix wrong volumes in AD1988 auto-probe mode
Don't create mixer volume elements for Headphone and Speaker if they
use the same DAC as normal line-outs on AD1988.  Otherwise the amp
value gets screwed up, e.g.
	https://bugzilla.novell.com/show_bug.cgi?id=398255

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-18 09:24:36 +02:00
Takashi Iwai 149b154452 ALSA: hda - Remove unused mutex
Removed unused mutex from patch_*.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:48:38 +02:00
Takashi Iwai 269ef19caa [ALSA] hda - Fix mic input on HP2133
The mic pins are wrongly assigned on AD1884A mobile model.
The mic handling is fixed for the automatic mic selection, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 16:22:10 +02:00
Travis Place b9e16bc548 [ALSA] hda - Add model for ASUS P5K-E/WIFI-AP
Added a config table entry for the ASUS P5K-E/WIFI-AP mainboard (ID
1043:8227) to use AD1988_6STACK_DIG

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-24 18:23:26 +02:00
Takashi Iwai 05808ecc45 [ALSA] hda - Fix Thinkpad X300 digital mic
TP X300 digital mic requires additional init verbs with magic COEFs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Takashi Iwai 3adb8abc70 [ALSA] hda - Add support of AD1989A/AD1989B
Added the support of AD1989A and AD1989B codecs.
These codecs can have multiple SPDIF devices, but currently we handle
only one SPDIF.  If any real devices with two SPDIF interfaces (likely
one for SPDIF and one for HDMI), we'll fix this rightly.

Otherwise, these codecs are pretty similar with AD1988.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:36 +02:00
Takashi Iwai f081374b60 [ALSA] hda-codec - Support of Lenovo Thinkpad X300
Added the model thinkpad for Lenovo Thinkpad X300 with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai 888afa1541 [ALSA] hda-codec - keep the format verb at closing PCM streams
Keep the format verb at closing PCM streams.
Introduced snd_hda_codec_cleanup_stream() for the parcicular purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Harvey Harrison 3c9a3203ff [ALSA] sound: hda: missing includes of hda_patch.h
Move the array declaration to hda_codec.c where it is used and add includes
where the individual presets are declared.

Fixes the following sparse warnings:
sound/pci/hda/patch_realtek.c:13744:25: warning: symbol 'snd_hda_preset_realtek' was not declared. Should it be static?
sound/pci/hda/patch_cmedia.c:729:25: warning: symbol 'snd_hda_preset_cmedia' was not declared. Should it be static?
sound/pci/hda/patch_analog.c:3656:25: warning: symbol 'snd_hda_preset_analog' was not declared. Should it be static?
sound/pci/hda/patch_sigmatel.c:3995:25: warning: symbol 'snd_hda_preset_sigmatel' was not declared. Should it be static?
sound/pci/hda/patch_si3054.c:286:25: warning: symbol 'snd_hda_preset_si3054' was not declared. Should it be static?
sound/pci/hda/patch_atihdmi.c:156:25: warning: symbol 'snd_hda_preset_atihdmi' was not declared. Should it be static?
sound/pci/hda/patch_conexant.c:1721:25: warning: symbol 'snd_hda_preset_conexant' was not declared. Should it be static?
sound/pci/hda/patch_via.c:1962:25: warning: symbol 'snd_hda_preset_via' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Takashi Iwai b26451c059 [ALSA] hda-codec - Add docking-station mic input for Thinkpad X61
Added the docking-stationc mic input to the capture source list
for Thinkpad X61.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:15 +02:00
Takashi Iwai 1c82ed1bc5 [ALSA] Keep private TLV entry in vmaster itself
Use a private array for TLV entries of virtual master controls instead
of (supposed) static array.  This cleans up the existing codes.

Also, now vmaster assumes the simple dB-range TLV that is the only type
it can handle.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +02:00
Takashi Iwai b40b04ad38 [ALSA] hda-codec - Add model=mobile for AD1884A & co
Added the new model mobile for AD1884A and compatible codecs.
It's a reduced version of model=laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:11 +02:00
Takashi Iwai c505925968 [ALSA] hda-codec - Add support of AD1883/1884A/1984A/1984B
Added the support of new AD codecs: AD1883, AD1884A, AD1984A and AD1984B.
These are almost compatible except for additional digital pins, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:11 +02:00
Takashi Iwai 9a08160bdb [ALSA] hda-codec - Add "IEC958 Default PCM" switch
Added a new mixer switch to enable/disable the sharing of the default
PCM stream with analog and SPDIF outputs.  When "IEC958 Default PCM"
switch is on, the PCM stream is routed both to analog and SPDIF outputs.
This is the behavior in the earlier version.

Turning this switch off has a merit for some codecs, though.  Some codec
chips don't support 24bit formats for SPDIF but only for analog outputs.
In this case, you can use 24bit format by disabling this switch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai 5d5d5f43f1 [ALSA] hda-codec - Implement auto-mic jack sensing on Samsung laptops
Implemented the auto-mic jack sensing for Samsung laptops with AD1986A
codec chip (model=laptop-eapd).

The hardware uses pin 0x1d and 0x1f for the internal and external
mics, respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Takashi Iwai f0824812af [ALSA] hda-codec - Fix automute of AD1981HD hp model
Reprogram the speaker-pin setting at each HP pin plug to make sure
the spekaer auto-muting on AD1981HD hp model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Takashi Iwai 7ba72ba1fe [ALSA] hda-intel - Fix PCM device number assignment
In the current scheme, PCM device numbers are assigned incrementally
in the order of codecs.  This causes problems when the codec number
is irregular, e.g. codec #0 for HDMI and codec #1 for analog.  Then
the HDMI becomes the first PCM, which is picked up as the default
output device.  Unfortuantely this doesn't work well with normal
setups.

This patch introduced the fixed device numbers for the PCM types,
namely, analog, SPDIF, HDMI and modem.  The PCM devices are assigned
according to the corresponding PCM type.  After this patch, HDMI will
be always assigned to PCM #3, SPDIF to PCM #1, and the first analog
to PCM #0, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Takashi Iwai fb304ce53a [ALSA] hda-codec - Fix AD1988 capture elements
The some indices of capture elements of AD1988 are wrongly assigned.
This patch fixes it.  See ALSA bug#3795
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3795

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:15 +01:00
Douglas Kosovic 0aaa22e554 [ALSA] hda-codec - Add Dell T3400 support
Added the support for Dell T3400 with AD1984 codec chip.
ALSA bug#3699:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3699

Signed-off-by: Douglas Kosovic <douglask@itee.uq.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:22 +01:00
Takashi Iwai 8c0d9649ba [ALSA] hda-codec - Add SPDIF output support to AD1986a laptop-eapd model
The SPDIF output on AD1986A laptop-eapd model is disabled although
some Samsung laptops have SPDIF output.  Enable it after checking the
pin default config.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:19 +01:00
Takashi Iwai 4806ef0cf4 [ALSA] hda-codec - Add SPDIF controls as slave on AD codecs
The AD codecs have hardware SPDIF volume/switch controls but they
are not assigned to the slave list for virtual master controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:16 +01:00
Takashi Iwai 628ed1333a [ALSA] hda-codec - Add missing slave for AD1884 master switch
The Speaker switch is missing in the slave list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:16 +01:00
Takashi Iwai 52a1d4f9d6 [ALSA] hda-codec - Remove obsolete FIXME's
Removed 'FIXME' comments that have been already fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:56 +01:00
Takashi Iwai 2134ea4f37 [ALSA] hda-codec - Add virtual master controls
Add master controls using vmaster to codecs that have no real hardware
master volume registers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:54 +01:00
Takashi Iwai 9004acc70e [ALSA] Remove sound/driver.h
This header file exists only for some hacks to adapt alsa-driver
tree.  It's useless for building in the kernel.  Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it.  This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:48 +01:00
Jerone Young ebf00c54a6 [ALSA] hda-codec - Add IEC958 digital out support for Lenovo Thinkpads T61/X61
This patch adds IEC958 digital out support for the AD1984 sound card.
This card can be found in Lenovo Thinkapds T61/X61. The digital out is
not located on the Thinkpad, but optional docking station (it's coxial
digital out). I've add this support as it is done the exact same way
for the AD1983 & AD1884.
I have tested this patch with my Lenovo Thinkpad T61 hooked up to a
docking station (that has the digital coxial) and then run to my home
theater reciever. Works like a charm :-)

Signed-off-by: Jerone Young <jerone@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Takashi Iwai 7db756f2b1 [ALSA] hda-codec - Sort ad1986a cfg table
Sort the ad1986a config table by PCI SSID (the last toshiba entry was
added wrongly).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Jiang Zhe 6b7eb1960d [ALSA] hda-codec - Device ID for Toshiba laptop which uses AD1986A
The model laptop-eapd get rid of the high-pitched noise.
(ALSA bug#3662)

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:43 +01:00
Takashi Iwai ac3e37412c [ALSA] hda-codec - sort pci quirk list
Sort pci quirk list in the order of PCI SSID.
This makes easier to find out the buggy duplicated entries.
Thanks to Andy Shevchenko for providing the sort script.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:37 +01:00
Johannes Stezenbach 695005cfe4 [ALSA] hda-intel: Enable Analog CD Input from internal ATAPI connector on Asus M2N-SLI
Enable Analog CD Input from internal ATAPI connector on Asus M2N-SLI.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Takashi Iwai 68ea7b2f2d [ALSA] hda-codec - Check value range in ctl callbacks
Check the value ranges in ctl put callbacks properly so that
invalid values won't be stored or written to registers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:24 +01:00
Tobin Davis d9f9b8baa0 [ALSA] HDA: Add Asus VX1 support
Simple patch to add the Asus VX1 laptop to the Analog Devices pci quirk list.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:15 +01:00
Takashi Iwai d29240ce57 [ALSA] hda-codec - Disable shared stream on AD1986A
AD1986A has a hardware problem that it cannot share a stream with
multiple pins properly.  The problem occurs e.g. when a volume is changed
during playback.
So far, hda-intel driver unconditionally assigns the stream to multiple
output pins in copy-front mode, and this should be avoided for AD1986A
codec.
The original fix patch was by zhejiang <zhe.jiang@intel.com>.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-11-19 18:38:32 +01:00
Takashi Iwai 41923e4413 [ALSA] hda-codec - Fix possible array overflow
dac_nids arrays in each codec support code may have up to 5 items
when assigned from the auto-configurator.  Some codec codes have
less numbers than the possible max.  This patch defines the constant
and fixes the array definitions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-23 08:07:55 +02:00
Takashi Iwai 53eb1b8540 [ALSA] hda-codec - Fix AD1986A Lenovo auto-mute
The jack detection bit on AD1986A Lenovo N100 seems inverse from
the standard definition.  Now fixed the detection properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-23 08:04:30 +02:00
Takashi Iwai 8ab78c7424 [ALSA] hda-codec - Add laptop-automute model for AD1986A
Added a new model laptop-automute for AD1986A, which has the HP jack
detection and auto-muting of the speaker.  Currently, it's used for
Lenovo N100.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:04 +02:00
Takashi Iwai 20a45e8644 [ALSA] hda-codec - Fix Master volume with AD1986A laptop model
Use the bind-control for NID 0x1a and 0x1b as Master volume control
on AD1986 model=laptop as well as model=laptop-eapd.  This will fix
the missing output on some devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:00 +02:00
Takashi Iwai cb53c626e1 [ALSA] hda-intel - Add POWER_SAVE option
Added CONFIG_SND_HDA_POWER_SAVE kconfig.  It's an experimental option
to achieve an aggressive power-saving.  With this option, the driver
will turn on/off the power of each codec and controller chip dynamically
on demand.
The patch introduces a new module option 'power_save'.  It specifies
the second of time-out for automatic power-down.  As default, it's
10 seconds.  Setting 0 means to suppress the power-saving feature.
The codec may have analog-input loopbacks, which are usually represented
by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'.
When these are on, we cannot turn off the mixer and the codec chip has
to be kept on.  For bookkeeping these states, a new codec-callback is
introduced.
For the bus-controller side, a new callback pm_notify is introduced,
which can be used to turn on/off the contoller appropriately.
Note that this power-saving might cause slight click-noise at
power-on/off.  Also, it might take some time to wake up the codec, and
might even drop some tones at the very beginning.  This seems to be the
side-effect of turning off the controller chip.
This turn-off of the controller can be disabled by undefining
HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:46 +02:00
Takashi Iwai cca3b3718c [ALSA] hda-codec - Clean up bind-controls
We have already a generic bind-control helper, so let's clean up the codes
using it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:45 +02:00
Takashi Iwai 47fd830acf [ALSA] hda-codec - add snd_hda_codec_stereo() function
Added snd_hda_codec_amp_stereo() function that changes both of stereo
channels with the same mask and value bits.  It simplifies most of
amp-handling codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:43 +02:00
Takashi Iwai 82beb8fd36 [ALSA] hda-codec - optimize resume using caches
So far, the driver looked the table of snd_kcontrol_new used for creating
mixer elements and forces to call each of its put callbacks in PM resume
code.  This is too ugly and hackish.
Now, the resume is simplified using the codec amp and command register
caches.  The driver simply restores the values that have been written
in the cache table.  With this simplification, most codec support codes
don't require any special resume callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:43 +02:00
Takashi Iwai 532d538179 [ALSA] hda-codec - Add a generic bind-control helper
Added callbacks for a generic bind-control of mixer elements.
This can be used for creating a mixer element controlling multiple
widgets at the same time.  Two macros, HDA_BIND_VOL() and HDA_BIND_SW(),
are introduced for creating bind-volume and bind-switch, respectively.
It taks the mixer element name and struct hda_bind_ctls pointer, which
contains the real control callbacks in ops field and long array for
private_value of each bound widget.
All widgets have to be the same type (i.e. the same amp capability).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:11 +02:00
Takashi Iwai bddcf5411f [ALSA] hda-codec - Fix AD1988 SPDIF output
The SPDIF output on AD1988 had some problems due to the wrongly routed
analog loopback to SPDIF.  This patch fixes the implementation of
'IEC958 Playback Source' mixer to handle the amp bits of mixer widget
0x1d correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:58 +02:00
Takashi Iwai a5ce88909d [ALSA] Clean up with common snd_ctl_boolean_*_info callbacks
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:45 +02:00
Takashi Iwai 0ac8551ea0 [ALSA] hda-codec - Add AD1882 codec support
Added AD1882 codec support.  It has currently two models, 3stack and
6stack.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:33 +02:00
Takashi Iwai b959d1f83f [ALSA] hda-codec - Fix Thinkpad X61/T61 outputs
Enable EAPD bit on Thinkpad X61/T61.  The recent model requires it
explicitly to make any sounds.   In future, it should be toggled
automatically on demand.
Also, added a beep volume/switch.  Some people like it although I
don't understand why :)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:26 +02:00
Takashi Iwai 538c49c41b [ALSA] hda-codec - Fix AD1984 basic model
Fix the amp direction of digital mic capture volume mixer, which
resulted in -EINVAL.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:23 +02:00
Takashi Iwai 3b194401a3 [ALSA] hda-codec - Fix Oops with AD1984 thinkpad model
Fixed Oops with AD1984 thinkpad model.  Also fixed the wrong
init verbs for NID 0x03 and 0x04, which have apparently no mute
bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:23 +02:00
Takashi Iwai 0ba7962b9f [ALSA] hda-codec - Fix wrong mixer controls for AD1984 thinkpad model
Fixed the wrong mixer controls for AD1984 thinkpad model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:19 +02:00
Takashi Iwai 2bac647c45 [ALSA] hda-codec - Add AD1884 / AD1984 codec support
Added the support of AD1884 and AD1984 codec chips.
Also experimental quirks for Thinkpad T61/X61 laptops with AD1984.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:18 +02:00
Takashi Iwai 35b26722a1 [ALSA] hda-codec - Fix AD1988 SPDIF playback route control
Fix AD1988 SPDIF playback route control for selecting ADC1-3.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:15 +02:00