Commit graph

4280 commits

Author SHA1 Message Date
Takashi Iwai
20c304ed84 ALSA: hda - Enable snoop bit for AMD controllers
AMD Hudson controllers give noisy outputs when the buffer data is
rewritten on the fly as PulseAudio does.  This seems fixed by the
snoop bit enabled just like ATI chipset.

Also, disable 64bit DMA as now, to be sure.
We can revisit this later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 18:41:25 +02:00
Takashi Iwai
b55fcb508d ALSA: hda - Handle dock line-in as auto-detecable for Cxt auto-parser
Similar process like in patch_realtek.c and patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:57:46 +02:00
Takashi Iwai
1f83ac5ac9 ALSA: hda - Handle dock line-in as auto-detectable for IDT codecs
When a docking-station has a line-in jack, we can handle it also as
a detectable jack just like mic-in.  This will improve the usability
of HP laptops with a docking-station.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:35:03 +02:00
Takashi Iwai
8ed99d9768 ALSA: hda - Add dock-mic detection support to Realtek auto-parser
In addition to the normal mic jack, the mic (or line-in) jack on the
docking-station is checked also as a candidate for auto-selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:34:57 +02:00
Takashi Iwai
e35d9d6a15 ALSA: hda - Check unsol-cap in is_jack_detectalbe()
Also replace more open-codes with this function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:27 +02:00
Takashi Iwai
43c1b2e920 ALSA: hda - Add support of dock-mic detection to Conexant auto-parser
In addition to the normal external mic jack, check also the mic jack
on a docking-station as well, and select the input source appropriately.

The similar functionality was already implemented in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:00 +02:00
Takashi Iwai
52d3cb88d7 ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c
spec->automute_lines shouldn't be set unless the line-detection is
available.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:04:08 +02:00
Takashi Iwai
1682c81746 ALSA: hda - Use get_wcaps_type()
Replace the open-code with get_wcaps_type() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:03:02 +02:00
Takashi Iwai
06dec2282b ALSA: hda - Use is_jack_detectable() helper
Replaced the open-code with the new helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:00:16 +02:00
Takashi Iwai
03697e2acc ALSA: hda - Add automute-mode enum to Conexant auto-parser
Implement the same functionality as Realtek's auto-mute mode control.
Now Conexant auto-parser can also mutes line-out and provide the enum
control for different automute behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:57:19 +02:00
Takashi Iwai
a3a85d3983 ALSA: hda - Add missing Front/Surround/CLFE as slaves for Cxt auto-parser
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:17:52 +02:00
Takashi Iwai
47ad1f4e40 ALSA: hda - Code refactoring in patch_conexant.c
Use a struct instead of each array for managing input-source info
for auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:15:55 +02:00
David Henningsson
e033ebfb39 ALSA: HDA: Use one dmic only for Dell Studio 1558
There are no signs of a dmic at node 0x0b, so the user is left with
an additional internal mic which does not exist. This commit removes
that non-existing mic.

