Archived
14
0
Fork 0
Commit graph

3445 commits

Author SHA1 Message Date
Roel Kluin
84ed1a1942 ALSA: Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.

In dac_audio_write() there does not occur a test for wrapped
values, but the test appears redundant.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:25:07 +01:00
Lydia Wang
36dd5c4aff ALSA: VIA HDA: Add support for VT1818S.
Add support for VT1818S codec, which is similiar with VT1708S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:08:18 +01:00
Julia Lawall
4b3be6afa4 ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.

In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:01:27 +01:00
peer chen
db32f99816 ALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller
Add the generic device ID for NVIDIA HDA controller.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:59:12 +01:00
Wu Fengguang
fd080b2d8a ALSA: hda - remove static intelhdmi configurations
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:46:22 +01:00
Wu Fengguang
f424367c3a ALSA: hda - auto parse intelhdmi cvt/pin configurations
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:45:35 +01:00
Wu Fengguang
69fb346896 ALSA: hda - get intelhdmi max channels from widget caps
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:45:04 +01:00
Wu Fengguang
54a25f87e9 ALSA: hda - vectorize intelhdmi
The Intel IbexPeak HDMI codec supports 2 converters and 3 pins,
which requires converting the cvt_nid/pin_nid to arrays.

The active pin number (the one connected with a live HDMI monitor/sink)
will be dynamically identified on hotplug events.

It exports two HDMI devices, so that user space can choose the A/V pipe
for sending the audio samples.

It's still undefined behavior when there are two active monitors
connected and routed to the same audio converter.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:44:26 +01:00
Wu Fengguang
ddb8152b05 ALSA: hda - reorder intelhdmi prepare/cleanup callbacks
No behavior change.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:43:03 +01:00
Wu Fengguang
70ca35fb42 ALSA: hda - use pcm prepare/cleanup callbacks for intelhdmi
Remove pcm callbacks open/close in favor of the prepare/cleanup.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:42:18 +01:00
Wu Fengguang
7bedb011ef ALSA: hda - remove intelhdmi dependency on multiout
We'll be managing multiple HDMI audio sources/sinks on our own.
So remove multiout dependency from intelhdmi.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:41:44 +01:00
Wu Fengguang
6797cf2bfc ALSA: hda - convert intelhdmi global references to local parameters
No behavior change.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:40:40 +01:00
Wu Fengguang
92608badc5 ALSA: hda - allow up to 4 HDMI devices
The new Intel HDMI codec supports 2 independant HDMI/DisplayPort pipes.
We'll be exporting them as 2 pcm devices. So bump up the allowed number
of HDMI devices.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:40:03 +01:00
Wu Fengguang
f5d6def5c6 ALSA: hda - vectorize get_empty_pcm_device()
This unifies the code and data structure,
and makes it easy to add more HDMI devices.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:38:26 +01:00
Wu Fengguang
739b47f1e5 ALSA: hda - select IbexPeak handler for Calpella
An earlier patch merely adds id for 0x80862804.
It has 2/3 cvt/pin nodes and shall be tied to the IbexPeak handler.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:34:19 +01:00
Wu Zhangjin
97609458ce ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.

Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:31:33 +01:00
Takashi Iwai
4b7348a159 ALSA: hda - Fix capture source checks for ALC662/663 codecs
The ALC662/663 parser calls wrongly alc880_auto_create_input_ctls()
to check the capture source selections.  This should be alc882, instead.

Reference: Novell bnc#546918
	http://bugzilla.novell.com/show_bug.cgi?id=546918

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-14 18:25:23 +02:00
Logan Li
d2ed82a3e7 ALSA: HDA VIA: Remove 48k sample rate limit for S/PDIF
48 kHz limit is for slightly better stability, and sample rates other
than 48k (like 96k/192k) are for better sound quality.
We choose better quality, so remove the 48k limit.

Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-14 17:42:41 +02:00
Takashi Iwai
fb66ebd884 Merge branch 'fix/hda' into for-linus 2009-10-13 16:09:56 +02:00
Takashi Iwai
491dc0437d ALSA: hda - Allow all formats as default for Nvidia HDMI
In the commit f0613d5752
    ALSA: hda - Add full rates/formats support for Nvidia HDMI
the flag LIMITIED_RATE_FMT_SUPPORT was set as default, as I forgot
to clear before commit.

Let's enable all formats/rates as default.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 16:07:59 +02:00
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
9c6b8dcefe ALSA: bt87x - Add a whitelist for Pinnacle PCTV (11bd:0012)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 09:34:28 +02:00
Takashi Iwai
2d9c648295 ALSA: hda - Fix overflow of spec->init_verbs in patch_realtek.c
ALC861-VD lenovo model causes overflow of spec->init_verbs entries due to
the recent changes.  Simply increase the array size to avoid the overflow.

Reported-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 08:06:55 +02:00
Wu Zhangjin
68f139204c ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.

Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-12 08:14:13 +02:00
Stephen Rothwell
0f48327eac sound: use semicolons to end statements
Fixes:

sound/pci/hda/patch_via.c: In function 'patch_vt1718S':
sound/pci/hda/patch_via.c:4951: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1716S':
sound/pci/hda/patch_via.c:5441: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt2002P':
sound/pci/hda/patch_via.c:5794: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1812':
sound/pci/hda/patch_via.c:6148: error: expected expression before 'return'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-12 07:31:12 +02:00
David Henningsson
bd3c200e6d ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@
If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.

Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 18:07:21 +02:00
Lydia Wang
377ff31ae0 ALSA: HDA VIA: Only cosmetic changes
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 18:01:36 +02:00
Lydia Wang
8e86597f3c ALSA: HDA VIA: comments: update copyright, changeset, etc.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:37 +02:00
Lydia Wang
bfdc675a73 ALSA: HDA VIA: Change PW4 connect select default to to MW0.
According to customer request, hp should be default to redirected mode,
i.e. PW4 connect select default to to MW0.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:26 +02:00
Lydia Wang
71eb7dccb7 ALSA: HDA VIA: rename vt1708_control_templates[].
To via_control_templates[].

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:12 +02:00
Lydia Wang
ab6734e7ea ALSA: HDA VIA: Add VT1812 support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:06 +02:00
Lydia Wang
25eaba2f8a ALSA: HDA VIA: Add VT2002P support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:59 +02:00
Lydia Wang
f3db423df8 ALSA: HDA VIA: Add VT1716S support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:51 +02:00
Lydia Wang
bb3c6bfc3f ALSA: HDA VIA: Add VT1828S and VT2020 support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:44 +02:00
Lydia Wang
eb7188cafc ALSA: HDA VIA: Add VT1718S support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:37 +02:00
Lydia Wang
bc7e7e5ce0 ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb
As init verbs, vt17xx_volume_init_verb is a better place to hold them.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:30 +02:00
Lydia Wang
6369bcfccb ALSA: HDA VIA: Replace MIC_BOOST_VOLUME.
With snd_hda_override_amp_caps.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:22 +02:00
Lydia Wang
4483a2f590 ALSA: HDA VIA: Modify vt1709_auto_create_multi_out_ctls.
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:13 +02:00
Lydia Wang
9645c2039d ALSA: HDA VIA: Modify vt1708_auto_create_multi_out_ctls.
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:51 +02:00
Lydia Wang
c873cc2528 ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup
Replaced with via_playback_multi_pcm_prepare/cleanup to support
multi-stream operations

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:40 +02:00
Lydia Wang
82ef9e45c4 ALSA: HDA VIA: Modify vt1708_set_pinconfig_connect function.
like seqassoc 0xff, seqassoc 0xf0 of vt1708 should override Port
Connectivity field into 'AC_JACK_PORT_COMPLEX'

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:33 +02:00
Lydia Wang
1f2e99febd ALSA: HDA VIA: Add Jack detect feature for VT1708.
VT1708 does not support unsolicited response, but we need hp detect to
automute speaker. Implemented in workqueue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:25 +02:00
Lydia Wang
dcf34c8cc6 ALSA: HDA VIA: Refresh front playback mute in via_hp_automute.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:18 +02:00
Lydia Wang
a34df19a65 ALSA: HDA VIA: Add VIA_JACK_EVENT process in via_unsol_event.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:10 +02:00
Lydia Wang
a80e6e3c8c ALSA: HDA VIA: When changing input source, update power state.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:01 +02:00
Lydia Wang
1564b2878f ALSA: HDA VIA: Add smart5.1 function.
Smart 5.1 is for 3-jacks model, to reuse input pins as outputs.
While off, they act as "line out" / "line in" / "mic in".
While on, they acts as "line out" / "back left/right" / "center/lfe".

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:53 +02:00
Lydia Wang
cdc1784d49 ALSA: HDA VIA: Rewrite via_independent_hp_put
Use hp_independent_mode_index to store hp index, and simplify function
via_independent_hp_put with it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:42 +02:00
Lydia Wang
0713efebfa ALSA: HDA VIA: Change VT1708S & VT1702 hp mode controls
For VT1708S and VT1702, deactivate "Headphone Playback Volume" and
"Headphone Playback Mute" control if "Independent HP" mode is OFF.
and rename VT1702 "Independent HP" text.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:33 +02:00
Lydia Wang
9510e8dd9c ALSA: HDA VIA: Remove unused argument of via_new_analog_input
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:55:18 +02:00
Lydia Wang
1731437910 ALSA: HDA VIA: Add low current mode for power saving.
For VT1708B, VT1708S and VT1702, enter low current mode if no analog
stream is opened and all aa path mute.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:55:00 +02:00
Lydia Wang
f5271101fa ALSA HDA VIA: Add VIA_CTL_WIDGET_ANALOG_MUTE control type
Enter low power state if AA-Path volume is muted.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:47 +02:00
Lydia Wang
c2c02ea326 ALSA: HDA VIA: Limit VT1702 AA-Path max volume
according to customer request, VT1702 AA-Path max volume (12 dB) is too
high, so limit to 0 dB.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:28 +02:00
Lydia Wang
518bf3ba75 ALSA: HDA VIA: Add VT1708B-CE codec support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:15 +02:00
Lydia Wang
744ff5f487 ALSA: HDA VIA: Change get_codec_type argument to hda_codec type
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:01 +02:00
Lydia Wang
b6153e1175 ALSA: HDA VIA: Remove unused IS_VT17xx_VENDORID macro
IS_VT17*_VENDORID macros are used nowhere, so clean them up.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:53:47 +02:00
Takashi Iwai
26917499fd Merge branch 'fix/hda' into topic/hda 2009-10-11 17:53:33 +02:00
Robert Hancock
43189a38da ALSA: ice1724: Fix surround on Chaintech AV-710
Fix the num_total_dacs setting for Chaintech AV710. The existing comment
that only PSDOUT0 is connected is correct, but since the card is using
packed AC97 mode to send 6 channels to the codec, num_total_dacs should be
set to 6 and not 2. This allows 6-channel surround to work. Also clarify
a comment regarding the additional WM8728 codec on this card (it's connected
to the SPDIF output and always receives the same data).

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-10 10:53:16 +02:00
Takashi Iwai
f0613d5752 ALSA: hda - Add full rates/formats support for Nvidia HDMI
Allow Nvidia HDMI to support more possible sample rates and formats.
At best, the really supported rates and formats should be determined
together with the negotiation with the HDMI receiver, but it's currently
not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3
standard in this regard).  As a compromise, we enable all bits, assuming
that all recent devices do support such rates/formats.

Tested-by: Alan Alan <alanwww1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-09 17:44:08 +02:00
Takashi Iwai
378e869fd0 Merge branch 'fix/misc' into for-linus 2009-10-08 13:00:02 +02:00
Takashi Iwai
d2a764dd8e Merge branch 'fix/hda' into for-linus 2009-10-08 12:59:58 +02:00
Robert Hancock
1d4efa6650 ALSA: ice1724: increase SPDIF and independent stereo buffer sizes
Increase the default and maximum PCM buffer prellocation size for ice1724's
SPDIF and independent stereo pair outputs to 256K, which is the hardware's
maximum supported size. This allows a reduction in interrupt rate and
potentially power usage when an application is not latency-critical.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08 11:48:11 +02:00
Pavel Hofman
2bdf66331c ALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from MIXER to PCM type
* PLEASE NOTE - this change requires the corresponding update of
  envy24control for ice1712 - kind of an ABI change.
