Commit graph

456 commits

Author SHA1 Message Date
Takashi Iwai 86d190e77c ALSA: hda - Minor clean up of patch_sigmatel.c
- Remove unneeded semicolons
- Introduce spec->gpio_led to specify the GPIO bit for LED control

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:18:58 +02:00
Takashi Iwai 679d92ed14 ALSA: hda - Add 5stack-no-fp model for STAC927x
The recent fix for the headphone volume control on IDT/STAC codecs
resulted in the removal of invalid "Side" volume eventually.  But,
if the front panel doesn't exist, this setup could be regarded as a
sort of regression, as reported in kernel bug #13250.

Now as a workaround, a new model 5stack-no-fp is added so that the user
without the front panel can choose this one explicitly.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 19:00:08 +02:00
Takashi Iwai fa79796631 ALSA: hda - Fix digital beep tone calculation
The digital beep tone is calculated in two different ways depending
on the codec chip.  The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs.  Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.

This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:54:55 +02:00
Nickolas Lloyd 2fc9989079 ALSA: hda - add controls to toggle DC bias on mic ports
This patch adds a mixer control for the STAC92XX boards to control the
DC bias of mic ports, allowing recording from both powered and
non-powered sources.  It replaces the "Mic Output Switch" with "Mic Jack
Mode" to switch between Mic, Line In, and Line Out.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 15:34:10 +02:00
Takashi Iwai 22e336b776 Merge branch 'fix/hda' into topic/hda 2009-05-08 16:03:20 +02:00
Takashi Iwai 5dd17cb992 ALSA: hda - Fix line-in on Mac Mini Core2 Duo
BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:10 +02:00
James Gardiner 514bf54cd8 ALSA: hda - Addition for HP dv4-1222nr laptop support
Signed-off-by: James Gardiner <renidragsemaj@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-04 09:06:19 +02:00
Takashi Iwai ffd0e56c60 ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
When the headphone can have no unique DAC, the current code doesn't
check the HP-detection although it should.  Put the hp-detection check
before the DAC check to fix this bug.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 12:20:24 +02:00
Takashi Iwai 95c0909961 ALSA: hda - Avoid call of snd_jack_report at release
Don't call snd_jack_report at release of sigmatel and conexnat codecs
which results in Oops at unloading the module.

The Oops is triggered by the power-up sequence during the free due to
the pincfg restoration.  Since the power-up sequence is involved with
the unsol handling, the jack reporting may be issued during that.
The Oops occurs with this jack reporting because the jack instances
have been already released but the codec doesn't do the proper
book-keeping.

This patch adds the book-keeping of jack instances to avoid the access
to bogus pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 16:15:29 +02:00
Matthew Ranostay fd60cc897a ALSA: hda - Add VREF powerdown sequence for another board
Add powerdown sequence for VREF using a shared jack when the headphone
is present and the microphone isn't on.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07 04:26:04 +02:00
Matthew Ranostay ff2e7337b5 ALSA: Add 92HD81B1C device id
Added device id in struct for codec 92HD81B1C (0x111d76d5).

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-06 03:53:57 +02:00
Takashi Iwai 14bafe3278 ALSA: hda - Use cached calls to get widget caps and pin caps
Replace with the standard function calls to use caches for reading
the widget caps and pin caps.

hda_proc.c is still using the direct verbs to get raw values as
much as possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 16:36:55 +01:00
Takashi Iwai 1327a32b87 ALSA: hda - Cache pin-cap values
Added snd_hda_query_pin_caps() to read and cache pin-cap values
to avoid too frequently issuing the same verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 13:08:33 +01:00
Takashi Iwai 58d8395b74 ALSA: hda - Add another HP model with IDT92HD71bx codec
HP laptops require GPIO0 on as EAPD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-13 17:04:34 +01:00
Takashi Iwai 307282c899 ALSA: hda - Add model=vaio for STAC9872
Add the default pin config for model=vaio (in case of broken BIOS).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-12 18:17:58 +01:00
Takashi Iwai 6fce61aeaf ALSA: hda - Fix coding style issues in last two patches
Also re-ordered the quirk entries per SSID.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-10 07:49:50 +01:00
Christoph Plattner 443e26d014 ALSA: hda - Rework on patch_sigmatel.c for HP HDX16/HDX18
Code rework, comments of mail tiwai@suse.de (2009-03-09) incorporated.
Code tested on HP HDX16 (not tested on HDX18 yet).

Signed-off-by: Christoph Plattner <christoph.plattner@gmx.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-10 07:36:19 +01:00
Christoph Plattner ae6241fbf5 ALSA: hda - Added HP HDX16/HDX18 notebook support for HDA codecs (82HD71)
Added codec recognition of HP HDX platforms and added support of the
MUTE LED (orange/white). For this feature the CONFIG_SND_HDA_POWER_SAVE
is needed to use event handling for mute control.

Signed-off-by: Christoph Plattner <christoph.plattner@gmx.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-10 07:35:20 +01:00
Takashi Iwai 139e071b0f ALSA: hda - Assign HP and speaker DACs before mic/line-in
Assign DACs to HP and speaker before mic-in/line-in shared outputs.
This improves the usability as it results in more intuitive mixer
names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06 12:10:41 +01:00
Takashi Iwai ee58a7ca21 ALSA: hda - Connect to primary DAC if no individual DAC is available
In stac92xx_auto_fill_dac_nids[], connect to the primary DAC if no
individual DAC is available for each pin.  This ensures that the pin
works somehow at least.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06 12:00:24 +01:00
Takashi Iwai 668b9652be ALSA: hda - Create multiple HP / speaker controls with index
Create multiple "Headphone" and "Speaker" controls with non-zero index
numbers instead of "Headphone2", etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06 10:13:24 +01:00
Takashi Iwai dc04d1b4d2 ALSA: hda - Create output controls according to pin types for IDT/STAC
Improve the parser to pick up more intuitive control names for the
outputs judging from the pin type, instead of fixed names assigned
to channels.