Cc: stable@kernel.org (2.6.32+)
BugLink: http://bugs.launchpad.net/bugs/731706
Reported-by: James Page <james.page@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 14:23:56 +02:00
Takashi Iwai
fea4a4f973 ALSA: hda - Add support of auto-parser to cxt5066 codecs
Still experimental.
Not enabled as default unless model=auto is passed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:50:00 +02:00
Takashi Iwai
f9759301c6 ALSA: hda - Don't create multiple same volume/boost controls in Cxt auto-parser
Check the routing more exactly for avoiding the duplicated controls for
the very same effect for multiple capture routes in Conexant auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:45:15 +02:00
Takashi Iwai
cf27f29ae2 ALSA: hda - Build boost controls from selector widget in Cxt auto-parser
When the intermediate selector widget in the capture path provides the
boost volume, create the corresponding volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:33:02 +02:00
Takashi Iwai
9b842cd868 ALSA: hda - Don't use auto-parser for cxt5045 / 5051 as default
Just for safety reason (for avoiding any possible regressions), don't
enable auto-parser as default for cxt5045 and 5051, as well as 5047.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:35:04 +02:00
Takashi Iwai
1387cde51d ALSA: hda - Enable codec->pin_amp_workaround always for Conexant auto-parser
It can (must for some) be used for all Conexnat codecs safely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:22:20 +02:00
Takashi Iwai
22ce5f74a9 ALSA: hda - Search ADC NIDs dynamically in Conexant auto-parser
Instead of giving fixed arrays, look for ADC nids dynamically in the
tree in Conexant auto-parser code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:21:06 +02:00
Ondrej Zary
fdb62b500d ALSA: fm801: clean-up radio-related Kconfig
Remove TEA575X_RADIO define from fm801.c.
Also update Kconfig help text to include all supported cards.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 11:43:31 +02:00
Ondrej Zary
10ca720147 ALSA: tea575x: use better card and bus names
Provide real card and bus_info instead of hardcoded values.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:24 +02:00
Ondrej Zary
3d11ba5593 ALSA: tea575x: remove unused card from struct
struct snd_card *card is present in struct snd_tea575x but never used.
Remove it.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:14 +02:00
Ondrej Zary
ea27316e4c ALSA: tea575x: remove freq_fixup from struct
freq_fixup is a constant, no need to hold it in struct snd_tea575x and set in
each driver.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:01 +02:00
Takashi Iwai
fa5dadcbe0 ALSA: hda - Add support of auto-parser to cxt5047 / CX20551 Waikiki
Similarly like other Conexant codecs, now model=auto is supported for
cxt5047.

But the auto-parser mode isn't activated as default yet, since BIOS
pin-configs seem often broken on machines with this codec.  User need
to pass model=auto explicitly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:37:45 +02:00
Takashi Iwai
5c9887e087 ALSA: hda - Parse more deep input-source routes in Conexant auto-parser
Handle not only a single-depth input-route but two-level depth routes
(PIN->MUX->ADC), too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:30:58 +02:00
Takashi Iwai
f6100bb4b8 ALSA: hda - Clean up input-mux handling in Conexant auto-parser
Keep the registered input-pins in imux_pins[], and fix the inconsistent
use of sepc->auto_mic_ext.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 18:28:03 +02:00
Takashi Iwai
1f8458a262 ALSA: hda - Add auto-parser support to cxt5045 / CX20549 Venice
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 17:22:05 +02:00
Takashi Iwai
6764bcef4c ALSA: hda - Add auto-parser support to cxt5051 / CX20561 Hermosa
Extend the existing auto-parser for CX2064x for cxt5051 codec.
Now the auto-parser supports ADC-switching for this codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:52:25 +02:00
Takashi Iwai
0ad1b5b619 ALSA: hda - Check AMP CAP at initialization of Conexant auto-parser
Some codecs have no mute caps in audio I/O widgets.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:43:12 +02:00
Takashi Iwai
da33986651 ALSA: hda - Turn on EAPD dynamically per jack plug in Conexant auto mode
Instead of keeping always EAPD on, turn on/off appropriately at jack
plugging in Conexant auto-parser mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:24:15 +02:00
Takashi Iwai
2557f7427d ALSA: hda - Fix auto-mic for CX2064x codecs
The wrong id is assigned for external/internal mics in the auto-mic
selection parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:18:37 +02:00
Ondrej Zary
d7ba858a7f ALSA: fm801: implement TEA575x tuner autodetection
Autodetect TEA575x tuner connection type during init. This allows tuner to
work out-of-the box.

tea575x_tuner module parameter remains functional to force tuner type.

Tested with SF256-PCP and SF64-PCR.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 10:52:24 +02:00
Ondrej Zary
938a1566b1 ALSA: fm801: convert TEA575x support to new interface
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.

Also convert the original triple implementation to a simple GPIO pin map.

Tested with SF256-PCP and SF64-PCR (added the GPIO pin for MO/ST signal
for them).
SF256-PCS untested (pin for MO/ST signal is a guess).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:31:45 +02:00
Ondrej Zary
72587173cc ALSA: es1968: convert TEA575x support to new interface
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.