* The "Multi Track Peak" control is read-only level meters indicator.
* The control is VERY confusing to most users since it is currently displayed
  in regular mixers. E.g. alsamixer ignores its read-only status
  and allows changing the levels with keys which makes no sense.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08 11:47:56 +02:00
Takashi Iwai
defb5ab2e0 ALSA: hda - Fix yet another auto-mic bug in ALC268
Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing.  Otherwise the indices for
int/ext mics aren't set properly.

Reference: Novell bnc#544899
	http://bugzilla.novell.com/show_bug.cgi?id=544899

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-07 15:12:27 +02:00
Clemens Ladisch
2fb930b53f sound: via82xx: move DXS volume controls to PCM interface
The "VIA DXS" controls are actually volume controls that apply to the
four PCM substreams, so we better indicate this connection by moving the
controls to the PCM interface.

Commit b452e08e73 in 2.6.30 broke the
restoring of these volumes by "alsactl restore" that most distributions
use; the renaming in this patch cures that regression by preventing
alsactl from applying the old, wrong volume levels to the new controls.
http://bugzilla.kernel.org/show_bug.cgi?id=14151
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 14:58:58 +02:00
Takashi Iwai
01d4825df6 ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()
alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05e9.

This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 13:21:54 +02:00
Takashi Iwai
f8f25ba356 ALSA: hda - Add a workaround for ASUS A7K
ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.

Refernece: Novell bnc#494309
	http://bugzilla.novell.com/show_bug.cgi?id=494309

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 08:31:29 +02:00
Takashi Iwai
15870f05e9 ALSA: hda - Fix invalid initializations for ALC861 auto mode
The recent auto-parser doesn't work for machines with a single output
with ALC861, such as Toshiba laptops, because alc_subsystem_id() sets
the hp_pins[0] while it's listed in line_outs[0].
This ends up with the doubled initialization of the same mixer widget,
and it mutes the DAC route because hp_pins has no DAC assigned.

To fix this problem, just check spec->autocfg.hp_outs and speaker_outs
so that they are really detected pins.

Reference: Novell bnc#544161
	http://bugzilla.novell.com/show_bug.cgi?id=544161

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-05 08:29:49 +02:00
Takashi Iwai
7fa9742bf7 Merge branch 'fix/hda' into for-linus 2009-10-03 18:31:33 +02:00
Takashi Iwai
0afe5f8915 ALSA: hda - Clean up name string creation in patch_realtek.c
Use a common helper to create playback controls.
This gives less chance of typos.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 09:24:14 +02:00
Takashi Iwai
081a8c4502 Merge branch 'fix/hda' into topic/hda 2009-10-02 09:19:40 +02:00
Takashi Iwai
7085ec12a6 ALSA: hda - Fix / improve ALC66x parser
The auto-parser for ALC662/663/272 codecs doesn't work properly when
a speaker is connected to mono NID 0x17, and doesn't handle the dynamic
DAC assignment properly.

This patch fixes the issues and also improves the assignment of DACs
so that HP and speakers can have independent volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 09:03:58 +02:00
Sven Eckelmann
3b04691c2b ALSA: ctxfi: Swapped SURROUND-SIDE mute
On Soundblaster X-FI Titenium with emu20k2 the SIDE and SURROUND mute
functions are swapped.
It was checked with 'speaker-test -c 8 -s 3' and (un)mute surround or
'speaker-test -c 8 -s 7' and (un)mute side. The volume seems not
to be affected and works as expected.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 07:45:55 +02:00
Daniel T Chen
ebb6f6acbc ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
BugLink: https://bugs.launchpad.net/bugs/410933

This Sony VAIO model also needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 07:35:26 +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
Manoj Iyer
3db6c037c6 ALSA: hda - Added quirk to enable sound on Toshiba NB200
Patch was tested on Toshiba NB200 and is found to enable sound.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 10:24:08 +02:00
Daniel T Chen
5da5b6f9e9 ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
BugLink: https://bugs.launchpad.net/bugs/410933

This Sony VAIO model needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 07:43:05 +02:00
Giuliano Pochini
392bf2f1ba ALSA: echoaudio - Re-enable the line-out control for the Mia card
Mia has an undocumented line-out control, and it has to be exposed.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-30 08:26:45 +02:00
Takashi Iwai
432fd13359 ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
In the commit fdbc66266c, I mistakenly
replaced the capture mixer array for ALC268_ACER to nosrc version
although this should be kept to alt_mixer.  Now fixed back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-30 08:13:44 +02:00
Miguel de Barros
a72cb4bc85 ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
Reference: ALSA bug #0004614
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614

port-A (0x11)      - front hp-out
port-D (0x12)      - rear line out
port-E (0x1c)      - front mic-in
port-F (0x16)      - Internal speakers
digital-mic (0x17) - Internal mic

init verbs, mixers, jack sensing and PCI_QUIRK to support this hardware

Signed-off-by: Miguel de Barros <miguel.de.barros@bluewin.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-29 09:15:05 +02:00
Takashi Iwai
71623855e2 ALSA: hda - Enable MSI as default
Since the recent kernel can handle MSI properly on non-Intel platforms,
let's enable MSI as default.

If any borken device is found, we can add the quirk entry to the list,
which is currently empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 13:15:30 +02:00
Takashi Iwai
08d7a253e4 Merge branch 'fix/hda' into topic/hda 2009-09-28 13:01:57 +02:00
Clemens Ladisch
62428f7b8c sound: oxygen: fix input monitor control names
Insert "Playback" into the input monitor control names to prevent
alsa-lib from treating these controls as global controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:17 +02:00
Clemens Ladisch
1ff048869e sound: oxygen: add high-pass filter control
Add a control that allows disabling the high-pass filter of the WM8785 ADC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:08 +02:00
Clemens Ladisch
4852ad0247 sound: oxygen: add digital filter control
Add a control to select between sharp and slow roll-of filter responses
of the DACs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:00 +02:00
Clemens Ladisch
973dca93a3 sound: virtuoso: add PCM1796 oversampling control
Add a control to increase the oversampling factor to 128x on cards with
PCM1796 or PCM1792A DACs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:52 +02:00
Clemens Ladisch
76ffe1e3fb sound: oxygen: allow custom MCLK rates
Add a callback that allows model drivers to modify the default I2S MCLK
rate.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:45 +02:00
Clemens Ladisch
a361e247b4 sound: virtuoso: add headphone impedance control
Add a mixer control to adjust the headphone amplifier output for
headphones with different impedances.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:37 +02:00
Clemens Ladisch
6f0de3ce06 sound: oxygen: cache codec registers
Keep a cache of codec registers to avoid unnecessary writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:29 +02:00
Clemens Ladisch
dc0adf48da sound: oxygen: more hardware documentation
Add some comments describing the hardware pin routing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:20 +02:00
Clemens Ladisch
3d8bb454c4 sound: oxygen: add stereo upmixing to center/LFE channels
Add the possibility to route a mix of the two channels of stereo data to
the center and LFE outputs.  This is implemented only for models where
the DACs support this, i.e., for the Xonar D1 and DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:11 +02:00
Clemens Ladisch
75919d7c05 sound: oxygen: better defaults for upmixing control
On card models with two-channel outputs, the base driver can
automatically disable the upmixing control so that the model
drivers do not need to do this.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:00 +02:00
Clemens Ladisch
268304f4c4 sound: virtuoso: fix Xonar Essence ST support
The Essence ST uses the CS2000 chip to generate the DAC master clock, so
we better initialize and program it appropriately.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:51 +02:00
Clemens Ladisch
65c3ac885c sound: virtuoso: split virtuoso.c
The virtuoso.c file has become rather big.  This patch splits it up so
that only code for very similar card models is in one file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:38 +02:00
Clemens Ladisch
362bc24d67 sound: oxygen: fix for PI7C9X110 compatibility
If the card is used with a Pericom PI7C9X110 PCI-E/PCI bridge,
reconfigure the latter's PCI buffering to fix an unknown problem.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:30 +02:00
Clemens Ladisch
87b61902ce sound: oxygen: do not try to restore nonexistent EEPROM
On cards where the EEPROM was deliberately omitted, we do not need to
try to restore the EEPROM's contents.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:21 +02:00
Daniel T Chen
3d80dcaca1 ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547994

Enable MSI by default for this Pavilion model.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-24 12:14:37 +02:00
Lukasz Marcinowski
22e141300e ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
After puting a cd-audio inside my laptop there was no sound out here,
so I decided to install alsa-driver with debug level and setup a
model=test, it didn't help, but then I look at source code and added
this few lines, now cd-audio is working both when playback/recording.

[Additional minor fixes of mixer element/item names by tiwai]

Signed-off-by: Lukasz Marcinowski <nowymarluk@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-24 09:49:25 +02:00
Pavel Hofman
6ef8070618 ALSA: ice1724 - Infrasonic Quartet support
* three external clock types
* all controls supported

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:49:04 +02:00
Pavel Hofman
1ff97cb9dd ALSA: ice1724 - Support for multiple external clock types
* Support for customization of the external clock names
* Adding hooks to playback_pro_open and capture_pro_open, allowing e.g.
  limiting available stream rates to a single value when the external
  clock rate is detected

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:48:00 +02:00
Pavel Hofman
6796d5a05f ALSA: ice1724 - pro-rate-locking makes sense only for internal clock mode
* pro-rate-locking applies to internal clock mode only
* required rate and current rate are compared for internal clock mode only

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:47:08 +02:00
Pavel Hofman
494703062b ALSA: ice1724 - adding GPIO routines for mask and direction
* get/set routines for GPIO mask and direction

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:46:19 +02:00
Pavel Hofman
8f34692f63 ALSA: ak4620 support, codec regs listed in proc
* complete support for ak4620
* codec regs listed in proc for all codecs/chips
* adding total regs for each codec
* fixing nb. of steps in input attenuation controls

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:44:51 +02:00
Tim Blechmann
8fdc9e870c ALSA: lx6464es - remove unused struct member
we cannot set the sampling rate of the device, but can only read it
from the board, so we don't need the member for it.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:57 +02:00
Tim Blechmann
95eff499c9 ALSA: lx6464es - cleanup of rmh message bus function
the rmh bus is not used asynchronously, so it is safe to remove the
specific code pieces.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:53 +02:00
Takashi Iwai
87bfa1dbfb Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix MSI GX620 mixer
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ALSA: hda - Add missing model=auto entry for ALC269
2009-09-17 21:08:56 +02:00
Takashi Iwai
b99dba34dc ALSA: hda - Fix MSI GX620 mixer
The headphone and speaker mixer elements aren't properly set for
MSI GX620 with targa-8ch-dig quirk.
Also fixed the speaker volume control for other ALC883-targa quirks,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-17 18:23:00 +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
3d3792cb45 ALSA: hda - Add missing model=auto entry for ALC269
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-11 07:50:47 +02:00
Takashi Iwai
1110afbe72 Merge branch 'topic/ymfpci' into for-linus
* topic/ymfpci:
  sound: ymfpci: increase timer resolution to 96 kHz
2009-09-10 15:33:09 +02:00
Takashi Iwai
05a33e3d6f Merge branch 'topic/oxygen' into for-linus
* topic/oxygen:
  sound: oxygen: work around MCE when changing volume
2009-09-10 15:32:59 +02:00
Takashi Iwai
8a3351bbb9 Merge branch 'topic/ice1724-pm' into for-linus
* topic/ice1724-pm:
  ALSA: ice1724 - Fix section mismatch
  ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2
2009-09-10 15:32:55 +02:00
Takashi Iwai
dcb37d509a Merge branch 'topic/hdsp' into for-linus
* topic/hdsp:
  ALSA: hdsp - allow proc reporting with disconnected io box