Also, revive the multi-HP workaround since this change fixes the
problem with the multi-HP detection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06 10:04:24 +01:00
Takashi Iwai b3225190c1 Merge branch 'fix/hda' into topic/hda 2009-03-06 09:52:36 +01:00
Takashi Iwai c50ff7c042 ALSA: hda - Fix headphone-detect regression with multiple HP jacks
The recent changes over the DAC detection mechanism in patch_sigmatel.c
breaks the HP detection on the machines with multiple HP jacks.
It's basically because of the workaround to support the multi-channel
output.  Since the HP detection is more important feature, disable
the HP-swap workaroud temporarily.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06 09:47:22 +01:00
Takashi Iwai 14b97595e0 ALSA: hda - Fix typos in slave controls in patch_sigmatel.c
"Headphone Playback ..." appears twice in slave_vols[] and slave_sws[].
They should be "Headphone Playback2 ..."

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06 09:42:07 +01:00
Takashi Iwai 6565e4faca ALSA: hda - Add more hint options for IDT/Sigmatel codecs
Allow more options to be set/reset via hwdep hint entry.
hp_detect, gpio_mask, gpio_dir, gpio_data, eapd_mask and eapd_switch
can be checked.

For example, to disable hp_detect on the fly,
	# echo "hp_detect=0" > /sys/class/sound/hwC0D0/hints

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02 17:30:00 +01:00
Takashi Iwai d78d7a90ad ALSA: hda - Create "Analog Loopback" controls optionally
Don't create "Analog Loopback" controls as default since these controls
are usually more harmful than useful for normal users.
Only created when "loopback = yes" hint is given.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02 17:30:00 +01:00
Takashi Iwai f897497673 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2009-02-27 17:47:31 +01:00
Takashi Iwai ea18aa4644 ALSA: hda - Fix digital mic on dell-m4-1 and dell-m4-3
Fix num_dmuxes initialization for dell-m4-1 and dell-m4-3 models
of IDT 92HD71bxx codec, which was wrongly set to zero.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-27 17:36:33 +01:00
Takashi Iwai 1607b8ea0a ALSA: hda - Add model=auto for STAC/IDT codecs
Added the model=auto to STAC/IDT codecs to use the BIOS default setup
explicitly.  It can be used to disable the device-specific model quirk
in the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-26 16:50:43 +01:00
Takashi Iwai 330ee99579 ALSA: hda - Remove IDT codec-specific pin save/restore functions
Removed its own save/restore functions and replaced with the common code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20 16:48:39 +01:00
Takashi Iwai 2ae466f8cc ALSA: hda - Cleanup IDT92HD7x HP quirks
Clean up IDT92HD7x quirks for HP laptops with SND_PCI_QUIRK_MASK().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16 14:16:36 +01:00
Herton Ronaldo Krzesinski e2ea57a8df ALSA: hda - Fix speaker output on HP DV4 1155-SE
Force speaker pin config with model=hp-dv5 model for cases when bios
doesn't set it up properly. All reported hp laptops using model=hp-dv5
model have speaker at pin 0x0d with same config, so it's safe to add
this within hp-dv5 model.