Tested with SF64-PCE2 card.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:31:29 +02:00
Randy Dunlap
f428c94c84 ALSA: lola - fix lola build
sound/pci/lola/Makefile was trying to build lola modules even
when PCI and SND_LOLA were not enabled, causing build errors:

ERROR: "snd_pcm_hw_constraint_step" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_period_elapsed" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_dma_alloc_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_hw_constraint_integer" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_sgbuf_ops_page" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_set_ops" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_free_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_ioctl" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_malloc_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_sgbuf_get_chunk_size" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_dma_free_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_preallocate_pages_for_all" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_new" [sound/pci/lola/snd-lola.ko] undefined!

Fix the Makefile to build only when CONFIG_SND_LOLA is enabled.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 19:55:13 +02:00
Takashi Iwai
447ee6a7cb ALSA: hda - Use position_fix=3 as default for AMD chipsets
AMD chipsets often behave pretty badly regarding the DMA position
reporting.  It results in the bad quality audio recording.
Using position_fix=3 works well in general for them, so let's enable
it as default for AMD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 18:28:50 +02:00
Takashi Iwai
f2e0192519 ALSA: lola - Yet another linux/delay.h inclusion
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 18:48:29 +02:00
Takashi Iwai
f044785d0a ALSA: lola - Add missing inclusion of linux/delay.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 18:21:01 +02:00
Takashi Iwai
fe4af1b55e ALSA: lola - Implement polling_mode like hd-audio
Also protect the call of lola_update_rirb() with spinlock.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:06:53 +02:00
Takashi Iwai
2db3002029 ALSA: lola - Rename to Digital SRC Capture Switch
Renamed to Digial SRC Capture Switch for more correct representation.
Also fixed analog volume control on Lola161611 and lola881.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:05:08 +02:00
Takashi Iwai
c7aad3c317 ALSA: lola - Add sync in loop implementation
For assuring the synchronized state with the pause operation,
loop over the all linked streams and waits until all get ready
in a loop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:02:35 +02:00
Takashi Iwai
7e79f22676 ALSA: lola - Add SRC refcounting
Added the refcounting for the exclusive SRC control.
Also, fixed the possible stall after PCM pause operations.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:59:27 +02:00
Takashi Iwai
8bd172dc96 ALSA: lola - Allow granularity changes
Add some sanity checks.
Change PCM parameters appropriately per granularity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:51:56 +02:00
Takashi Iwai
972505ccde ALSA: lola - Use SG-buffer
Completely switch to SG-buffer now, as it's working stably.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:50:51 +02:00
Takashi Iwai
fe3d393eda ALSA: lola - Add Lola-specific module options
Added granularity and sample_rate_min module options.

The former controls the h/w access granularity.  As default, it's set
to the max value 32.

The latter controls the minimum sample rate in Hz, as default 16000.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:48:59 +02:00
Takashi Iwai
0f8f56c959 ALSA: lola - Fix PCM stalls
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:47:03 +02:00
Takashi Iwai
333ff3971f ALSA: lola - Use a single BDL
Use a single BDL for both buffers instead of allocating for each.

Also a few tune-up to avoid the stream stalls in the PCM code and
the prelimianry work for SG-buffer support are added, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:41:02 +02:00
Takashi Iwai
a426c78723 ALSA: lola - Suppress the debug print
Use snd_printdd() for less important debug messages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:53 +02:00
Takashi Iwai
c772bbe69a ALSA: lola - Changes in proc file
The codec proc file becomes a read only that shows the codec widgets
in a text form.  A new proc file, codec_rw, is introduced instead for
accessing the Lola verb directly by reading and writing to it.

Also, regs proc file shows the contents of DSD, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:52 +02:00
Takashi Iwai
1c5d7b312f ALSA: lola - Make SRC helper global
Make lola_sample_rate_convert() global so that it can be accessed from
other files.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:52 +02:00
Takashi Iwai
d43f3010b8 ALSA: Add the driver for Digigram Lola PCI-e boards
Added a new driver for supporting Digigram Lola PCI-e boards.