2009-09-10 15:32:54 +02:00
Takashi Iwai
2d4ff66ad7 Merge branch 'topic/hda' into for-linus
* topic/hda: (92 commits)
  ALSA: hda - Use auto model for HP laptops with ALC268 codec
  ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
  ALSA: hda - Add support of Alienware M17x laptop
  ALSA: hda - Remove dead codes from patch_sigmatel.c
  ALSA: hda - Fix input source selection of IDT92HD73xx
  ALSA: hda - Fix obsolete CONFIG_SND_DEBUG_DETECT
  ALSA: hda - Unmute docking line-out as default with AD1984A codec
  ALSA: hda - Add another entry for Nvidia HDMI device
  ALSA: hda - Add missing GPIO initialization for AD1984A laptop model
  ALSA: hda - Add support of docking auto-mute/mic for AD1984A laptop model
  ALSA: hda - Fix ALC268/ALC269 headphone pin routing
  ALSA: hda - Create "Digital Mic Capture Volume" correctly for IDT codecs
  ALSA: hda - Add more quirk for HP laptops with AD1984A
  ALSA: hda - Add / fix model entries for HD-audio driver
  ALSA: hda - Add full audio support on Acer Aspire 7730G notebook
  ALSA: hda - Improve auto-cfg mixer name for ALC662
  ALSA: hda - Improve auto-cfg mixer name for ALC861-VD
  ALSA: hda - Improve auto-cfg mixer name for ALC262
  ALSA: hda - Improve auto-cfg mixer name for ALC260
  ALSA: hda - Improve auto-cfg mixer name for ALC880
  ...
2009-09-10 15:32:52 +02:00
Takashi Iwai
6c5cb93b1e Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Simple code clean up
  ALSA: ctxfi - Native timer support for emu20k2
2009-09-10 15:32:48 +02:00
Takashi Iwai
124e39b34d Merge branch 'topic/cs46xx' into for-linus
* topic/cs46xx:
  ALSA: cs46xx - Fix minimum period size
2009-09-10 15:32:46 +02:00
Takashi Iwai
b81e5ab34d Merge branch 'topic/azt3328' into for-linus
* topic/azt3328:
  ALSA: azt3328: fix previous breakage, improve suspend, cleanups
  ALSA: azt3328: large codec cleanup, add I2S port etc.
  ALSA: azt3328: fix Kconfig entry
2009-09-10 15:32:41 +02:00
Takashi Iwai
45fae5c78d Merge branch 'topic/ali5451-cleanup' into for-linus
* topic/ali5451-cleanup:
  ALSA: ali5451: remove dead code
2009-09-10 15:32:38 +02:00
Takashi Iwai
33d7867458 ALSA: hda - Use auto model for HP laptops with ALC268 codec
The HP laptops with ALC268 codec seem working better with model=auto
than model=toshiba; e.g. the auto model fixes missing digital outputs.
Let's fix quirk entry to choose auto model explicitly.

Tested-by: Jens Jorgensen <jbj1@ultraemail.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 11:07:56 +02:00
Sophie Hamilton
6148b130eb ALSA: cs46xx - Fix minimum period size
Fix minimum period size for cs46xx cards. This fixes a problem in the
case where neither a period size nor a buffer size is passed to ALSA;
this is the case in Audacious, OpenAL, and others.

Signed-off-by: Sophie Hamilton <kernel@theblob.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 10:59:49 +02:00
Clemens Ladisch
f1bc07af9a sound: oxygen: work around MCE when changing volume
When the volume is changed continuously (e.g., when the user drags a
volume slider with the mouse), the driver does lots of I2C writes.
Apparently, the sound chip can get confused when we poll the I2C status
register too much, and fails to complete a read from it.  On the PCI-E
models, the PCI-E/PCI bridge gets upset by this and generates a machine
check exception.

To avoid this, this patch replaces the polling with an unconditional
wait that is guaranteed to be long enough.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Johann Messner <johann.messner at jku.at>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07 12:15:43 +02:00
ddiaz@cenditel.gob.ve
a65cc60f63 ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
The model clevo-m540r was created with 6-channel and digital support. All
functions verified except spdif. Tested with a VIT D2000 laptop which has:

[lspci extract]
 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio
Controller [8086:284b] (rev 03)
        Subsystem: CLEVO/KAPOK Computer Device [1558:5409]

[/proc/asound/card0/codec\#0 header]
Codec: Realtek ALC883
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0883
Subsystem Id: 0x15585409
Revision Id: 0x100002

[Added a comment about HP mute and the model description by tiwai]

Signed-off-by: Dhionel Diaz <ddiaz@cenditel.gob.ve>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07 07:32:33 +02:00
Linus Torvalds
b71b7dc09a Merge branch 'fix/oxygen' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/oxygen' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: oxygen: handle cards with missing EEPROM
  sound: oxygen: fix MCLK rate for 192 kHz playback
2009-09-05 14:55:30 -07:00
Clemens Ladisch
92653453c3 sound: oxygen: handle cards with missing EEPROM
The card model detection code introduced in 2.6.30 that tries to work
around partially broken EEPROM contents by reading the EEPROM directly
does not handle cards where the EEPROM has been omitted.  In this case,
we have to use the default ID to allow the driver to load.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Ozan Çağlayan <ozan@pardus.org.tr>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-03 07:38:06 +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
d94ff6b7ca ALSA: hda - Fix obsolete CONFIG_SND_DEBUG_DETECT
Fix the old dead CONFIG_SND_DEBUG_DETECT to CONFIG_SND_DEBUG_VERBOSE.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-02 00:20:21 +02:00
Takashi Iwai
2ad81ba014 ALSA: hda - Unmute docking line-out as default with AD1984A codec
Unmute the docking-station line-out as default on machines with
AD1984A codec chip.  It can be still muted via "Dock" mixer switch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-01 09:09:26 +02:00
Takashi Iwai
f8ff035e38 ALSA: hda - Add another entry for Nvidia HDMI device
Added another entry for Nvidia HDMI device (10de:0003).

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-01 08:53:19 +02:00
Clemens Ladisch
b91ab72b83 sound: oxygen: fix MCLK rate for 192 kHz playback
Do not forget to program the MCLK ratio for the I2S output.
Otherwise, the master clock frequency can be too high for
the DACs at sample frequencies above 96 kHz.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-01 08:45:40 +02:00
Linus Torvalds
cda9856f1c Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix MacBookPro 3,1/4,1 quirk with ALC889A
  ALSA: hda - Add missing mux check for VT1708
2009-08-31 17:36:10 -10:00
Takashi Iwai
fe7e56814c ALSA: hda - Add missing GPIO initialization for AD1984A laptop model
A similar initialization of GPIO1 pin like mobile model is needed
for laptop model, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-31 08:37:46 +02:00
Takashi Iwai
17bbaa6f60 ALSA: hda - Add support of docking auto-mute/mic for AD1984A laptop model
Add the support of automatic mute and mic-switching of the docking
station HP and mic plugs for AD1984A laptop model for some HP machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-31 08:32:27 +02:00
Takashi Iwai
be0ae923a4 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2009-08-31 08:27:10 +02:00
Takashi Iwai
e9af4f365f ALSA: hda - Fix ALC268/ALC269 headphone pin routing
Fix the headphone pin routing of ALC268/ALC269 codecs.  Using alc882
routine doesn't work because alc268/alc269 parser assumes the
independent DACs for both HP and speaker outputs.  Need to assign the
DAC depending on the pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-31 08:25:58 +02:00
Takashi Iwai
a3f730af7e ALSA: hda - Fix MacBookPro 3,1/4,1 quirk with ALC889A
This patch fixes the wrong headphone output routing for MacBookPro 3,1/4,1
quirk with ALC889A codec, which caused the silent headphone output.
Also, this gives the individual Headphone and Speaker volume controls.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-08-31 08:23:13 +02:00
Takashi Iwai
0f67a61162 ALSA: hda - Add missing mux check for VT1708
In patch_vt1708(), the check of MUX nids is missing and this results in
the -EINVAL error in accessing Input Source mixer element.  Simpliy
adding the call of get_mux_nids() fixes the problem.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-31 08:12:29 +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
286f5875ca ALSA: hda - Add more quirk for HP laptops with AD1984A
More entries for HP laptops to get them working properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-27 14:37:51 +02:00
Linus Torvalds
a206e9417f Merge branch 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: pcm_lib: fix unsorted list constraint handling
  sound: vx222: fix input level control range check
  ALSA: ali5451: fix timeout handling in snd_ali_{codecs,timer}_ready()
2009-08-25 09:47:06 -07:00
Denis Kuplyakov
fc86f95415 ALSA: hda - Add full audio support on Acer Aspire 7730G notebook
1) Added support of internal subwoofer (it sounds!!!)
2) Auto muting front speakers and internal subwoofer on headphones plug.
3) Internal mic works.
4) 3 channel mods (jack maps):
       black  pink         blue
2ch: front   ext mic     line in
4ch: front   ext mic     surround
6ch: front   CLFE        surround
  Can be changed in mixer.
5) Sound can be recorded from:
 Internal mic
 Ext mic
 Cd
 Line in
6) 2 separate capture channels.

Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 18:16:55 +02:00
Takashi Iwai
0d884cb936 ALSA: hda - Improve auto-cfg mixer name for ALC662
The last patch in this series is for ALC662; pretty similar as the
previous patch for ALC861-VD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 16:14:35 +02:00
Takashi Iwai
a4fcd49109 ALSA: hda - Improve auto-cfg mixer name for ALC861-VD
One more patch to give a better name for the primary output controls,
this time for ALC861-VD codec.  The change is simple, just checking the
pin connection whether it's a speaker-out.  When both speaker and HP
are assigned, we name the volume as "PCM" as this influences on both
outputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 16:12:15 +02:00
Takashi Iwai
c3fc1f502a ALSA: hda - Improve auto-cfg mixer name for ALC262
Similar improvements for ALC262 codec like previous two commits:
assign a better name, either Master or Speaker, for the primary output
controls.

However, in the case of ALC262 codec, the necessary changes are larger
than others because we need to check the possibility of different mixer
amps depending on the pins.  The pin 0x16 is mono, and bound with the
dedicated mixer 0x0e while other pins are bound with 0x0c.  Thus, there
are two possible volumes.

When only one of them is used, we can name it as "Master".  OTOH, when
both are used at the same time, they have to be named uniquely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 16:08:47 +02:00
Takashi Iwai
23112d6d2d ALSA: hda - Improve auto-cfg mixer name for ALC260
Instead of fixed "Front" mixer name, try to assign a better name, e.g.
"Master" or "Speaker" fot the primary output volume controls of ALC260
codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 16:07:08 +02:00
Takashi Iwai
cb162b6bf2 ALSA: hda - Improve auto-cfg mixer name for ALC880
When there is only one DAC is used for ALC880, try to assign a better
name, either Speaker or Front, depending on the output pin type.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 16:05:03 +02:00
Takashi Iwai
05f5f47708 ALSA: hda - Generalize input pin parsing in patch_realtek.c
Provide a standard parser for input pins to create the input mixer
and input source controls instead of having a difference one for each
Realtek codec.  The new helper parses the codec connections dynamically
isntead of fixed indicies.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-25 13:10:18 +02:00
Takashi Iwai
9d0b71b1cf ALSA: hda - Reuse ALC268 parser for ALC269
Reuse a part of the code of ALC268 parser for ALC269.
This will change the default output volume either to Front or Speaker
depending on the pin configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-24 14:10:30 +02:00
Clemens Ladisch
edd1365e90 sound: vx222: fix input level control range check
Fix a logic error in the range check of the input level control that
would prevent setting any volume less than the maximum.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-24 09:46:08 +02:00
Wu Fengguang
fd72d00846 ALSA: hda: move open coded tricks into get_wcaps_channels()
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-24 09:42:48 +02:00
Bartlomiej Zolnierkiewicz
848bffef28 ALSA: ali5451: remove dead code
Remove code covered by #if/endif 0 and #ifdef/endif CODEC_RESET
(CODEC_RESET is never defined).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-23 18:59:14 +02:00
Bartlomiej Zolnierkiewicz
70bdbd3d1a ALSA: ali5451: fix timeout handling in snd_ali_{codecs,timer}_ready()
Modify loops in such way that the register value is checked also after
the timeout condition, just in case the heavy interrupt load etc. caused
the thread to sleep for the time period exceeding the timeout value.

While at it remove an extra ALI_STIMER read from snd_ali_stimer_ready().