Reference: alsa-devel mailing list thread on
    http://mailman.alsa-project.org/pipermail/alsa-devel/2009-February/014390.html

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16 10:23:00 +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 344384494e Merge branch 'fix/hda' into topic/hda 2009-02-13 08:41:44 +01:00
Herton Ronaldo Krzesinski 92258a3ed2 ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model
Change HP dv7 quirk: although reported to work with hp-m4 model
(https://bugzilla.novell.com/show_bug.cgi?id=445321), the original
report doesn't contain info about testing of internal microphone.

Recently I received a report about internal mic not working
(https://qa.mandriva.com/show_bug.cgi?id=44855#c193), this must be
related with the forced line in on pin 0x0e done with hp-m4 model. Thus
change the current quirk from STAC_HP_M4 to STAC_HP_DV5, later reported
to be fixed on a provided kernel with this change
(https://qa.mandriva.com/show_bug.cgi?id=44855#c196).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13 08:41:00 +01:00
Matthew Ranostay 8bb0ac5573 ALSA: hda: Add STAC_DELL_S14 quirk
Add STAC_DELL_S14 quirk for new laptop series. Removed un-needed pins
in pin_nids for stac92hd83xxx. Also reorganized connection selection
code for the respective ports per quirk define.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13 08:35:08 +01:00
Herton Ronaldo Krzesinski c98041f7d7 ALSA: hda - Cleanup setting of pin_configs in patch_stac927x
After commit "ALSA: hda - Fix restore of pin configs at resume for
STAC/IDT codecs", the introduced stac_save_pin_cfgs function checks
already for pins == NULL case, saving then default pin configs from
machine with stac92xx_save_bios_config_regs. So we can remove the
extra checks when stac927x_brd_tbl[spec->board_config] == NULL.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-12 00:17:31 +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
Herton Ronaldo Krzesinski 23c7b521c2 ALSA: hda - Don't touch non-existent port f on 4-port 92hd71bxx codecs
When checking for input amps on pins 0x0a, 0x0d and 0x0f, and
initializing them for 92hd71xxx codec models, we must skip nid 0x0f
for 4-port models too like with 5-port models, as it is unused
(nid 0x0f is vendor reserved in 4-port models).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-09 08:25:23 +01:00
Herton Ronaldo Krzesinski 8663ae55f3 ALSA: hda - Bind new ecs mobo id (1019:2950) to model=ecs202
This adds a new sound quirk entry (model=ecs202) for an ecs motherboard
with IDT STAC9221 codec (1019:2950).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-09 08:25:08 +01:00
Matthew Ranostay 45c1d85bcc ALSA: hda: Added stac378x digital slave out struct
Added the ADATOut nid to a slave digital outs struct to allow output
via the DigOut pin.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 08:01:01 +01:00
Herton Ronaldo Krzesinski 29d4ab4d6e ALSA: hda - Don't call stac92xx_parse_auto_config with wrong dig_in
Don't use uneeded/wrong third parameter for stac92xx_parse_auto_config
in patch_stac92hd71bxx (no SPDIF in).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 07:56:35 +01:00
Herton Ronaldo Krzesinski 6df703aefc ALSA: hda - Dynamic detection of dmics/dmuxes/smuxes in stac92hd71bxx
Detect the number of connected ports and number of smuxes dynamically,
looking at pin configs, using new introduced functions
stac92hd71bxx_connected_ports and stac92hd71bxx_connected_smuxes. Also
use proper input mux configuration for 4port and 5port models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 07:54:34 +01:00
Herton Ronaldo Krzesinski 616f89e74c ALSA: hda - Additional pin nids for STAC92HD71Bx and STAC92HD75Bx codecs
Current code for STAC92HD71Bx and STAC92HD75Bx doesn't consider pin
complexes 0x20 and 0x27. Also for 4 port models, nids 0x0e and 0x0f
are vendor reserved. This commit changes code so it'll consider the
additional pin complexes for models that have it, and avoid reserved
nids to be touched on 4 port models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 07:54:32 +01:00
Takashi Iwai 51408e8a32 Merge branch 'fix/hda' into topic/hda 2009-02-02 11:43:36 +01:00
Takashi Iwai 42de55cb3b ALSA: hda - Add quirk for another HP dv5 model
Added model=hp-dv5 for another HP dv5 model with AMD chip (103c:3600)

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-30 15:49:58 +01:00
Matthew Ranostay ca8d33fc9f ALSA: hda: 92hd71xxx disable unmute support for codecs that don't have input amps
Some revisions of the 92hd71xxx codec families don't have input amps
on ports 0xa, 0xd and 0xf, so probe the widget caps on port 0xa and
check for support, if found run snd_hda_sequence_write_cache() on the
stac92hd71xxx_unmute_core_init verb list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-26 16:50:26 +01:00
Takashi Iwai e3c7596466 ALSA: hda - Create "Input Source" control dynamically for STAC/IDT
Instead of fixed kcontrol_new element, build "Input Source" controls
dynamically.  If the number of input-source items is 0 or 1, we don't
need to create such a control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 11:57:22 +01:00
Takashi Iwai 028b9445b4 Merge branch 'fix/hda' into topic/hda 2009-01-23 11:55:52 +01:00
Takashi Iwai 00a602db1c ALSA: hda - Fix PCM reference NID for STAC/IDT analog outputs
The reference NID for the analog outputs of STAC/IDT codecs is set
to a fixed number 0x02.  But this isn't always correct and in many
codecs it points to a non-existing NID.

This patch fixes the initialization of the PCM reference NID taken
from the actually probed DAC list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 11:55:42 +01:00
Takashi Iwai 8056d47e77 ALSA: hda - Add model=ref for Intel board with STAC9221
An intel board (8086:0204) works only with model=ref.

Reference: Novell bug #406529
	https://bugzilla.novell.com/show_bug.cgi?id=406529

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 09:09:43 +01:00
Matthew Ranostay 577aa2c195 ALSA: hda: add reference board SND_PCI_QUIRK
Add another LanParty reference board SND_PCI_QUIRK to quirk lists of
all codec families.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 08:11:43 +01:00
Takashi Iwai 7907f6a411 Merge branch 'fix/hda' into topic/hda 2009-01-23 08:07:51 +01:00
Matthew Ranostay 32ed3f4640 ALSA: hda: Add STAC92HD83XXX_PWR_REF quirk
Some revisions of the 92hd8xxx codec's not supporting port power
downs in which the using of it causes capture and also randomly
playback streams to not function at all. Thus by disabling it by
default and adding a option to enable it manually will fix all issue
on current and future revisions.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 08:06:57 +01:00
Matthew Ranostay 87e88a746d ALSA: hda: revert change to 92hd83xxx power mapping
Port 0xe power mapping was incorrect set to 0x80 changed to the correct
value 0x40.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-23 08:05:02 +01:00
Takashi Iwai d9a4268ee9 ALSA: hda - Add quirk for Gateway %1616 laptop
Gateway T1616 laptop needs EAPD always on while the current STAC9205
code turns off per HP plug.  Added a new model "eapd" to keep it on.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-22 17:41:14 +01:00
Takashi Iwai eda6829394 Merge branch 'fix/hda' into topic/hda 2009-01-22 17:10:22 +01:00
Takashi Iwai 8ce8419829 ALSA: hda - Avoid to set the pin control again if already set
Check the present pin control bit and avoid the write if it's already
set in patch_sigmatel.c.  This will reduce the number of verb execs at
jack plugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-22 16:59:20 +01:00
Takashi Iwai e0c0e943af ALSA: hda - Add model entry for HP dv4
Added model=hp-dv5 for HP dv4 (103c:30f7).

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-22 12:58:11 +01:00
Takashi Iwai 1eaf5c0716 Merge branch 'test/hda-vol-ofs' into next/hda 2009-01-22 08:33:04 +01:00
Takashi Iwai 1e137f929b ALSA: hda - Clean up old VAIO hack codes for STAC9872
Get rid of old VAIO static hack codes for STAC9872 and use the BIOS
auto-parser for all models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-21 07:42:02 +01:00
Takashi Iwai d30e6caac2 Merge branch 'topic/hda' into next/hda 2009-01-21 07:34:08 +01:00
Matthew Ranostay 65557f3507 ALSA: hda: 83xxx port 0xe DAC selection
On the 92hd8xxx codecs port 0xe needs the connection selected to be the
last DAC in the list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-21 01:10:37 +01:00
Takashi Iwai 8c441982fd ALSA: hda - Assign proper digital I/O type for STAC/IDT
Assign the proper PCM digital I/O type (HDA_PCM_TYPE_*) for the digital
I/O on STAC/IDT codecs.  HDA_PCM_TYPE_HDMI is assigned for the HDMI I/O.

A similar framework is implemented to patch_realtek.c, but it's not
set up and still using only HDA_PCM_TYPE_SPDIF yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-20 18:30:20 +01:00
Takashi Iwai caa10b6e80 ALSA: hda - Improve auto-probing of STAC9872 codec
Use the standard STAC/IDT auto-probing routine for non-static
STAC9872 codec probing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-20 17:19:01 +01:00
Takashi Iwai 7c7767ebe2 ALSA: hda - Halve too large volume scales for STAC/IDT codecs
STAC/IDT codecs have often too large volume scales such as -96dB,
and exposing this as is results in too large scale in percentage
representation.

This patch adds the check of the volume scale and halves the
volume range if it's too large automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-20 15:31:14 +01:00
Matthew Ranostay 989738c4f8 ALSA: hda: fix invalid power mapping masks
Fixed invalid power mappings for ports 0xd and 0xe on 93hd83xxx codecs.
They were shifted right one too many bits.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-18 11:03:51 +01:00
Takashi Iwai c9280d681c ALSA: hda - Fix (yet more) STAC925x issues
The codec-parsing of STAC925x was utterly broken due to its unique
design unlike other STAC codecs.  It has a volume control only in NID
0x0e (similar as STAC9200), but the parser assumes that the amp is
available on each DAC widget.

The patch fixes the whole wrong stories: fix the initial volume,
assign the fixed "Master" volume, and avoid to create wrong volume
controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-15 17:33:47 +01:00
Takashi Iwai 428549f574 ALSA: hda - Fix invalid amp value for STAC925x
The value set in the commit 2465fb6605
is actually wrong.  The value range is from 0 to 0x1f while the patch
sets to 0x7f.  Let's fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-15 17:02:49 +01:00
Takashi Iwai 1b0652eb58 ALSA: hda - Fix HP dv5 mic input
Fix HP dv5 (103c:3603) built-in mic input.

Reference: kernel bug 12440
	http://bugzilla.kernel.org/show_bug.cgi?id=12440

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org
2009-01-14 23:28:13 +01:00
Takashi Iwai 2465fb6605 ALSA: hda - Fix missing initialization of NID 0x0e for STAC925x
The selector widget 0x0e isn't initialized properly in the whole probe
process, thus it can be a wrong value depending on the BIOS setup.

This patch adds the init verb to set it to the max & unmuted.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-14 15:58:55 +01:00
Takashi Iwai 9248f26939 ALSA: hda - Fix stac92hd83xxx_amp_nids[]
Fix the bug introduced in commit c15c5060fc:
  sound/pci/hda/patch_sigmatel.c: In function ‘patch_stac92hd83xxx’:
  sound/pci/hda/patch_sigmatel.c:4765: warning: assignment from incompatible pointer type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-14 09:40:25 +01:00
Takashi Iwai 8317e0b0c2 ALSA: hda - Don't reset HP pinctl in patch_sigmatel.c
Resetting HP pinctl at the unplugged state may cause a sort of regression
on some devices because of their wrong pin configuration.

A simple workaround is to disable the pin reset.  This is ugly and may be
not good from the power-saving POV (if any), but damn simple.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org
2009-01-14 08:00:49 +01:00
Matthew Ranostay c15c5060fc ALSA: hda: stac92hd8xxx amp mixers
Added amp nid for stac92hd8xxx families of codecs so the input amp
mixer is created.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-14 07:49:35 +01:00
Takashi Iwai 2acc9dcb60 ALSA: hda - Fix silent headphone output on Panasonic CF-74
CF-74 does the headphone/speaker switching on hardware, thus the driver
shouldn't do any software-toggling of pins.  Otherwise it results in a
silent headphone output.

This patch simply resets the hp_detect flag to fix the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-14 07:48:50 +01:00
Takashi Iwai 14ed74fbe2 Merge branch 'topic/hda-gateway' into topic/hda 2009-01-13 17:50:46 +01:00
Giuseppe Bilotta dafb70ce10 ALSA: hda - Add quirk for another HP dv5
Add the model=hp-m4 quirk for another HP dv5 (103c:3603)
Reference: kernel bug#12440
	http://bugzilla.kernel.org/show_bug.cgi?id=12440

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org
2009-01-13 15:14:12 +01:00
Takashi Iwai f9d088b208 ALSA: hda - Fix a typo
Fix a typo in stac92hd83xxx_cfg_tbl[].  The actual number is identical
thus there is no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-13 11:54:49 +01:00
Takashi Iwai 7645c4bfbb Merge branch 'fix/hda' into topic/hda 2008-12-24 11:04:08 +01:00
Herton Ronaldo Krzesinski 574f3c4f5c ALSA: hda - Add missing terminators in patch_sigmatel.c
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-24 11:03:56 +01:00
Matthew Ranostay 74b7ff48a9 ALSA: hda: fix incorrect mixer index values for 92hd83xx
Fixed incorrect mixer index values for 92hd83xx codec's audio
input mixer.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-20 23:49:45 +01:00
Matthew Ranostay f8ccbf65af ALSA: hda: dinput_mux check
Add check to determine if dinput_mux is set by any of patch_stac*() functions,
otherwise a invalid pointer my be referenced causing gibberish to mixer values.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-20 23:48:44 +01:00
Takashi Iwai 69dfaefee4 ALSA: hda - Add quirk for another HP dv7
Added the model=hp-m4 quirk for another HP dv7 (103c:30fc) with IDT
92HD71b* codec.

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

Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-20 16:57:50 +01:00
Takashi Iwai eb63212868 ALSA: hda - Power up always when no jack detection is available
When no jack detection is available, the pins should be always
turned on since it can't be turned on/off dynamically via unsol
events.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 16:41:06 +01:00
Takashi Iwai 9158923228 ALSA: hda - Fix unused variable warnings in patch_sigmatel.c
Fixed "unused varible" warnings in patch_sigmatel.c that have been
introduced by the last changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 15:59:40 +01:00
Takashi Iwai 766245348d ALSA: hda - Use more distinct name for a unique volume in STAC/IDT
When the line_out has only one DAC and it's unique (i.e. not shared
by other outputs), assign a more reasonable and distinct mixer name
such as "Headphone" or "Speaker".

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 15:09:38 +01:00
Takashi Iwai c21ca4a872 ALSA: hda - Rework on STAC/IDT auto-configuration code
The current auto-configuration code has several problems especially
for the new IDT codecs, e.g. wrong assignment of pins and DACs or
coupled volume for speaker and headphone.

This patch is a fairly large rewrite of the auto-configuration code.
Some remaks

- mic_switch and line_switch contain NIDs instead of bool
- dac_list isn't fixed for IDT 92HD* codecs now, they are all probed
- extra HP and speakers are stored in extra_dacs[].

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 15:09:36 +01:00
Takashi Iwai 03c6901ea2 Merge branch 'fix/hda' into topic/hda 2008-12-19 14:24:13 +01:00
Takashi Iwai 8f55c1e51f ALSA: hda - Remove non-working headphone control for Dell laptops
The previous commit re-enabled hp_nid setup for IDT92HD73*, but
it's unneeded indeed for Dell laptops that have multiple headphones.
Setting the extra hp_nid results in a non-working "Headpohne" mixer
control.  Thus hp_nid should be 0 for these dell models.

Also, the automatic addition of hp_nid should check whether it's
a dual-HP model or not.  For dual-HPs, the pins are already checked
by the early workaround.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 14:23:08 +01:00
Takashi Iwai 4f2d23e1c3 ALSA: hda - Use snd_hda_ctl_add() in patch_sigmatel.c
Fixed the call of snd_ctl_add() by replacing with snd_hda_ctl_add()
so that this mixer element can be tracked for re-configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 10:14:13 +01:00
Takashi Iwai 0ff555192a Merge branch 'fix/hda' into topic/hda 2008-12-19 08:22:57 +01:00
Takashi Iwai 9e43f0de69 ALSA: hda - Add no-jd model for IDT 92HD73xx
Added the model without the jack-detection for some desktops that
have really no jack-detection.  The recent driver caused regressions
regarding the sound output on such machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 08:22:26 +01:00
Takashi Iwai 85f13b673f ALSA: Revert "ALSA: hda: removed unneeded hp_nid references"
This reverts commit 07f455f779.
    ALSA: hda: removed unneeded hp_nid references

    Removed unneeded hp_nid references for 92hd73xx codec family.

This caused the silent output on some Intel desktops due to missing
routing of widget 0x0a and 0x0d.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 08:20:38 +01:00
Joerg Schirottke fa620e97fe ALSA: hda - Add quirk for Dell Studio 17
Added the matching model=dell-m6 for Dell Studio 17 laptop.

Signed-off-by: Joerg Schirottke <master@kanotix.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 08:13:49 +01:00
Takashi Iwai e28d83223a ALSA: hda - Fix silent HP output on D975
Some desktops seems to have no HP/mic jack detection on the front panel,
which results in the silent output in the recent driver, because the
driver mutes the output (to save power) when no plug is detected.

This patch adds a new model that disables the jack-detection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-18 09:06:29 +01:00
Takashi Iwai 12dde4c6d6 ALSA: hda - Proper power-map toggling for input pins
The current code overrides the event type on input pins always to
PWR_EVENT.  Although this still works (PWR_EVENT and INSERT_EVENT
are handled samely), it'd be better to avoid such overrides.

Also, currently the unsol events are registered even for fixed pins
which will never raise the pin-detection event.

This patch fixes both issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-05 13:09:27 +01:00
Takashi Iwai e6e3ea25b1 ALSA: hda - Fix pin-detection in patch_sigmatel.c
The pin-detection function used in patch_sigmatel.c shouldn't be specific
to HP pin because it's used for input pins in general, too.

This patch fixes the detection function, removes the HP check from it
and moves to stac92xx_hp_detect().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-05 12:54:56 +01:00
Takashi Iwai 0640f84fac Merge branch 'topic/hda-modularize' into topic/hda 2008-12-03 14:43:14 +01:00
Takashi Iwai 8c2f767bf3 ALSA: hda - Remove unnecessary caches for power states in patch_sigmatel.c
The power-state changes in patch_sigmatel.c are accessed via *_cached()
but they shouldn't be really cached.  Fixed to the normal write.

Also, stac92hd71xx_suspend and resume are no longer necessary as the
power-state changes are handled properly in the common routine.
Removed these hacks now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 11:54:35 +01:00
Takashi Iwai c9b46f9144 ALSA: hda - Use amp cache for SPDIF mute controls in patch_sigmatel.c
The amp switch of SPDIF outputs have to be cached in the amp cache
instead of codec cache.  Otherwise it conflicts with the IEC958
playback switch control in hda_codec.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 11:52:25 +01:00
Mauro Carvalho Chehab 58eec4235d ALSA: hda - More fixes on Gateway entries
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-30 11:09:20 +01:00
Mauro Carvalho Chehab 9cb36c2afc ALSA: patch_sigmatel: Add missing Gateway entries and autodetection
Gateway autodetection and entries are incomplete.

This patch adds the entries found at the .INI file for their driver version
5.10.5082.0.

It also uses the proper code to seek for notebook ID, since this is based on
codec subsystem ID on those devices.

This should provide a proper pinup for several gateways notebooks:
	Gateway M465-E Notebook [Part #1008637]
	Gateway M465-G Notebook [Part #1008667]
	Gateway NX260X Notebook [Part #1008794]
	Gateway NX100X Notebook [Part #1008798]
	Gateway E-100M Notebook [Part #1008799]
	Gateway E-100M G Notebook [Part #1008800]
	Gateway M255-E Notebook [Part #1008801]
	Gateway M255-G Notebook [Part #1008803]
	Gateway M285-E Convertible Notebook [Part #1008804]
	Gateway M285-G Convertible Notebook [Part #1008805]
	Gateway CX210S Convertible Notebook [Part #1008807]
	Gateway CX210X Convertible Notebook [Part #1008808]
	Gateway E-100M SB Notebook [Part #1008973]
	Gateway M255-E SB Notebook [Part #1008989]
	Gateway M285-E SB Convertible Notebook [Part #1008990]
	Gateway M465-E Notebook [Part #1009022]
	Gateway CX2724 Convertible Notebook [Part #1009036]
	Gateway MX1025 Notebook [Part #1009046]
	Gateway CX2720 Convertible Notebook [Part #1009063]
	Gateway CX2724h Convertible Notebook [Part #1009089]
	Gateway MX1023 Notebook [Part #1009097]
	Gateway MX1023h Notebook [Part #1009098]
	Gateway NX260X Notebook [Part #1009112]
	Gateway E-100M Notebook [Part #1009126]
	Gateway MX7533 Notebook [Part #1009146] [Part #1009163]
	Gateway CX210X Convertible Notebook [Part #1009346]
	Gateway NX570X Notebook [Part #1009442]
	Gateway NX570X Notebook [Part #1009448]
	Gateway NX270S Notebook [Part #1009550]
	Gateway MX6448 Notebook [Part #1013912R]
	Gateway MX6453 Notebook [Part #1013913R]
	Gateway MX6216 Notebook [Part #1013916R]
	Gateway MX6931 Notebook [Part #1013918R]
	Gateway CX2726 Convertible Notebook [Part #1013921R]
	Gateway MP8708 Notebook [Part #1013924R]
	Gateway MX6446 Notebook [Part #1013927R]
	Gateway MX6930 Notebook [Part #1013928R]
	Gateway MX6447 Notebook [Part #1013932R]
	Gateway MX6454 Notebook [Part #1013943R]
	Gateway MX6439 Notebook [Part #1013947R] [Part #1013955R] [Part #1013971R]
	Gateway MX6930h Notebook [Part #1013973R] [Part #1013974R] [Part #1013975R]
	Gateway MX6955 Notebook [Part #1014028R]
	Gateway MX6956 Notebook [Part #1014033R]
	Gateway MX6959 Notebook [Part #1014061R]
	Gateway MX6957 Notebook [Part #1014065R]
	Gateway MX6960 Notebook [Part #1014068R]
	Gateway MX6958 Notebook [Part #1014072R]
	Gateway NX570X Notebook [Part #1014077R]
	Gateway NX570XL Notebook [Part #1014078R]
	Gateway NX570QS Notebook [Part #1014079R]
	Gateway MX6961 Notebook [Part #1014080R] [Part #1014106R]
	Gateway MX6961h Notebook [Part #1014112R]
	Gateway NX270S Notebook [Part #1014120R]
	Gateway MX6431 Notebook [Part #1014121R]
	Gateway MX8710 Notebook [Part #2905895R]
	Gateway MX3702 Notebook [Part #2905898R]
	Blade-K8F GW UMA Single Core Motherboard w/RS485M and 1394 - Quanta (FRU) [Part #4006133R]

Since some entries conflict with existing pinups, I'm providing a separate
patch to fix those entries.

Tested only with Gateway MX6453.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-30 11:09:19 +01:00
Takashi Iwai 2d34e1b3bb ALSA: hda - Add IDT/STAC-specific proc output
Added power-map and analog-loopback information to proc output for
IDT/STAC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 14:40:55 +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 eefe93b995 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-25 15:20:57 +01:00
Takashi Iwai 661cd8fb52 ALSA: hda - Check model for Dell 92HD73xx laptops
Check the model type instead of PCI SSID for detection of the mic types
on Dell laptops with IDT 92HD73xx codecs.  In this way, a new laptop
can be tested via model module option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 15:18:29 +01:00
Takashi Iwai c65574abad ALSA: hda - mark Dell studio 1535 quirk
Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 15:17:08 +01:00
Takashi Iwai 95026623da ALSA: hda - No 'Headphone as Line-out' swich without line-outs
STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 15:15:05 +01:00
Takashi Iwai c6e4c66613 ALSA: hda - Assign unsol tags dynamically in patch_sigmatel.c
Since we need to handle many unsolicited events assigned to different
widgets, allocate the event dynamically using the existing events
array, and use the tag appropriately instead of combination of fixed
number and widget nid.  (Note that widget nid can be over 4 bits!)

Also, replaced the call of unsol_event handler with a dedicated
function to be more readable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 11:58:19 +01:00
Takashi Iwai 0e19e7d2bf Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-25 11:56:25 +01:00
Takashi Iwai f73d35853e ALSA: hda - Fix AFG power management on IDT 92HD* codecs
The AFG pin power-mapping isn't properly set for the fixed I/O pins
on IDT 92HD* codecs.  This resulted in the low power mode after the
boot until any jack detection is executed, thus no output from the
speaker.

This patch fixes the power mapping for the fixed pins, and also fixes
the GPIO bits and digital I/O pin settings properly in stac92xx_ini().

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 11:53:50 +01:00
Takashi Iwai a9cb5c9053 ALSA: hda - No 'Headphone as Line-out' swich without line-outs
STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-24 07:51:11 +01:00
Takashi Iwai c70bfa8733 Merge branch 'topic/fix/hda' into topic/hda 2008-11-21 18:02:57 +01:00
Takashi Iwai d6752a532c ALSA: hda - mark Dell studio 1535 quirk
Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 18:01:44 +01:00
Takashi Iwai b94d3539de ALSA: hda - Fix double free of jack instances
The jack instances created in patch_sigmatel.c may be double-freed.
The device management code checks the invalid element, and thus there
is no real breakage, but it spews annoying warning messages.
But, we can't simply remove the release calls of these jack instances
because they have to be freed when the codec is re-configured.

Now, a new flag, bus->shutdown is introduced to indicate that the bus
is really being unloaded, i.e. the objects managed by the device
manager will be automatically deleted.  We release these objects only
when this flag isn't set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 09:08:06 +01:00
Takashi Iwai b0fc5e0434 ALSA: hda - Add a quirk for Dell Studio 15
Added the matching model=dell-m6 for Dell Studio 15 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:37:03 +01:00
Takashi Iwai 75a287d9a3 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-21 08:27:04 +01:00
Matthew Ranostay 3a7abfd2ba ALSA: hda: Add STAC_DELL_M4_3 quirk
Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the
board config switch to assign number of digital muxes, microphones,
and SPDIF muxes via the PCI quirk defined.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:17:00 +01:00
Matthew Ranostay 0253fdcd8a ALSA: hda: STAC_DELL_M6 EAPD
Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

This patch fixes the regressions, the silent output on HP of some Dell
laptops (see Novell bnc#446025):
	https://bugzilla.novell.com/show_bug.cgi?id=446025

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-20 17:11:10 +01:00
Matthew Ranostay c6798d2bd1 ALSA: hda: EAPD mute on suspend
Moved support for EAPD mute on suspend from stac92hd71xx_suspend
to the generic stac92xx_suspend function.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 07:37:23 +01:00
Takashi Iwai a581780aa1 Merge branch 'topic/fix/hda' into topic/hda 2008-11-18 10:57:07 +01:00
Takashi Iwai c5d08bb567 ALSA: hda - Fix resume of GPIO unsol event for STAC/IDT
Use cached write for setting the GPIO unsolicited event mask to be
restored properly at resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:55:36 +01:00
Takashi Iwai 80bf272468 ALSA: hda - Add quirks for HP Pavilion DV models
Added the quirk entries for HP Pavilion DV5 and DV7 with model=hp-m4.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:48:41 +01:00
Takashi Iwai 41c3b648bd ALSA: hda - Fix GPIO initialization in patch_stac92hd71bxx()
Fixed the GPIO mask and co initialization in patch_stac92hd71bxx()
so that the gpio_maks for HP_M4 model is set properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:45:15 +01:00
Takashi Iwai af9f341a94 ALSA: hda - Fix restore of pin configs at resume for STAC/IDT codecs
Fixed the restore of pin configs at resume for some STAC/IDT codec
models.  These models set explicitly the pin configs after the default
init configs, and these aren't restored properly at resume.

This patch introduces two changes:
- Allocate always pin_configs array in stac_spec so that the driver
  can overwrite the value freely
- Introduce stac_change_pin_config() to change the pin config value

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:42:00 +01:00
Takashi Iwai 2c885878c1 ALSA: hda - Use init callback in stac92xx_resume()
Call the init callback and remove duplicated codes in stac92xx_resume().
This also fixes the missing initialization such as digital I/O pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 09:43:10 +01:00
Takashi Iwai e4973e1e5a ALSA: hda - Create jack detection elements in build_controls
The jack detection input elements should be created in build_controls
callback instead of init callback because init can be called multiple
times by suspend/resume and power-saving.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 09:43:05 +01:00
Matthew Ranostay c0cea0d09d ALSA: hda: STAC_DELL_M6 EAPD
Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-17 09:56:35 +01:00
Takashi Iwai 8e5f262bfc ALSA: hda - Check model type instead of SSID in patch_92hd71bxx()
Check board preset model instead of codec->subsystem_id in
patch_92hd71bxx() so that other hardwares configured via the model
option work like the given model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-15 19:28:54 +01:00
Takashi Iwai e2da9ba570 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-15 19:05:21 +01:00
Matthew Ranostay c39555d6ed ALSA: hda: STAC_VREF_EVENT value change
Changed value for STAC_VREF_EVENT from 0x40 to 0x00 because the
unsol response value is only 6-bits width and the former value
was 1<<6 which is an overrun.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-15 19:04:26 +01:00
Takashi Iwai 127e82e3bf ALSA: hda - Support Headphone and Speaker volumes control on VAIO
Split the bound Master control to individual Headphone and Speaker
volume controls for VAIO with STAC982x codecs.
The Master controls is still created as a vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-14 14:03:33 +01:00
Takashi Iwai cd80bc6f48 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-13 14:38:00 +01:00
Takashi Iwai 4d4e9bb339 ALSA: hda - Add digital beep playback switch for STAC/IDT codecs
The digital beep widget may have no mute control, and always enabling
the beep is ofen pretty annoying, especially on laptops.

This patch adds a mixer control "PC Beep Playback Switch" when there
is no mixer amp mute is found, and controls it on software.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-13 14:37:14 +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
Takashi Iwai d7a8943635 ALSA: hda - Fix IDT/STAC multiple HP detection
Due to the recent change for multiple HP as line-out switch, only
one of the multiple headphons (usually a wrong one) is toggled
and the other pins are still disabled.  This causes the silent output
problem on some Dell laptops.

Also, the hp_switch check is screwed up when a line-in or a mic-in
jack exists.  This is added as an additional output, but hp_switch
check doesn't take it into account.

This patch fixes these issues: simplify hp_switch check by using
the NID instead of bool, and clean up / fix the toggle of HP pins
in unsol event handler code.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-12 10:00:56 +01:00
Takashi Iwai 4f1e6bc364 ALSA: hda - Fix input pin initialization for STAC/IDT codecs
The input pins are sometimes not initialized properly because
of the optimization check of the current pinctl code.

Force to initialize the mic input pins so that they can be set up
properly even if they were in a weird state.  But keep other input
pins if already set up as input, since this could be an extra mic
pin.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-11 18:00:53 +01:00
Takashi Iwai 355a0ec471 ALSA: hda - Add missing analog-mux mixer creation for STAC9200
The creation of analog-mux mixer element is missing in
patch_stac9200() due to the dynamic allocation patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-11 16:46:19 +01:00
Takashi Iwai 0774023172 Merge branch 'topic/fix/hda' into topic/hda 2008-11-07 09:06:45 +01:00
Matthew Ranostay 6b3ab21ef1 ALSA: hda: make a STAC_DELL_EQ option
Add support for explicitly enabling the EQ distortion hack for
systems without software biquad support.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-03 14:29:47 +01:00
Takashi Iwai 1b063c3d09 Merge branch 'topic/fix/hda' into topic/hda 2008-10-29 08:17:05 +01:00
Takashi Iwai c1e99bd9d6 ALSA: hda - Fix SPDIF mute on IDT/STAC codecs
The SPDIF mute switch code seems broken.  It doesn't set unmute bits
properly.  Also it contains the duplicated lines (merge error?) to be
cleaned up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-29 08:03:42 +01:00
Takashi Iwai 42dc2378b5 Merge branch 'topic/hda-next' into topic/hda 2008-10-27 08:36:48 +01:00
Matthew Ranostay 74aeaabc3e ALSA: hda: add support for jack detection on IDT codecs.
This patch adds support to the IDT codec families to report jack status
to the jack abstraction layer. This required some reorganization in the
stac92xx_unsol_event function in which the index value is changed to
reporting the nid with the event.

Also adds an sigmatel_jack struct to keep track of the nid relation
to the jack abstraction layer instance. Also adds functions to set and
retrieve data values for each nid, this is used in stac92xx_unsol_event
to retrieve the GPIO mask for STAC_VREF_EVENT.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-27 08:15:15 +01:00
Harvey Harrison da74ae3e32 ALSA: hda - correct bracketing in spdif test in patch_sigmatel.c
Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-22 08:00:46 +02:00
Takashi Iwai ebaa047058 ALSA: hda - Release jack instance for dynamic reconfigure
The jack instance has to be release manually in free callback
in patch_sigmatel.c for dynamic reconfiguration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-16 16:39:56 +02:00
Takashi Iwai dd125b28c1 Merge branch 'topic/hda-reconfig' into topic/hda-next 2008-10-16 16:39:46 +02:00