Lola has a similar h/w design like HD-audio but with extended verbs.
Thus the driver is written similarly like HD-audio driver in the bus
part.  The codec part is rather written in a fixed way specific to the
Lola board because of the verb incompatibility.

The driver provides basic PCM, supporting multi-streams and mixing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:31:05 +02:00
Raymond Yau
ce85c9ac8d ALSA: hda - fix NULL-dereference in patch_realtek
Fix NULL-dereference when try to use alt_playback since those codecs
which support multistreaming playback usually have more than 1 adc but
the driver should create alt_capture when spec->stream_analog_alt_capture
is also defined.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 10:32:04 +02:00
Takashi Iwai
20ec8b2463 Merge branch 'fix/hda' into topic/hda 2011-05-02 13:58:23 +02:00
Takashi Iwai
24af2b1cc4 ALSA: hda - Fix Realtek's chained fixup checks
The check of chained fixup list entry was done against the wrong element.
A stupid mistake during refactoring.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 13:55:36 +02:00
Takashi Iwai
90dd48a1a9 ALSA: hda - Constify fixup and other array data in patch_via.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:38:19 +02:00
Takashi Iwai
2b63536f0c ALSA: hda - Constify fixup and other array data in patch_sigmatel.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:33:43 +02:00
Takashi Iwai
9cf0aa9eba ALSA: hda - Constify fixup and other array data in patch_si3054.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:22:39 +02:00
Takashi Iwai
fb79e1e0a2 ALSA: hda - Constify fixup and other array data in patch_hdmi.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:31 +02:00
Takashi Iwai
34cbe3a6fa ALSA: hda - Constify fixup and other array data in patch_conexant.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:31 +02:00
Takashi Iwai
c42d47829a ALSA: hda - Constify fixup and other array data in patch_cirrus.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:30 +02:00
Takashi Iwai
728850a7f2 ALSA: hda - Constify fixup and other array data in patch_ca0110.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:29 +02:00
Takashi Iwai
779d065983 ALSA: hda - Constify fixup and other array data in patch_cmedia.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:28 +02:00
Takashi Iwai
498f5b175b ALSA: hda - Constify fixup and other array data in patch_analog.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:27 +02:00
Takashi Iwai
4c6d72d138 ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:21 +02:00
Takashi Iwai
dda144103c ALSA: hda - Constify some API function arguments
Also fixed the assignment of multiout.dac_nids to satisfy const.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:07:48 +02:00
Takashi Iwai
a9111321f2 ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 11:30:18 +02:00
Takashi Iwai
031024eea8 ALSA: hda - Constify some API function arguments
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 11:29:30 +02:00
Takashi Iwai
a3ea8e8f24 Merge branch 'fix/hda' into topic/hda 2011-05-02 10:41:40 +02:00
Takashi Iwai
ebb47241ea Revert "ALSA: hda - Fix pin-config of Gigabyte mobo"
This reverts commit c6b358748e.

It turned out that there are different pin configurations for this
PCI SSID, including multi-channel modes.  And more proper fix for
allowing line-out mutes will come up in 2.6.40 tree, so we won't need
this fixup any more there.

Reported-by: Andrew Clayton <andrew@digital-domain.net>
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 10:37:29 +02:00
David Henningsson
94024cd1ae ALSA: HDA: Fix automute for Gateway NV79
The PCI SSID is 1025:031c and the codec SSID is 1025:031d,
so the driver mistakes this for a SKU value, but looking at
the numbers, this is obviously wrong.

Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/761861
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 14:19:31 +02:00
Takashi Iwai
c2de187e5b ALSA: hda - Show the line-out type in snd_hda_parse_pin_def_config()
Helpful for debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 13:01:33 +02:00
Daniel Cordero
a7e985e18f ALSA: hda: add beep quirk for Realtek 0x1043:831a
PC Beep was not being reported as enabled on my EeePC 901:
        SKU: enable_pcbeep=0x0