Reported-by: Jack Byer <ojbyer@usa.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-23 18:58:07 +02:00
Linus Torvalds
a1d1251115 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix probe of Toshiba laptops with ALC268 codec
  ALSA: hda: add model for Intel DG45ID/DG45FC boards
  ALSA: hda: enable speaker output for Compaq 6530s/6531s
2009-08-20 10:19:39 -07:00
Takashi Iwai
454e134d0e Merge branch 'fix/hda' into topic/hda 2009-08-19 20:10:24 +02:00
Takashi Iwai
3abf2f3639 ALSA: hda - Fix probe of Toshiba laptops with ALC268 codec
There are many variants of Toshiba laptops with ALC268 codec, and
it seems that a few of them don't work with model=toshiba preset
since they have the secondary ALC268 codec just for HDMI output.
This is a regression due to the previous clean-up work to merge all
Toshiba quirk entries into a single check.

This patch adds the identification of such laptops to apply the
standard BIOS-probing method.  Unfortunately, Toshiba laptops have
all the same PCI SSID, so we need to check the codec SSID to identify
each device.

Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-19 20:05:02 +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
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
fdbc66266c ALSA: hda - Fix invalid capture mixers with some ALC268 models
The auto-mic clean-up patches caused regressions on some ALC268 models
that have no proper input_mux but with "Input Source" mixer elements.
Such a combination results in Oops when accessed.

[A reason why set_capture_mixer() isn't used in patch_alc268() is that
ALC268 codec have HDA_OUTPUT direction for capture volumes unlike other
codecs.  Thus it needs own definitions of capture elements.]

This patch fixes the issues:
- Add a capture mixer definition without input-source
- Use the new capture mixer appropriately

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-19 00:22:17 +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
Tim Blechmann
c18bc9b927 ALSA: hdsp - allow proc reporting with disconnected io box
the hdsp driver refuses to report any information via the proc
interface, if the io box is not connected. with this patch, the
content of the control and status registers is printed before the
iobox check.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-12 18:21:30 +02:00
Takashi Iwai
8884be98bc Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Don't override ADC definitions for ALC codecs
  ALSA: hda - Add missing vmaster initialization for ALC269
2009-08-12 08:05:20 +02:00
Herton Ronaldo Krzesinski
5908589f31 ALSA: hda - fix noise issue when recording from digital mic with alc268
With auto config model of alc268 realtek codec, it allows to select any
of possible available digital microphone inputs when only one is
available. For example, when only digital mic in nid 0x12 is available,
on second input source it will allow you to select unavailable digital
mic in nid 0x13. The problem is that selecting unavailable digital mic
creates a source of noise when recording (I'm not sure if this happens
on all machines with alc268 and only one digital mic input, but testing
on a quanta uw1 netbook a lot of noise is introduced in recording from
digital mic 0x12/first input source, when you select the unavailable
digital mic 0x13 for capture source 0x24 in the second input source in
mixer).

Then to avoid noise when recording from digital mic with auto model in
this case, prevent a digital mic input source to be selected if
microphone is not available.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-12 07:35:02 +02:00
Takashi Iwai
4f5d170620 ALSA: hda - Clean up init and setup hooks for Realtek codecs
Move static codes to setup from init_hook for each model.

Also, use the common auto-mic selection helper for devices that support
auto-mic selection.  They just need to set up ext_mic, int_mic and
auto_mic flag in the setup section.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-11 18:17:46 +02:00
Takashi Iwai
e9c364c04f ALSA: hda - Add setup hook to ALC preset struct
Added setup hook to ALC preset struct to be called at in the parser
but not at each init callback.
This can be used for setting up the static pins, etc, while the
init hook should be used for updating the status again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-11 17:16:13 +02:00
Takashi Iwai
4d8e22e0f6 ALSA: hda - Add a white-list for MSI option
Created a white-list to enable MSI since some devices require MSI
explicitly due to BIOS/ACPI problems.  Simply using a quirk list.
As the first case, take HP Compaq CQ40.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-11 14:25:46 +02:00
Takashi Iwai
b59bdf3b0c ALSA: hda - Check connectivity for auto-mic of Realtek codecs
Some Realtek codecs don't provide the full connections for certain pins
from each ADC; e.g. ACL662/ALC272 gives only one of two digital-mic pins
for each ADC.  Thus, depending on the digital mic pin, the ADC/MUX to be
used has to be chosen properly.

This patch adds the check of the connectivity of pins at auto-mic mode.
If no proper connectivity is found, auto_mic flag is turned off to be
sure.

Also the mux_idx is determined during this check so it won't be checked
in the unsol event any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-11 09:47:30 +02:00
Takashi Iwai
52b5deefbb Merge branch 'fix/hda' into topic/hda 2009-08-11 08:47:38 +02:00
Takashi Iwai
dd704698f5 ALSA: hda - Don't override ADC definitions for ALC codecs
ALC269 and ALC861-VD parsers override the ADC definitions
unconditionally without checking the spec definition.  This causes
the problem when any inconsistent ADC is set up in the device quirk
(like ALC272 with digital-mic).

This patch avoids the overriding by adding the proper checks.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-11 08:45:11 +02:00
Takashi Iwai
2a22d3f812 ALSA: hda - Use only one capture stream for auto-mic
When the auto-mic feature is enabled, we should support only one
capture stream.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-10 18:56:05 +02:00
Takashi Iwai
6c81949227 ALSA: hda - Add auto-mic support for Realtek codecs
Added the support for automatic mic selection via plugging for
Realtek codecs (in auto-probing mode).  The auto-mic mode is enabled
only when one internal mic and one external mic are present.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-10 18:47:44 +02:00
Clemens Ladisch
6e2efaacb3 sound: ymfpci: increase timer resolution to 96 kHz
Allow the interval timer to be programmed with its full 96 kHz
precision.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-10 13:14:46 +02:00
Takashi Iwai
d5c9c8912a Merge branch 'fix/hda' into topic/hda 2009-08-10 11:58:09 +02:00
Takashi Iwai
100d5eb36b ALSA: hda - Add missing vmaster initialization for ALC269
Without the initialization of vmaster NID, the dB information got
confused for ALC269 codec.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-08-10 11:57:05 +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
Linus Torvalds
6ce90c430b Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Read buffer overflow
  ALSA: hda: Correct EAPD for Dell Inspiron 1525
  ALSA: hda: warn on spurious response
  ALSA: hda: remember last command for each codec
  ALSA: hda: read CORBWP inside reg_lock
  ALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io
  ALSA: hda: take cmd_mutex in probe_codec()
  ALSA: hda: track CIRB/CORB command/response states for each codec
  ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527
2009-08-04 15:39:55 -07: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
Wu Fengguang
559059b27f ALSA: hda: add IbexPeak/Clarkdale HDMI model with static cvt/pin number
The new IbexPeak HDMI codec has 3 pin nodes and 2 converter nodes.
Here we assume only the first ones will be used.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:35:05 +02:00
Roel Kluin
4b35d2ca23 ALSA: hda - Read buffer overflow
Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:34:06 +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
Wu Fengguang
e310bb0646 ALSA: hda: warn on spurious response
To help disclose hardware bugs.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:27:53 +02:00
Wu Fengguang
feb273404f ALSA: hda: remember last command for each codec
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:27:39 +02:00
Wu Fengguang
c32649feb4 ALSA: hda: read CORBWP inside reg_lock
This converts the last CORBWP access outside of reg_lock.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:26:55 +02:00
Wu Fengguang
cdb1fbf231 ALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io
Just for safety.  azx_init_cmd_io() and azx_free_cmd_io() may be
called when switching to single command mode.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:26:42 +02:00
Wu Fengguang
a678cdee25 ALSA: hda: take cmd_mutex in probe_codec()
Now that each codec will have its own module, it is possible
for the user to load one codec while another one is running.

So cmd_mutex would be a safe addition to probe_codec().

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:26:23 +02:00
Wu Fengguang
deadff1665 ALSA: hda: track CIRB/CORB command/response states for each codec
Recently we hit a bug in our dev board, whose HDMI codec#3 may emit
redundant/spurious responses, which were then taken as responses to
command for another onboard Realtek codec#2, and mess up both codecs.

Extend the azx_rb.cmds and azx_rb.res to array and track each codec's
commands/responses separately. This helps keep good codec safe from
broken ones.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:26:13 +02:00
Takashi Iwai
ce577e8cf5 ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527
Use model=lenovo instead of model=dallas for Toshiba Satellite A135-S4527
with ALC861-VD codec.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03 08:23:52 +02:00
Takashi Iwai
6280b61af5 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Increase PCM stream name buf in patch_realtek.c
  ALSA: hda: fix out-of-bound hdmi_eld.sad[] write
  ALSA: hda - Add quirk for Dell Studio 1555
2009-07-31 10:17:42 +02:00
Takashi Iwai
aa563af763 ALSA: hda - Increase PCM stream name buf in patch_realtek.c
The name buf with size 16 is too short for some codec names, e.g.
truncated like "ALC861-VD Analo".  Now the size is doubled.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-31 10:06:34 +02:00
Takashi Iwai
03cb2dafcb Merge branch 'topic/hda-cirrus' into topic/hda 2009-07-30 18:09:04 +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
Stelian Pop
3a38516750 ALSA: hda - Enable HP output with Macbook Pro 5, 5
The patch below, to be applied on the latest sound-unstable-2.6.git,
enables headphones output on my MacBookPro 5,5, together with the
automuting feature.

Here is the exact soundcard id:
	Vendor Id: 0x10134206
	Subsystem Id: 0x106b4d00
	Revision Id: 0x100301

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-30 14:57:25 +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
Wu Fengguang
6732bd0d15 ALSA: hda: add HP automute support to Intel ALC889/ALC889A models
It auto mutes all 8-channel outputs at rear panel when
the front panel headphone is connected.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-30 09:19:14 +02:00
Wu Fengguang
dd7714c922 ALSA: hda: add 2-channel mode to Intel ALC889/ALC889A models
This 2-channel mode is useful in that it will broadcast
a 2-channel audio stream to all front/side/... ports.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-30 08:53:56 +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
Roel Kluin
78735cffc2 ALSA: hda: fix out-of-bound hdmi_eld.sad[] write
e->sad[] is declared with size ELD_MAX_SAD=16, but the guard
allows range 0-31.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-29 14:35:20 +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
1ba7a7c650 ALSA: hda - Add exception for volume-knob in snd_hda_get_connections()
Volume-knob widgets may have connections even if they have no CONN_LIST
cap bit.  Allow the query exceptionally in snd_hda_get_connections().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-27 12:56:26 +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
de5d674c02 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix mute control with some ALC262 models
  ALSA: hda - Restore GPIO1 properly at resume with AD1984A
  ALSA: hda - Use snprintf() to be safer
2009-07-26 11:07:06 +02:00
Takashi Iwai
f35e2965b2 Merge branch 'fix/ctxfi' into for-linus
* fix/ctxfi:
  ALSA: ctxfi - Fix uninitialized error checks
2009-07-26 11:07:05 +02:00
Takashi Iwai
a3daf68931 Merge branch 'fix/hda' into topic/hda 2009-07-24 16:54:59 +02:00
Takashi Iwai
8de56b7deb ALSA: hda - Fix mute control with some ALC262 models
The master mute switch is wrongly implemented as checking the pointer
instead of its value, thus it can be never muted.  This patch fixes
the issue.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-07-24 16:54:31 +02:00
Jaroslav Kysela
87a8c3702e ALSA: hda - Add better Intel IbexPeak platform support
Here are the new sound enabling patches for IbexPeak.