Signed-off-by: Daniel Cordero <danielcordero@lavabit.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 08:18:06 +02:00
Takashi Iwai
ae8a60a598 ALSA: hda - Add Auto-Mute Mode enum for two-output cases
The Auto-Mute Mode control is useful even when only two outputs
(e.g. HP and speaker) are available.  Then user can enable/disable
the auto-mute behavior on the fly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 18:09:52 +02:00
Takashi Iwai
1daf5f46c6 ALSA: hda - More line-out auto-mute support for Realtek
Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 17:57:46 +02:00
Takashi Iwai
1a1455de10 ALSA: hda - Add support for Line-Out automute to Realtek auto-parser
By popular demands, I add the functionality to mute / unmute the
line-out jacks per the headphone plug / unplug.  For achieving this
and keeping the compatibility with the old behavior, the new mixer
enum "Auto-Mute Mode" is added.  With this, user can control the
auto-mute behavior either disabled, speaker-only or lineout+speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 17:55:53 +02:00
Takashi Iwai
0f0f391c73 ALSA: hda - More reduction of redundant automute codes in Realtek parser
Removed the redundant codes by replacing with the common helper
functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 16:26:24 +02:00
Takashi Iwai
e9427969f5 ALSA: hda - Consolidate auto-mute with master-switch for Realtek
Yet another consolidation of auto-mute functions for the devices
controlling the output muts together with the master mixer switch,
typically found for ALC262 machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 15:46:07 +02:00
Takashi Iwai
e6a5e1b709 ALSA: hda - Add support of line-out automute for Realtek
Add the common helper function and flags to support the auto-mute
per line-out jack detection, and also the mute of line-out jacks.

A few model-specific implementations are replaced with the common
helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:56 +02:00
Takashi Iwai
3b8510ce97 ALSA: hda - Add common automute support for mxier-amp on/off for Reatek
Some models do mute on/off the connected mixer widget for the automatic
muting, instead of controlling the pin widget itself.  This patch adds
the implementation of such type of auto-mute in the common helper
function, and reduces the redundant codes for each model preset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:50 +02:00
Takashi Iwai
d922b51dab ALSA: hda - Consolidate default automute functions for Realtek
There are two entry points for the headphone automute functions for
Realtek, alc_automute_amp() and alc_automute_pin().  These call the
same function in the end, so we can basically consolidate these
with a flag in spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:19 +02:00
Lydia Wang
525566cb60 ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue.
In notify_aa_path_ctls(), adds 'rear mic' item and confirms the A-A
path control existing before notifying card that the A-A path volume
is muted if smart5.1 is enabled.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 11:35:18 +02:00
Raymond Yau
54a96dadaa ALSA - au88x0 - Add buffer bytes constraints
This allow application such as gstreamer and wine which use
snd_pcm_hw_params_set_buffer_time_near() won't fail any more
since sound chips require special containt power 2 period bytes

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 17:00:00 +02:00
Takashi Iwai
ce764ab22e ALSA: hda - Add channel-mode support to Realtek auto-parser
This patch adds the support of "Channel Mode" enum control to Realtek
auto-parser.  When line-in or mic-in jacks are capable to output and
free DACs are available, the driver allows to switch to multi-channel
mode via "Channel Mode" enum switch, as already implemented in some
preset cases.

Not implemented in all Realtek codecs.  Currently, ALC880, 882, 861,
662 and the compatible codecs are supported.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 16:39:00 +02:00
Takashi Iwai
604401a92c ALSA: hda - Minor update for alc662-parser functions
Allow alc662_dac_to_mix() and alc662_look_for_dac() to parse
down the selector widget that is found in ALC880-type codecs,
and rename them to alc_auto_*() accordingly.
This is for the next coming multi-io extensions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 15:46:40 +02:00
Lydia Wang
cb34c207af ALSA: hda - VIA: Fix Smart5.1 isn't useful for 6 audio jacks motherboard.
For some motherboards with 5 or 6 audio jacks which had six or eight multiple
channels output, smart5.1 item is no useful and should be removed.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 11:55:23 +02:00
Takashi Iwai
d507cd668a ALSA: hda - Enable sync_write workaround for AMD generically
The workaround for AMD chipset via sync_write flag seems needed for
machines with Realtek codecs.  So, it's better to activate it
generically in hda_intel.c from the beginning.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 15:33:43 +02:00
Takashi Iwai
0da2692256 ALSA: hda - Move EAPD power-down into shutup callback for AD codecs
EAPD power-down should be called also for normal shutup cases.
Let's move to there.   This also fixes the compile warnings when
CONFIG_PM isn't set automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 15:18:33 +02:00
Takashi Iwai
31d44b57c5 Merge branch 'fix/hda' into topic/hda 2011-04-26 15:05:39 +02:00
Raymond Yau
13eb4ab8ca ALSA: au88x0 - Use a better name for pcm devices of au88x0
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 12:27:21 +02:00
Takashi Iwai
885f42e1f4 ALSA: hda - Enable sync_write for AMD chipset with IDT 92HD8x codecs
The AMD chipset seems unstable in the normal operation mode, and it
seems requring more sensible access for each verb.  Enabling sync_write
mode and allowing bus-reset is a sort of workaround for these chipset
stability issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-21 15:27:58 +02:00
Takashi Iwai
6a9a6f233b Merge branch 'fix/hda' into for-linus 2011-04-21 12:44:38 +02:00
Mike Waychison
1c7276cfc0 ALSA: hda - Fix unused warnings when !SND_HDA_NEEDS_RESUME
When SND_HDA_NEEDS_RESUME is not defined, the compiler identifies that
the following symbols are static but not used:

 restore_shutup_pins
 hda_cleanup_all_streams

Fix warnings by adding SND_HDA_NEEDS_RESUME guards.

Signed-off-by: Mike Waychison <mikew@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 21:24:31 +02:00
Seth Heasley
d2edeb7c6f ALSA: hda - ALSA HD Audio patch for Intel Panther Point DeviceIDs
This patch adds the HD Audio Controller DeviceIDs for the Intel Panther Point PCH.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 21:03:48 +02:00
Takashi Iwai
e66d74ced1 ALSA: asihpi - Use %zd for size_t argument in error message (again)
This was reverted mistakenly in the recent update patch.
Fixed again.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 21:02:27 +02:00
Raymond Yau
b6a4840408 ALSA: emu10k1 - Remove "Front" controls only for STAC9758/59
Remove "Front Playback Volume" and "Front Playback Switch" from emu10k1 only
for STAC9758/59

Since commit 7eae36fbd5
      "Fix the confliction of 'Front' control",
the "Front Playback Volume" control created by commit
	edf8e4565c
	"emu10k1: Front channels via fxbus 8 and 9"
was removed

"Front Playback Volume" and "Surround Playback Volume" have same dB range
since I2S DAC of SB Live! and SB Live! Platinum does not has any hardware
volume control.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 14:23:15 +02:00
Takashi Iwai
6981d18437 ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec
Acer laptops with ALC271x needs a magic initialization for digital-mic
to make it working with mono streams (and PulseAudio).
Added a fix-up applied to Acer with ALC271x generically.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-19 16:45:31 +02:00
Andrew Morton
5b17b077eb ALSA: hda - sound/pci/hda/hda_codec.c: fix warning
sound/pci/hda/hda_codec.c: In function 'snd_hda_get_connections':
sound/pci/hda/hda_codec.c:332: warning: unused variable 'j'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-15 08:41:22 +02:00
Linus Torvalds
4263a2f1da 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 - Don't query connections for widgets have no connections
  ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
  ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
  ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
  ALSA: HDA: Fix dock mic for Lenovo X220-tablet
  ASoC: format_register_str: Don't clip register values
  ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
  ASoC: zylonite: set .codec_dai_name in initializer
2011-04-10 09:56:10 -07:00
Linus Torvalds
42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Takashi Iwai
a12d3e1e1c ALSA: hda - Remember connection lists
The connection lists are static and we can reuse the previous results
instead of querying via verb at each time.  This will reduce the I/O
in the runtime especially for some codec auto-parsers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 15:55:15 +02:00