Summary of tested features:

  - playback
    - Front Headphone: OK
    - 8 channel audio: Front/Rear/CLFE/Side all OK

  - recording
    - Front Mic/Rear Mic: both OK
      (front/rear/line mics are selectable in the "Input source" alsamixer control)
    - Line In: not working
      (in 6ch mode, its amp/mute, direction and route all looks fine,
       so I'm a little puzzled)
      (hopefully no one will care this feature)

  - digital SPDIF input/output: not tested (no equipment)

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-23 11:25:42 +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
35ebf6e721 ALSA: ctxfi - Simple code clean up
- replace NULL == xxx with !xxx
- replace NULL != xxx with xxx
- similar trivial cleanups

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22 17:12:34 +02:00
Takashi Iwai
89e1b9511f Merge branch 'fix/ctxfi' into topic/ctxfi 2009-07-22 17:06:53 +02:00
Takashi Iwai
68110661e8 ALSA: ctxfi - Fix uninitialized error checks
Fix a few uninitialized error checks that were introduced recently
mistakenlly during the clean-up:
  sound/pci/ctxfi/ctamixer.c: In function ‘get_amixer_rsc’:
  sound/pci/ctxfi/ctamixer.c:261: warning: ‘err’ may be used uninitialized in this function
  sound/pci/ctxfi/ctamixer.c: In function ‘get_sum_rsc’:
  sound/pci/ctxfi/ctamixer.c:415: warning: ‘err’ may be used uninitialized in this function
  sound/pci/ctxfi/ctsrc.c: In function ‘get_srcimp_rsc’:
  sound/pci/ctxfi/ctsrc.c:742: warning: ‘err’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22 17:05:15 +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
Jaroslav Kysela
254da007f9 ALSA: hda_generic: use AC_WCAP_CONN_LIST check for widget connections
Previous patch used widget type, but the presence flag of the connection
list is in the widget capabilities.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22 15:39:56 +02:00
Jaroslav Kysela
0529604838 ALSA: hda_generic: do not read connections for widged with an unknown type
Reading node connections for an unknown widget can confuse HDA codec bus.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22 15:39:44 +02:00
Takashi Iwai
1c20930a41 ALSA: hda - Fix ALC861 auto-mode parser
Fix the logic of ALC861 auto-mode parser for the outputs.
Instead of assuming the fixed DAC list, parse the conection and assign
the DAC dynamically.

Also, unmute the unused output connections to avoid noises on inputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22 15:36:25 +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
44f167d376 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: ca0106 - Fix the max capture buffer size
  ALSA: OSS sequencer should be initialized after snd_seq_system_client_init
  ALSA: sound/isa: convert nested spin_lock_irqsave to spin_lock
2009-07-21 19:03:22 +02:00
Takashi Iwai
a9d90c81b5 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs
  ALSA: hda - Add quirk for Gateway T6834c laptop
  ALSA: hda_codec: Check for invalid zero connections
2009-07-21 19:03:20 +02:00
Takashi Iwai
36766835ed Merge branch 'fix/ctxfi' into for-linus
* fix/ctxfi:
  ALSA: ctxfi: Swapped SURROUND-SIDE channels on emu20k2
2009-07-21 19:03:19 +02:00
Takashi Iwai
9c6c529a21 Merge branch 'fix/ctxfi' into topic/ctxfi 2009-07-20 17:08:01 +02:00
Frank Roth
55fe27f7e2 ALSA: ctxfi: Swapped SURROUND-SIDE channels on emu20k2
On Soundblaster X-FI Titanium with emu20k2 the SIDE and SURROUND
channels were swapped and wrong. 
I double checked it with connector colors and creative soundblaster
windows drivers.

So I swapped them to the true order.
Now "speaker-test -c6" and "speaker-test -c8" are working fine.

Signed-off-by: Frank Roth <frashman@freenet.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-20 17:07:10 +02:00
Takashi Iwai
34fdeb2d07 ALSA: ca0106 - Fix the max capture buffer size
The capture buffer size with 64kB seems broken with CA0106.
At least, either the update timing or the DMA position is wrong,
and this screws up pulseaudio badly.

This patch restricts the max buffer size less than that to make life
a bit easier.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-07-20 15:49:46 +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
Takashi Iwai
bc5304b6fb ALSA: ctxfi - Native timer support for emu20k2
Added the native timer support for emu20k2, which gives much more
accurate update timing than the system timer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-20 13:41:35 +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
Takashi Iwai
05e870d29a Merge branch 'fix/hda' into topic/hda 2009-07-19 13:52:31 +02:00
Jaroslav Kysela
2e9bf24706 ALSA: hda_codec: Check for invalid zero connections
To prevent "Too many connections" message and the error path for some HDMI
codecs (which makes onboard audio unusable), check for invalid zero
connections for CONNECT_LIST verb.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-19 13:51:45 +02:00
Takashi Iwai
3f3b7c1aed ALSA: hda - Fix ALC268 parser for mono speaker
- Parse the mono output pin 0x16 correctly even as the primary output
- Create "Speaker" volume control if the primary output is a speaker
- Fix the wrong direction of (optional) "Mono" switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17 14:36:59 +02:00
Takashi Iwai
82e1b804b0 ALSA: hda - Fix the previous sanity check in make_codec_cmd()
The newly added sanity-check for a codec verb can be better written
with logical ORs.  Also, the parameter can be more than 8bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17 12:47:34 +02:00
Wu Fengguang
6430aeeb30 ALSA: hda - add bounds checking for the codec command fields
A recent bug involves passing auto detected >0x7f NID to codec command,
creating an invalid codec addr field, and finally lead to cmd timeout
and fall back into single command mode. Jaroslav fixed that bug in
alc880_parse_auto_config().

It would be safer to further check the bounds of all cmd fields.

Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17 11:18:21 +02:00
Andiry Brienza
9176b672c2 ALSA: hda - Add support for new AMD HD audio devices
Add support for new AMD HD audio devices. Use generic driver to detect HD audio
devices with Vendor ID AMD.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17 11:16:51 +02:00
Takashi Iwai
9d79b13691 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: riptide -  proper handling of pci_register_driver for joystick
2009-07-16 16:35:48 +02:00
Takashi Iwai
26887793b6 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking
2009-07-16 16:35:47 +02:00
Daniel Drake
0fb67e982a ALSA: hda - Add CX20582 and OLPC XO-1.5 support
This adds support for the Conexant CX20582 codec, based on code from
http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip

This is the codec to be shipped in the OLPC XO-1.5, so this patch also
includes an XO-specific profile. Resultant configuration:
http://dev.laptop.org/~dsd/20090713/codec0.txt
http://dev.laptop.org/~dsd/20090713/codec0.svg

As the Linuxant code is structured differently to the other codecs,
I was unable to cleanly reimplement everything in the generic and Dell
profiles as more info is needed (e.g. codec graphs). I simplified those
profiles so that hopefully it will not break anyone's audio. If it does,
it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems,
and then fixing snd_hda_codec_configure() to fall back on the generic
parser, at least until support for other systems is figured out.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-16 16:03:08 +02:00
Jaswinder Singh Rajput
cb65c8732a ALSA: riptide - proper handling of pci_register_driver for joystick
We need to check returning error for pci_register_driver(&joystick_driver)

On failure, we should unregister formerly registered audio drivers

This also fixed the compiler warning :

  CC [M]  sound/pci/riptide/riptide.o
 sound/pci/riptide/riptide.c: In function ‘alsa_card_riptide_init’:
 sound/pci/riptide/riptide.c:2200: warning: ignoring return value of ‘__pci_register_driver’, declared with attribute warn_unused_result

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-15 14:00:40 +02:00
Andreas Mohr
78df617acf ALSA: azt3328: fix previous breakage, improve suspend, cleanups
- fix my previous codec activity breakage (_non-warned_ variable assignment
  issue)
- convert suspend/resume to 32bit I/O access (I/O is painful; to improve
  suspend/resume performance)
- change DEBUG_PLAY_REC to DEBUG_CODEC for consistency
- printk cleanup
- some logging improvements
- minor cleanup/improvements

The variable assignment issue above was a conditional assignment to the
call_function variable (this ended with the non-preinitialized variable
not getting assigned in some cases, thus a dangling stack value, yet gcc 4.3.3
unbelievably did _NOT_ warn about it in this case!!),
needed to change this into _always_ assigning the check result.
Practical result of this bug was that when shutting down
_either_ playback or capture, _both_ streams dropped dead :P

Tested, working (plus resume) and checkpatch.pl:ed on 2.6.30-rc5,
applies cleanly to 2.6.30 proper with my previous (committed)
patches applied.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-15 12:03:26 +02:00
Linus Torvalds
f00caa7629 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - targa and targa-2ch fix
  ALSA: hda - fix beep tone calculation for IDT/STAC codecs
  ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)
  ALSA: hda - Disable AMD SB600 64bit address support only
  ALSA: hda - Check widget types while parsing capture source in patch_via.c
  ALSA: hda - Fix capture source selection in patch_via.c
  ALSA: hda - Add missing EAPD initialization for VIA codecs
  ALSA: hda - Clean up VT170x dig-in initialization code
  ALSA: hda - Fix error path in the sanity check in azx_pcm_open()
  ALSA: hda - move 8086:fb30 quirk (stac9205) to the proper section
  ASoC: Fix wm8753 register cache size and initialization
  ASoC: add locking to mpc5200-psc-ac97 driver
  ASoC: Fix mpc5200-psc-ac97 to ensure the data ready bit is cleared
  ASoC: Fix register cache initialisation for WM8753
2009-07-10 19:19:09 -07:00
Takashi Iwai
3c6aae4489 ALSA: hda - Check codec errors in snd_hda_get_connections()
The codec read errors in snd_hda_get_connections() are ignored so far,
and it causes a problem like the bug in the commit
    9d30937acc
    ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking

Better to check errors in the function and returns a proper error code
rather than passing bogus NID values.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-10 12:56:41 +02:00
Jaroslav Kysela
9d30937acc ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking
On some IbexPeak systems with ALC889A errors like "azx_get_response
timeout, switching to polling mode: last cmd=0xaf9f000b" are produced,
because non-existent codec #10 is wrongly accessed.

The problem is that snd_hda_get_connections() returns out-of-range result
for NID 0x1c (something like 0xf8f9 or 0xffff).

This patch adds a check to alc880_parse_auto_config() to avoid using
of this out-of-range NIDs. A better fix maybe to improve
snd_hda_get_connections() routine to check for valid NID ranges if
NIDs are expected as result.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-10 12:55:49 +02:00
Takashi Iwai
31909b83ea ALSA: hda - Fix the merge error
Fix the merge error at the commit 305355aad8,
an addition of the missing alc880_gpio3_init_verbs to ALC882_TARGA model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-10 12:33:48 +02:00
Takashi Iwai
3ae3079666 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - targa and targa-2ch fix
  ALSA: hda - fix beep tone calculation for IDT/STAC codecs
  ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)
  ALSA: hda - Disable AMD SB600 64bit address support only
  ALSA: hda - Check widget types while parsing capture source in patch_via.c
  ALSA: hda - Fix capture source selection in patch_via.c
  ALSA: hda - Add missing EAPD initialization for VIA codecs
  ALSA: hda - Clean up VT170x dig-in initialization code
  ALSA: hda - Fix error path in the sanity check in azx_pcm_open()
  ALSA: hda - move 8086:fb30 quirk (stac9205) to the proper section
2009-07-10 11:17:12 +02:00
Takashi Iwai
305355aad8 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09 18:48:38 +02:00
David Heidelberger
005b10769c ALSA: hda - targa and targa-2ch fix
Simplify ALC882_TARGA and return gpio3 to ALC883_TARGA_DIG and
ALC883_TARGA_2ch_DIG, which I accidentally removed in commit id
64a8be7435

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09 18:45:46 +02:00
Takashi Iwai
63b2413b2f ALSA: hda - don't build digital output controls if not exist
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09 11:45:59 +02:00
Paul Vojta
369693dc93 ALSA: hda - fix beep tone calculation for IDT/STAC codecs
In the beep tone calculation for IDT/STAC codecs, lower numbers correspond
to higher frequencies and vice versa.  The current code has this backwards,
resulting in beep frequencies which are way too high (and sound bad on
tinny laptop speakers, resulting in complaints).

[Also added hz <= 0 check by tiwai]

Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09 09:14:29 +02:00
Joe Perches
ad361c9884 Remove multiple KERN_ prefixes from printk formats
Commit 5fd29d6ccb ("printk: clean up
handling of log-levels and newlines") changed printk semantics.  printk
lines with multiple KERN_<level> prefixes are no longer emitted as
before the patch.

<level> is now included in the output on each additional use.

Remove all uses of multiple KERN_<level>s in formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-08 10:30:03 -07:00
Darren Salt
508f711090 ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)
There is a regression, introduced in aa202455ee
(in alsa-kernel) which I noticed when trying to use the headphone socket on
my EeeCPC 901: the output was *very* quiet, practically silent.

This patch corrects the control types to that which was obviously intended in
the referenced commit.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08 16:37:45 +02:00
William Weston
b1e4422f96 ALSA: hda - Add quirks for RTL888 & RV630/M76 based MSI GX710
Signed-off-by: William Weston <weston@sysex.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08 14:18:49 +02:00
Takashi Iwai
277a57c710 ALSA: hda - Fix compile warnings in patch_cirrus.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08 12:42:08 +02:00
Andiry Brienza
dc4c2e6bde ALSA: hda - Disable AMD SB600 64bit address support only
HDA driver disabled HD audio 64bit address support for all AMD
SB600/SB700/SB800 platforms with commit
09240cf429 due to one SB600 issue
reported by community, but we do not see the similar issue on
SB700/SB800 platforms.
This patch is to refine the workaround for SB600 only.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08 08:01:47 +02:00
Takashi Iwai
1c55d521f4 ALSA: hda - Check widget types while parsing capture source in patch_via.c
Check the widget type and don't take invalid widgets while parsing
the capture source in patch_via.c.

Also, fixed some compile warnings introduced in the previous commit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08 07:45:46 +02:00
Takashi Iwai
337b9d02b4 ALSA: hda - Fix capture source selection in patch_via.c
The fixed widget NIDs in patch_via.c seem wrong for some codecs,
and it resulted in the invalid capture source selection.

This patch adds the code to parse the topology instead of using
fixed numbers in order to get the right MUX widget id corresponding
to the ADCs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07 18:20:23 +02:00
Takashi Iwai
d3a11e601a ALSA: hda - Add missing EAPD initialization for VIA codecs
If the output pin is used and EAPD capability is present, turn on
the EAPD bit.  This fixes the silent output problem on ASUS laptops
with VT1708S codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07 13:44:29 +02:00
Takashi Iwai
55d1d6c1ef ALSA: hda - Clean up VT170x dig-in initialization code
Minor clean up for initializing the digital-in pin.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07 13:39:03 +02:00
Takashi Iwai
b4dabfc452 ALSA: hda - Fix the speaker volume control name
Increase the name string buffer size so that "Surround Speaker Playback
Volume" won't be truncated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07 09:05:07 +02:00
Takashi Iwai
ed208255e7 ALSA: hda - Add GPIO setup for MacBook pro 5,5 with CS420x
GPIO3 seems corresponding to EAPD that is required for the speaker
output.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07 09:04:26 +02:00
Takashi Iwai
a6bae20559 ALSA: hda - Add quirk for MacBook Pro 5,5 with CS4206
Add the default pin configs for MBP55.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 15:18:46 +02:00
Takashi Iwai
60e53882ac ALSA: hda - Fix double creation of SPDIF input controls
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 15:01:09 +02:00
Takashi Iwai
40c20fa05a ALSA: hda - Add CS420x-specific coef setup
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 13:02:44 +02:00
Takashi Iwai
ea35929b88 ALSA: hda - Force to initialize input mixer setup for CS420x
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 13:02:42 +02:00
Takashi Iwai
21a4dc43ac ALSA: hda - Fix cirrus codec parsing
The parser wasn't called in the proper order.
Split now the parser to be called in patch_cirrus(), and the rest
are just for building PCMs and controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 13:02:20 +02:00
Andreas Mohr
dfbf951115 ALSA: azt3328: large codec cleanup, add I2S port etc.
- fully separate codec I/O port handling, enabling the use of a single
  function each for all codecs (playback, capture, I2S out)
- add a new separate pcm for I2S out port (UNTESTED, no I2S DAC
  available yet)
- switch gameport to low frequency while idle, to try to reduce noise/power
- improve snd_azf3328_codec_setdmaa() calculation
- minor variable type cleanup (u16, bool etc.)
- add some doc updates (help those lost Windows users, debug help, ...)

Note that due to the large cleanup aspect of the codec I/O change,
I was able to fit everything including all improvements into the
same binary size!! (a measly 10 bytes more or so)

This should now be the almost last patch to this driver
(minus some possible kernel clocksource patch and x86_64 fixes or so).
I just felt like taking a break from the usual stuff and wanted to
get this driver's structure finished, and it's rather clean now...

Tested, working and checkpatch.pl:ed on 2.6.30-rc5,
applies cleanly to 2.6.30 proper.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 08:24:47 +02:00
Andreas Mohr
3eff895830 ALSA: azt3328: fix Kconfig entry
This driver is about as far from being experimental as it can ever get
for an undocumented card, thus create this patch (interestingly it was the only
EXPERIMENTAL remaining in the entire Kconfig file).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 08:24:34 +02:00
Takashi Iwai
aba6653617 ALSA: hda - Fix error path in the sanity check in azx_pcm_open()
Release resources cleanly after errors in the sanity check in
azx_pcm_open().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-05 11:44:46 +02:00
Takashi Iwai
1475ef0f03 Merge branch 'fix/hda' into topic/hda 2009-07-04 12:20:25 +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
854ace9c40 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops
2009-07-03 23:50:45 +02:00
Takashi Iwai
b0bb3aa623 ALSA: hda - Don't override maxbps for FLOAT sharing with linear formats
When FLOAT PCM format is available but together with other linear
PCM formats, don't override maxbps value.  For FLOAT format, it's always
32, thus it can be better checked in snd_hda_calc_stream_format().
Otherwise the maxbps 32 might be used wrongly even if the linear PCM
doesn't support it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 23:25:37 +02:00
Takashi Iwai
c470331e69 ALSA: hda - Add sanity check in PCM open callback
Add some sanity checks of struct snd_pcm_hardware fields in the PCM
open callback of hda driver.  This makes a bit easier to debug any PCM
setup errors in the codec side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 23:10:23 +02:00
Takashi Iwai
70d321e638 ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
The PCM rates bit field may have been changed by the codec open callback.
In that case, we need to reset rate_min and rate_max.  So, simply call
snd_pcm_lib_hw_rates() again after the codec open callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 23:06:45 +02:00
Takashi Iwai
022b466fc3 ALSA: hda - Avoid invalid formats and rates with shared SPDIF
Check whether formats and rates don't result in zero due to the
restriction of SPDIF sharing.  If any of them can be zero, disable
the SPDIF sharing mode instead.  Otherwise it will lead to a PCM
configuration error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 23:03:30 +02:00
Takashi Iwai
e488fca79f Merge branch 'fix/hda' into topic/hda 2009-07-03 15:03:35 +02:00
Takashi Iwai
aa202455ee ALSA: hda - Improve ASUS eeePC 1000 mixer
The mixer elements created for ASUS eeePC 1000 with ALC269 aren't
standard but strange words like "LineOut".  Rename the element names
to follow the standard one like "Headphone" and "Speaker".
Also, split the volumes to each so that the virtual master can control
them.

The alc269_fujitsu_mixer is removed because it's now identical with
the new eeepc mixer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 15:00:54 +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
8ab9e0af6d ALSA: hda - Manually expand alc882_init_verbs
Instead of expanding alc882_init_verbs to two elements via a macro,
manually expand to each entry.  This makes clear that some have already
the full slot for init_verbs array (currently 5).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 10:58:12 +02:00
Takashi Iwai
cb6381225a ALSA: hda - Add missing mixer amp initialization for ALC882
After merting patch_alc882() and patch_alc883(), the initialization of
mixer amp 0x0b was missing in alc882_base_init_verbs[].
This is usually no critical problem, but it can disable the power-saving
as the default state, so better to put to mute these channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 10:57:10 +02:00
Takashi Iwai
dbe45d0ce3 Merge branch 'fix/oxygen' into for-linus
* fix/oxygen:
  sound: virtuoso: fix Xonar D1/DX silence after resume
2009-07-02 17:48:34 +02:00
Takashi Iwai
4413c8d2be Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
2009-07-02 17:48:33 +02:00
Clemens Ladisch
826390796d sound: virtuoso: fix Xonar D1/DX silence after resume
When resuming, we better take the DACs out of the reset state before
trying to use them.

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

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-02 10:35:35 +02:00
Takashi Iwai
cd77538724 ALSA: ice1724 - Fix section mismatch
Now snd_vt1724_chip_reset() is used in the resume callback, thus
it cannot be __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-02 10:30:50 +02:00
Takashi Iwai
e5f1424807 ALSA: hda - Add Cirrus Logic CS420x support
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 18:11:44 +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
b5025c50b5 ALSA: hda - Allow FLOAT PCM format
So far, the FLOAT PCM format is used only exclusivley set.  But
this can be a combination with other formats.

This patch changes the parser to allow the FLOAT format in addition
to other PCM formats.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 18:05:27 +02:00
Takashi Iwai
1e1689536f ALSA: hda - Add missing static to patch_ca0110()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 08:34:32 +02:00
Takashi Iwai
0d971c9fcf ALSA: hda - Fix input pinctl for ALC882 auto mode
alc882_auto_init_analog_input() sets the input pins to VREF-80 regardless
of the input pin types although it shouldn't be for line-in pins.

This patch fixes the behavior to follow other codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 16:11:11 +02:00
Takashi Iwai
4953550a6c ALSA: hda - Merge patch_alc882() and patch_alc883()
Merge patch_alc882() and patch_alc883() to the former one since both
codecs have fairly similar connections but just a slight difference.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 16:10:34 +02:00
Takashi Iwai
b9791ca013 Merge branch 'topic/hda-patch' into topic/hda 2009-06-30 15:29:38 +02:00
Takashi Iwai
546861f1d3 Merge branch 'fix/hda' into topic/hda 2009-06-30 15:12:11 +02:00
Takashi Iwai
580c9d373c Merge branch 'fix/pci-vdevice' into for-linus
* fix/pci-vdevice:
  sound: Use PCI_VDEVICE for CREATIVE and ECTIVA
  sound: Use PCI_VDEVICE
2009-06-29 18:05:09 +02:00
Takashi Iwai
e2cb0d95ba Merge branch 'fix/oxygen' into for-linus
* fix/oxygen:
  sound: oxygen: make mic volume control mono
2009-06-29 18:05:07 +02:00
Takashi Iwai
0baddbc895 Merge branch 'fix/lx6464es' into for-linus
* fix/lx6464es:
  ALSA: lx6464es - configure ethersound io channels
2009-06-29 18:05:05 +02:00
Takashi Iwai
cdae219cec Merge branch 'fix/hda-samsung-p50' into for-linus
* fix/hda-samsung-p50:
  ALSA: hda - Fix support for Samsung P50 with AD1986A codec
  ALSA: hda - Generalize the pin-detect quirk for Lenovo N100
  ALSA: hda - Simplify AD1986A mixer definitions
2009-06-29 18:05:04 +02:00
Takashi Iwai
1d955ebd4d ALSA: hda - Add missing initializations for ALC268 and ALC269
During the changes to clean up / fix the realtek codec initialization
routines in commit 4a79ba34ca,
I forgot to add the check for ALC268 and ALC269.
This resulted in the missing EAPD and COEF setup for these codecs.

This patch adds the missing checks for these codecs.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-29 11:33:53 +02:00
Takashi Iwai
a983b9e500 Merge branch 'fix/hda-samsung-p50' into topic/hda 2009-06-29 08:51:09 +02:00
Takashi Iwai
b7b51141b4 ALSA: hda - Check "beep" hint
Check the hint "beep" in snd_hda_attach_beep_device() to avoid the beep
device creation if user doesn't want.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-29 08:37:00 +02:00
Tony Vroon
684a88429c ALSA: hda - Line In for Acer Inspire 6530G model
The Line In connector is set up as PIN_IN by default, using
VREF_HIZ. It is connected to both ADCs, so add it to both
input selectors.
Also add the ability to use the input mix (on a SoundBlaster
one would call this "What You Hear").

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-29 07:41:08 +02:00
Clemens Ladisch
14744d7da2 sound: oxygen: make mic volume control mono
The microphone input and its volume register have only one channel, so
we have to make the corresponding mixer control a mono control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 15:39:02 +02:00
Tim Blechmann
7e895cfaad ALSA: lx6464es - configure ethersound io channels
as long as the io channel number is not set by the driver, the card
is not visible from the ethersound network

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 09:41:53 +02:00
Igor Chernyshev
b40e953812 ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2
I've built a small HTPC and had to add suspend/resume support in ice1724
driver. There seem to be 3 existing bugs related to that:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3748
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2314

Due to hardware (un)availability, I only enabled the fix for Audiotrak
Prodigy HD2 card, which is installed in my HTPC. However, most of my code
should be reusable in the future on other ice1724-based cards as well (as
long as people add card-specific peices of code). The fix is currently based
on ALSA 1.0.20 and works on my MythBuntu 9.04 HTPC (using 2.6.28-11 kernel).

Signed-off-by: Igor Chernyshev <igor.ch75+alsa at gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 09:31:07 +02:00
Joe Perches
0d7392e544 sound: Use PCI_VDEVICE for CREATIVE and ECTIVA
Here's a patch on top of the others to use CREATIVE and ECTIVA

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:53:57 +02:00
Joe Perches
28d27aae94 sound: Use PCI_VDEVICE
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:52:49 +02:00
Takashi Iwai
dde6535686 ALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G
For Acer Aspire 6930G (1025:015e), acre-aspire-6530g model matches
obviously better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:26:38 +02:00
Emilio López
320d592001 ALSA: hda - Fix acer-aspire-6530g model quirk
Fix the following bugs of acer-aspire-6530g model with ALC888:
- HP jack to mute all speaker outputs including LFE
- Make digital built-in mic working

Signed-off-by: Emilio López <buhitoescolar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:25:22 +02:00
Takashi Iwai
261c240740 ALSA: hda - Add pin-sense trigger when needed for Realtek codecs
Realtek codecs require the pin-sense trigger call before actually
reading the pin-sense.  Without this, the pin-detection might not be
done accurately.

This patch adds the pin-capability check and issues the trigger call
if required.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:15:03 +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
4ea6fbc8eb ALSA: hda - Add patch module option
Added the patch module option to apply a "patch" as a firmware to
modify pin configurations or give additional hints to the driver
before actually initializing and configuring the codec.

This can be used as a workaround when the BIOS doesn't give sufficient
information or give wrong information that doesn't match with the real
hardware setup, until it's fixed statically in the driver via a quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 11:53:43 +02:00
Takashi Iwai
a1e21c9078 ALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()
The codec setup call via snd_hda_codec_configure() isn't necessarily
called in snd_hda_codec_new().  For the later added feature, it's better
to change the code flow like:
 - create all codec instances
 - configure each codec

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 11:52:59 +02:00
Linus Torvalds
c488eef815 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Make jack-plug notification selectable
  ALSA: ctxfi - Add PM support
  sound: seq_midi_event: fix decoding of (N)RPN events
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
  sound: fix check for return value in snd_pcm_hw_refine
  ALSA: ctxfi - Allow unknown PCI SSIDs
  ASoC: Blackfin: update the bf5xx_i2s_resume parameters
  ASoC: Blackfin: keep better track of SPORT configuration state
2009-06-23 10:45:39 -07:00
Takashi Iwai
b61eaa924c Merge branch 'topic/misc' into for-linus
* topic/misc:
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
2009-06-22 17:03:52 +02:00
Takashi Iwai
11a93fd940 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Make jack-plug notification selectable
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
2009-06-22 17:03:48 +02:00
Takashi Iwai
366890df46 Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Add PM support
  ALSA: ctxfi - Allow unknown PCI SSIDs
2009-06-22 17:03:44 +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
Wai Yew CHAY
29959a09cc ALSA: ctxfi - Add PM support
Added the suspend/resume support to ctxfi driver.

The team tested on the following seems ok:
  AMD Athlon 64 3500+ / ASUS A8N-E / 512MB DDR ATI / Radeon X1300
  20k1 & 20k2 cards

Signed-off-by: Wai Yew CHAY <wychay@ctl.creative.com>
Singed-off-by: Ryan RICHARDS <ryan_richards@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 14:53:51 +02:00
Takashi Iwai
8c927b4acf ALSA: hda - Add digital-mic support to ALC262 auto model
Add the digital-mic support with ALC262 auto model.
The new ALC262 models have the digital mic at NID 0x12.  This widget
isn't checked in the current alc262_auto_create_analog_input_ctls()
since it's under 0x18.  So, just reuse the routine for alc269 to fix
the behavior.

But, it doesn't suffice: the digital mic is supported only with the
ADC0, we have to exclude other ADCs when d-mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 11:06:18 +02:00
Takashi Iwai
0169b6b33b ALSA: hda - Fix check of input source type for realtek codecs
Fix the check of the input-source type by checking the widget type of
each capture-source item.  Since some codecs can have both the mixer
and selector types depending on the ADC, alc_mux_enum_put() needs to
check each widget.

With this change, spec->capture_style gets unneeded, so it's removed,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 11:06:05 +02:00
Takashi Iwai
376b508ffd ALSA: hda - Add quirk for Sony VAIO Z21MN
It needs model=toshiba-s06 to work with the digital-mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-06-22 11:05:56 +02:00
Takashi Iwai
ae14ef68e8 ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
The commit f9e336f65b
    ALSA: hda - Unify capture mixer creation in realtek codes
removed the "Input Source" mixer element creation for toshiba-s06 model
because it contains a digital-mic input.

This patch take the control back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-06-22 10:13:36 +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
Simon Arlott
115551d98e ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
There's a large 500ms delay in snd_via82xx_codec_wait() that, at least
on my hardware, appears to be unnecessary. The rest of the init of
the card works without logging any warnings or errors and both audio
and mixer settings work.

This adds an "nodelay" parameter to disable this (undocumented in the
code) large delay improving bootup time by 489-500ms.

[    1.034217] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 505757 usecs
vs.
[    0.533136] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 15915 usecs

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 07:54:58 +02:00
Takashi Iwai
a8f4310be5 ALSA: ctxfi - Allow unknown PCI SSIDs
Allow unknown PCI SSIDs for emu20k1 and emu20k2 as "unknown" model.
Also, add a black-list check in case any device has to be listed
as "unsupported".  It has a negative value in the pci quirk entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 07:36:52 +02:00
Linus Torvalds
413318444f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Add model=6530g option
  ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
  ALSA: snd_usb_caiaq: fix legacy input streaming
  ASoC: Kill BUS_ID_SIZE
  ALSA: HDA - Correct trivial typos in comments.
  ALSA: HDA - Name-fixes in code (tagra/targa)
  ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
  ALSA: hda - Fix memory leak at codec creation
2009-06-21 13:13:08 -07:00
Takashi Iwai
47166281d2 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Add model=6530g option
  ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
  ALSA: HDA - Correct trivial typos in comments.
  ALSA: HDA - Name-fixes in code (tagra/targa)
  ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
  ALSA: hda - Fix memory leak at codec creation
2009-06-21 10:59:12 +02:00
Takashi Iwai
b1a914690c ALSA: hda - Add model=6530g option
Add the new model string corresponding to the previous Acer Aspire
6530G support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-21 10:57:16 +02:00
Tony Vroon
d2fd4b09c0 ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
The selected 4930G model seemed to keep the subwoofer 'tuba'
function from operating correctly. Removing the existing PCI
ID match made this work again, but it was mapped to 'Side'
instead of to LFE as one would expect.
This attempts to enable all functionality and keep the amount
of available mixer sliders low. Any slider that had no audible
effect on the output audio has been removed, and as such EAPD
is not currently enabled.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-21 10:52:14 +02:00
Andrew Morton
8e20ce94ce convert some DMA_nnBIT_MASK() callers
We're about to make DMA_nnBIT_MASK() emit `deprecated' warnings.  Convert the
remaining stragglers which are visible to the x86_64 build.

Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Eric Moore <Eric.Moore@lsil.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Yi Zou <yi.zou@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-19 16:46:06 -07:00
Sasha Alexandr
def319f9e9 ALSA: HDA - Correct trivial typos in comments.
Correct some trivial typos in comments.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:33:43 +02:00
Sasha Alexandr
c259249f7d ALSA: HDA - Name-fixes in code (tagra/targa)
Correct some cut+paste typos from 'tagra' to 'targa'.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:33:34 +02:00
Sasha Alexandr
df01b8af56 ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
Add pci-quirk for MSI MS-7350 motherboard with Realtek ALC888.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:33:13 +02:00
Takashi Iwai
f75dcc87fe ALSA: hda - Fix memory leak at codec creation
The codec->modelname field is allocated twice in snd_hda_codec_new().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:22:32 +02:00
Linus Torvalds
661adc423d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ctxfi - Fix deadlock with xfi-timer
  ALSA: intel8x0 - Fix PCM position craziness
  ALSA: usb-audio - rework quirk for TerraTec Aureon USB 5.1 MkII
  ASoC: magician: fix PXA SSP clock polarity
  ASoC: Instantiate any forgotten DAPM widgets
  ASoC: Revert duplicated code in SSM2602 driver
  ALSA: hda - Add quirk for Acer Aspire 6935G
  ALSA: ctxfi - Replace atc lock to mutex
  ASoC: Remove odd bit clock ratios for WM8903
2009-06-16 12:10:31 -07:00
Takashi Iwai
b909005ce1 Merge branch 'topic/intel8x0' into for-linus
* topic/intel8x0:
  ALSA: intel8x0 - Fix PCM position craziness
2009-06-16 17:38:46 +02:00
Takashi Iwai
7998d90a14 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Add quirk for Acer Aspire 6935G
2009-06-16 17:38:43 +02:00
Takashi Iwai
3d2aa66dda Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Fix deadlock with xfi-timer
  ALSA: ctxfi - Replace atc lock to mutex
2009-06-16 17:38:40 +02:00
Takashi Iwai
8dca419721 ALSA: ctxfi - Fix deadlock with xfi-timer
The PCM x-fi native update routine can cause deadlocks when the
trigger(START) is called while the stream is running.

This patch fixes the deadlock by just postponing the pcm period update
to the next possible wake-up.  Also it adds the flip of ti->running
flag (just to be sure as now).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-15 14:52:55 +02:00
Takashi Iwai
f708eb1d71 ALSA: intel8x0 - Fix PCM position craziness
The PCM pointer callback sometimes returns invalid positions and this
screws up the hw_ptr updater in PCM core.  Especially since now the
jiffies check is optional with xrun_debug, the invalid position is
handled as is, and causes serious sound skips, etc.

This patch simplifies the position-fix strategy in intel8x0 to be more
robust:
- just falls back to the last position if bogus position is detected
- another sanity check for the backward move of the position due to
  a race of register update and the base-index update

This patch is applicable also for 2.6.30.

Tested-by: David Miller <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-15 12:36:06 +02:00
Linus Torvalds
489f7ab6c1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (31 commits)
  trivial: remove the trivial patch monkey's name from SubmittingPatches
  trivial: Fix a typo in comment of addrconf_dad_start()
  trivial: usb: fix missing space typo in doc
  trivial: pci hotplug: adding __init/__exit macros to sgi_hotplug
  trivial: Remove the hyphen from git commands
  trivial: fix ETIMEOUT -> ETIMEDOUT typos
  trivial: Kconfig: .ko is normally not included in module names
  trivial: SubmittingPatches: fix typo
  trivial: Documentation/dell_rbu.txt: fix typos
  trivial: Fix Pavel's address in MAINTAINERS
  trivial: ftrace:fix description of trace directory
  trivial: unnecessary (void*) cast removal in sound/oss/msnd.c
  trivial: input/misc: Fix typo in Kconfig
  trivial: fix grammo in bus_for_each_dev() kerneldoc
  trivial: rbtree.txt: fix rb_entry() parameters in sample code
  trivial: spelling fix in ppc code comments
  trivial: fix typo in bio_alloc kernel doc
  trivial: Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt
  trivial: Miscellaneous documentation typo fixes
  trivial: fix typo milisecond/millisecond for documentation and source comments.
  ...
2009-06-14 13:46:25 -07:00
Takashi Iwai
e46b0c8c08 ALSA: hda - Add quirk for Acer Aspire 6935G
Added model=acer-aspire-8930g for Acer Aspire 6935G (1025:0146).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-13 10:16:43 +02:00
Takashi Iwai
635c265f32 ALSA: ctxfi - Replace atc lock to mutex
The spinlock in atc can cause a sleep in lock:

Kernel failure message 1:
BUG: sleeping function called from invalid context at mm/slub.c:1599
in_atomic(): 0, irqs_disabled(): 1, pid: 2537, name: gstreamer-prope
Pid: 2537, comm: gstreamer-prope Tainted: P
2.6.29.4-167.fc11.x86_64 #1
Call Trace:
  [<ffffffff8103ff0f>] __might_sleep+0x10b/0x110
  [<ffffffff810cd734>] __kmalloc+0x73/0x130
  [<ffffffffa0b4b142>] ? daio_rsc_init+0xaa/0x125 [snd_ctxfi]
  [<ffffffffa0b4b212>] dao_rsc_init+0x55/0x1c0 [snd_ctxfi]
  [<ffffffffa0b4b3d2>] dao_rsc_reinit+0x55/0x5d [snd_ctxfi]
  [<ffffffff813abd6c>] ? _spin_lock_irqsave+0x32/0x3b
  [<ffffffffa0b454fe>] atc_spdif_out_passthru+0x92/0x136 [snd_ctxfi]
  ...

Since the lock path is no critical path, it can be gracefully
replaced with a mutex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-13 10:12:59 +02:00
Takashi Iwai
31d496aaee Merge branch 'topic/lx6464es' into for-linus
* topic/lx6464es:
  ALSA: lx6464es - support standard alsa module parameters
2009-06-12 20:03:11 +02:00
Takashi Iwai
f8be792d51 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
2009-06-12 20:03:09 +02:00
Martin Olsson
19af5cdb7c trivial: fix typo milisecond/millisecond for documentation and source comments.
Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:46 +02:00
Martin Olsson
98a1708de1 trivial: fix typos s/paramter/parameter/ and s/excute/execute/ in documentation and source comments.
Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:46 +02:00
Thadeu Lima de Souza Cascardo
4b512d26f4 trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)able
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:45 +02:00
Tim Blechmann
de0525ca34 ALSA: lx6464es - support standard alsa module parameters
trivial patch to support the alsa module parameters `index', `id'
and `enable'

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-11 16:03:34 +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
Takashi Iwai
4ef279205a Merge branch 'topic/seq-kconfig-cleanup' into for-linus
* topic/seq-kconfig-cleanup:
  ALSA: clean up the logic for building sequencer modules
2009-06-10 07:26:48 +02:00
Takashi Iwai
87cb14a5f4 Merge branch 'topic/riptide' into for-linus
* topic/riptide:
  ALSA: riptide - Fix joystick resource handling
  ALSA: riptide - Code clean up
2009-06-10 07:26:44 +02:00
Takashi Iwai
4ad75433c2 Merge branch 'topic/pcm-subclass-fix' into for-linus
* topic/pcm-subclass-fix:
  ALSA: Remove invalid GENERIC_MIX PCM sublass
2009-06-10 07:26:43 +02:00
Takashi Iwai
9dea75c709 Merge branch 'topic/oxygen' into for-linus
* topic/oxygen:
  sound: virtuoso: add Xonar Essence ST support
  sound: virtuoso: enable HDAV S/PDIF input
  sound: virtuoso: add another DX PCI ID
  sound: oxygen: reset DMA when stream is closed
2009-06-10 07:26:39 +02:00
Takashi Iwai
8c3ff3a7fb Merge branch 'topic/misc' into for-linus
* topic/misc:
  ALSA: sgio2audio.c: clean up checking
  ALSA: burgundy: timeout message is off by one.
  ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99
  ALSA: parisc/harmony: fix printk format warning
  ALSA: keywest: Get rid of useless i2c_device_name() macro
2009-06-10 07:26:37 +02:00
Takashi Iwai
ed8cc176c9 Merge branch 'topic/maya44' into for-linus
* topic/maya44:
  ALSA: ice1724 - Add ESI Maya44 support
  ALSA: ice1724 - Allow spec driver to create own routing controls
  ALSA: ice1724 - Add PCI postint to reset sequence
  ALSA: ice1724 - Clean up definitions of DMA records
  ALSA: ice1724 - Check error in set_rate function
2009-06-10 07:26:36 +02:00
Takashi Iwai
03cece06c4 Merge branch 'topic/lx6464es' into for-linus
* topic/lx6464es:
  ALSA: Add missing description of lx6464es to ALSA-Configuration.txt
  ALSA: lx6464es - Disable lx_message_send()
  ALSA: lx6464es - Use snd_card_create()
  ALSA: lx6464es - driver for the digigram lx6464es interface
2009-06-10 07:26:34 +02:00
Takashi Iwai
3c2fcf36d7 Merge branch 'topic/hdsp' into for-linus
* topic/hdsp:
  ALSA: hdsp - Add a comment about external firmwares for hdsp
  ALSA: hdsp: allow firmware loading from inside the kernel
2009-06-10 07:26:32 +02:00
Takashi Iwai
81ad969dbf Merge branch 'topic/hda' into for-linus
* topic/hda: (51 commits)
  ALSA: hda - Fix the previous tagra-8ch patch
  ALSA: hda - Add 7.1 support for MSI GX620
  ALSA: support Sony Vaio TT
  ALSA: hda_intel: fix build error when !PM
  ALSA: hda - More Aspire 8930G fixes
  ALSA: hda - Acer Aspire 8930G support
  ALSA: hda - Limit codec-verb retry to limited hardwares
  ALSA: hda - Add codec bus reset and verb-retry at critical errors
  ALSA: hda - Reorder and clean-up ALC268 quirk table
  ALSA: hda - fix audio on LG R510
  ALSA: hda - Macbook[Pro] 5 6ch support
  ALSA: hda-intel: improve initialization for ALC262_HP_BPC model
  ALSA: hda - Jack Mode changes for Sigmatel boards
  ALSA: hda - Support NVIDIA 8 channel HDMI audio
  ALSA: hda - Fix a typo in the previous patch
  ALSA: hda - Fix reverted LED setup for HP
  ALSA: hda - Add more register bits definitions
  ALSA: hda - Always sync writes in single_cmd mode
  ALSA: hda - Support sync after writing a verb
  ALSA: hda - Allow concurrent RIRB access in single_cmd mode
  ...
2009-06-10 07:26:31 +02:00
Takashi Iwai
2f0dabcc5f Merge branch 'topic/emu10k1' into for-linus
* topic/emu10k1:
  ALSA: emu10k1 - Fix minimum periods for efx playback
2009-06-10 07:26:29 +02:00
Takashi Iwai
19b1a15a3d Merge branch 'topic/div64-cleanup' into for-linus
* topic/div64-cleanup:
  ALSA: Clean up 64bit division functions
2009-06-10 07:26:28 +02:00
Takashi Iwai
e618a5609e Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi: (35 commits)
  ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
  ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
  ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
  ALSA: ctxfi - Add use_system_timer module option
  ALSA: ctxfi - Fix wrong model id for UAA
  ALSA: ctxfi - Clean up probe routines
  ALSA: ctxfi - Fix / clean up hw20k2 chip code
  ALSA: ctxfi - Fix possible buffer pointer overrun
  ALSA: ctxfi - Remove useless initializations and cast
  ALSA: ctxfi - Fix DMA mask for emu20k2 chip
  ALSA: ctxfi - Make volume controls more intuitive
  ALSA: ctxfi - Optimize the native timer handling using wc counter
  ALSA: ctxfi - Add missing inclusion of linux/math64.h
  ALSA: ctxfi - Set device 0 for mixer control elements
  ALSA: ctxfi - Clean up / optimize
  ALSA: ctxfi - Set periods_min to 2
  ALSA: ctxfi - Use native timer interrupt on emu20k1
  ALSA: ctxfi - Fix previous fix for 64bit DMA
  ALSA: ctxfi - Fix endian-dependent codes
  ALSA: ctxfi - Allow 64bit DMA
  ...
2009-06-10 07:26:27 +02:00
Takashi Iwai
a963203c18 Merge branch 'topic/ca0106' into for-linus
* topic/ca0106:
  ALSA: ca0106 - Fix master volume scale
  ALSA: ca0106 - Add missing card->mixername field setup
  ALSA: ca0106 - Add missing registrations of vmaster controls
2009-06-10 07:26:22 +02:00
Takashi Iwai
1d479f89ec Merge branch 'topic/au88x0' into for-linus
* topic/au88x0:
  ALSA: au88x0: fix wrong period_elapsed() call
  ALSA: au88x0: fix .pointer callback
2009-06-10 07:26:21 +02:00
Takashi Iwai
a5990dc5b9 ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
Currently the PCM resources are allocated only once and ever in prepare
callback, assuming that the PCM parameters are never changed.  But it's
not true.

This patch adds the call of atc->pcm_release_resources() at hw_params
and hw_free callbacks to assure that the PCM setup is done correctly
for each h/w parameter changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:19:02 +02:00
Takashi Iwai
5242bc7613 ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
The SRC instances may not exist when PCM pointer callback is called at
the state before initialization is finished.  Add the NULL check just
to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:17:14 +02:00
Takashi Iwai
c399f3be82 ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:16:20 +02:00
Takashi Iwai
04145f2bfb ALSA: ctxfi - Add use_system_timer module option
Added use_system_timer module option to force to use the system timer
instead of emu20k1 timer irq for debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 21:32:26 +02:00
Takashi Iwai
09521d2e3e ALSA: ctxfi - Fix wrong model id for UAA
CTUAA should be checked instead of CTHENDRIX.  The latter is for 20k2 chip.
Also, fixed the detection of UAA/HENDRIX models by fixing the mask bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 18:30:37 +02:00
Takashi Iwai
9470195a9c ALSA: ctxfi - Clean up probe routines
Clean up probe routines and model detection routines so that the driver
won't call and check the PCI subsystem id at each time.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 18:10:32 +02:00
Takashi Iwai
f03ecf5053 ALSA: hda - Fix the previous tagra-8ch patch
- Fix a typo in the patch
- Adapted to follow the recent change for unsol event handling

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 16:38:17 +02:00
David Heidelberger
64a8be7435 ALSA: hda - Add 7.1 support for MSI GX620
Added 7.1 support for MSI GX620 and jack quirk.

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

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 16:18:31 +02:00
Takashi Iwai
806d31d738 ALSA: emu10k1 - Fix minimum periods for efx playback
EFX playback stream should have periods_min = 2 to avoid the buffer
position overflow (due to restrictions of the pcm-indirect helper).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:50:42 +02:00
Takashi Iwai
d362af62ed ALSA: ctxfi - Fix / clean up hw20k2 chip code
- Clean up Hungarian coding style
- Don't use static variables for I2C information; this unables to use
  multiple instances.  Now they are stored in struct hw20k2 fields.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:31:22 +02:00
Takashi Iwai
af8500bbbd ALSA: ctxfi - Fix possible buffer pointer overrun
Fix possible buffer pointer overruns.  Back to zero when it's equal
or over the buffer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:07:46 +02:00
Takashi Iwai
514eef9c2a ALSA: ctxfi - Remove useless initializations and cast
Remove useless variable initializations and cast at the beginning of
functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 14:57:57 +02:00
Takashi Iwai
4836ac6554 ALSA: ctxfi - Fix DMA mask for emu20k2 chip
Allow 64bit DMA mask for emu20k2 chip, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 14:51:24 +02:00
Takashi Iwai
d436dd063b ALSA: ctxfi - Make volume controls more intuitive
Change the volume control to dB scale (as the raw data seems so).
Also added the TLV dB-scale information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 13:50:18 +02:00
Takashi Iwai
c4865679df ALSA: ca0106 - Fix master volume scale
The master volume dB scale was wrongly defined as 0.50dB setp while
it must be 0.25dB step.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 12:57:17 +02:00
Takashi Iwai
54de6bc8b2 ALSA: ctxfi - Optimize the native timer handling using wc counter
Optimize the timer update routine to look up wall clock once instead of
checking the position of each stream at each timer update.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 12:38:54 +02:00
Takashi Iwai
28cd4aa43d ALSA: ctxfi - Add missing inclusion of linux/math64.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 18:07:12 +02:00