Commit graph

34519 commits

Author SHA1 Message Date
Takashi Iwai
eb06ed8f4c [ALSA] hda-codec - Support multiple headphone pins
Some machines have multiple headpohne pins (usually on the lpatop
and on the docking station) while the current hda-codec driver
assumes a single headphone pin.  Now it supports multiple hp pins
(at least for detection).
The sigmatel 92xx code supports this new multiple hp pins.
It detects all hp pins for auto-muting, too.
Also, the driver checks speaker pins in addition.  In some cases,
all line-out, speaker and hp-pins coexist.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:38 +02:00
Nicolas Graziano
33ef765131 [ALSA] hda_intel prefer 24bit instead of 20bit
If I understand the hda_intel code, for format > 20bit it only advertise
the SNDRV_PCM_FMTBIT_S32_LE format and play it at 32 bit, 20 bit or 24 bit.
But if the 20bit and 24bit are available, actually it prefer the 20bit
format. This path is to prefer the 24bit format instead of 20bit.

Signed-off-by: Nicolas Graziano <nicolas.graziano@wanadoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:33 +02:00
Takashi Iwai
a922625126 [ALSA] hda-codec - Add vendor ids for Motorola and Conexant
Added string entries for Motorola and Conexant vendor ids.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:28 +02:00
Takashi Iwai
5720fddd62 [ALSA] hda-codec - Add device id for Motorola si3054-compatible codec
Added the device id for Motorola si3054-compatible modem codec
on a Gateway laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:24 +02:00
Takashi Iwai
2b1181ed83 [ALSA] Add missing compat ioctls for ALSA control API
Added the missing 32bit-compat ioctl entries for ALSA control API
(espcially for recent additions of TLV stuff).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:19 +02:00
Takashi Iwai
783eaf4671 [ALSA] powermac - Fix Oops when conflicting with aoa driver
Fixed Oops when conflictin with aoa driver due to lack of
i2c initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:15 +02:00
Johannes Berg
307192065c [ALSA] aoa: add locking to tas codec
Looks like I completely forgot to do this. This patch adds locking to
the tas codec so two userspace programs can't hit the controls at the
same time. Tested on my powerbook, but I obviously can't find any
problems even without it since it doesn't do SMP.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:06 +02:00
Takashi Iwai
43001c9515 [ALSA] hda-intel - Fix suspend/resume with MSI
Fixed suspend/resume with MSI enablement.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:00 +02:00
Takashi Iwai
854b66e442 [ALSA] ak4xxx - Remove bogus IPGA controls
Remove IPGA volume controls and merge the IPGA range to ADC volume
controls.  These two volumes are not really independent but connected
simply in different ranges 0-0x7f and 0x80-max.  It doesn't make sense
to provide two controls.
Since both 0x7f and 0x80 specify 0dB, a hack is needed for IPGA range
to skip 0x80 (increment one) for such controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:55 +02:00
Liam Girdwood
8f88820ee4 [ALSA] Fix WM9705 AC97 patch build error
This patch fixes a build error (introduced by me) in ac97_patch.c wrt
WM9705 touchscreen.
 o Removed spurious '3D' from character after |= operation (0x3D is
ASCII for '=')

Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:51 +02:00
Takashi Iwai
e08a007d10 [ALSA] hda-codec - Fix SPDIF device number of ALC codecs
Assign the SPDIF always to the secondary device (dev#1) to keep
the same configuration.  Move the optional capture device to the
third device (dev#2).
hda_intel now just ignores the NULL entries in the pcm arrays
from codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:46 +02:00
Takashi Iwai
dafbbb1fdb [ALSA] hda-intel - Fix pci_disable_msi() call
Fix the order to call pci_disable_msi() to be after free_irq().
(Otherwise pci_disable_msi() bugs you.)
Also, added a description of disable_msi option to documentation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:42 +02:00
Takashi Iwai
cd417d4fe8 [ALSA] hda-codec - Add support for LG LW25 laptop
Added the support for LG LW25 laptop with ALC880 codec.
It's the same codec model as LG LW20 (model=lg-lw).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:37 +02:00
Takashi Iwai
9d19f48cfe [ALSA] Add pcm_class attribute to PCM sysfs entry
This patch adds a new attribute, pcm_class, to each PCM sysfs entry.
It's useful to detect what kind of PCM stream is, for example, HAL
can check whether it's a modem or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:32 +02:00
Takashi Iwai
a7da6ce564 [ALSA] hda-codec - Add independent headphone volume control
This patch addes the support of the independent 'Headphone' volume
control to the generic codec parser.  Some codecs (e.g. Conexant)
have separate connections to the headphone and the independent amp
adjustment is needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:27 +02:00
Richard Fish
160ea0dc6b [ALSA] [snd-intel-hda] enable center/LFE speaker on some laptops
This patch adds LFE mixer controls for laptops with a stac9200 and a mono
speaker pin with amplifier.

Signed-off-by: Richard Fish <bigfish@asmallpond.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:22 +02:00
Takashi Iwai
0b59397268 [ALSA] Add dB information to es1938 driver
Added the dB information to ESS Solo (es1938) driver.
The new compound dB range TLVs are used for non-linear native
volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:18 +02:00
Takashi Iwai
55a29af5ed [ALSA] Add definition of TLV dB range compound
Added the definition of TLV dB range compound.  It contains one or
more dB-range or linear-volume TLV entries with min/max ranges.
Used for volume controls with non-linear curves.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:11 +02:00
Takashi Iwai
311e70a474 [ALSA] hdsp - Fix auto-updating of firmware
Fixed the auto-updating of firmware if the breakout box was switched
off/on.  The firmware binary itself was already cached but it wasn't
loaded properly.  Also, request_firmware() is issued if the box was
with firmware at module loading time but later it's erased.
The auto-update is triggered at each PCM action (open, prepare, etc)
and at opening proc files.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:07 +02:00
Krzysztof Helt
ea543f1ee6 [ALSA] sparc dbri: SMP fixes
The dbri driver hangs when used in kernel compiled with SMP
support due to inproper locking. The patch fixes it.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:57 +02:00
Ville Syrjala
679e28eef8 [ALSA] es1968: Fix hw volume
Fix maestro2 hardware volume control. Tested on a Dell Inspiron 7000.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:53 +02:00
Ville Syrjala
bd25b7cae1 [ALSA] ac97: Fix AD1819 volume range
AD1819 volume registers can hold extra bits which do not affect the
actual volume. Add a res_table to the codec patch to fix the problem.
PCM, line and mic volume were tested.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:48 +02:00
Tobin Davis
93ed150375 [ALSA] hda-codec - Add 5 stack audio support for Intel 965 systems
This patch renames the 965_2112 function ids to 965_3ST, and
adds functional support for 965_5ST (5 stack 7.1 surround).

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:43 +02:00
Takashi Iwai
35a49934a7 [ALSA] Add dB scale information to mixart driver
Added the dB scale information to mixart driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:37 +02:00
Andreas Schwab
2fd53a7e9b [ALSA] [PPC,SOUND] Fix audio gpio state detection
When booting with line out or headphone plugged, you won't hear anything.
The problem is that after reset all channels are muted, but the actual
value of the gpio port doesn't exactly match the active_val settings as
expected by check_audio_gpio.  For example, the line_mute port is set to
7, but check_audio_gpio would expect 0xd or 0xf, thus its return value
indicates that it is not active, even though it is.  AFAICS only looking
at the low bit is enough to determine whether the port is active.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:33 +02:00
Pavel Machek
927fc86602 [ALSA] sound/pci/hda/intel_hda: small cleanups
Cleanup whitespace.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:28 +02:00
Takashi Iwai
929861c669 [ALSA] hda-intel - Remove volatile
Removed volatile from the position buffer pointer.
Also, use synchronize_irq() instead of unreliable msleep(1)
in the driver remove callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:22 +02:00
Takashi Iwai
f640c3205a [ALSA] Add dB scale information to ice1724 driver
Added the dB scale information to each board support code of ice1724 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:18 +02:00
Takashi Iwai
680ef792a1 [ALSA] Add dB scale information to ice1712 driver
Added the dB scale information for native digital volumes of ice1712 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:13 +02:00
Takashi Iwai
723b2b0d36 [ALSA] Clean up and add TLV support to AK4xxx i2c driver
- Clean up the code in AK4xxx-ADDA i2c code.
- Fix capture gain controls for AK5365
- Changed the static table for DAC/ADC mixer labels to use
  structs
- Implemented TLV entries for each AK codec
  The volumes in AK4524, AK4528 and AK5365 are corrected with
  a table to be suitable for dB conversion.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:08 +02:00
Takashi Iwai
d0ae484715 [ALSA] Add missing dB scale information to vxpocket driver
Added the missing dB scale information for Mic volume
to vxpocket driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:03 +02:00
Luke Ross
a79eee8d3d [ALSA] Support for non-standard rates in USB audio driver
There's at least one USB audio chipset out there which supports only one
non-standard rate (ID 0e6a:0310 supports 46875Hz). There's a few other
patches for this card which are unsatisfactory because they attempt to
map this rate to 44.1k leading to sound distortion.
The patch below uses SNDRV_PCM_RATE_KNOT to properly support the
non-standard rates where they are available.

Signed-off-by: Luke Ross <luke@lukeross.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:58 +02:00
Andrey Liakhovets
9f458e7fb5 [ALSA] ac97 - Fix VIA EPIA sound problem
Fix the bad sound quality on VIA EPIA system using VIA VT1617A
(ALSA bug#2381).

Signed-off-by: Andrey Liakhovets <liakh@dol.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:53 +02:00
Takashi Iwai
33925186d8 [ALSA] ymfpci - Add TLV entries for native volume controls
Added the linear volume TLV entries for YMFPCI native volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:49 +02:00
Takashi Iwai
063a40d911 [ALSA] Add the definition of linear volume TLV
Added the definition of linear volume TLV type.
Some DSP chips and codecs (e.g. AK codec) use linear volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:44 +02:00
Krzysztof Helt
1f14d167f0 [ALSA] sparc dbri: OSS layer fix
This patch removes setting of incorrect stop_threshold value
inside the driver. After the change, playback through the OSS
layer works correctly.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:40 +02:00
Krzysztof Helt
99dabfe716 [ALSA] dbri sparc: fixes TS leak
This patch fixes time slot leak in the dbri driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:35 +02:00
Krzysztof Helt
aaad3653a5 [ALSA] sparc dbri: recording is back
This patch fixes sound recording after the driver convertion to
ring buffered version. It also contains small clean ups to the
driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:31 +02:00
Takashi Iwai
2c7782b420 [ALSA] hda-codec - Use model=ref for some Dell laptops
Force to choose model=ref for some Dell laptops with STAC9200 codec
chip for fixing the silent mic recording problem (possibly due to
a BIOS bug).  Reference: ALSA bug#2038
So far, applied to Inspiron 630m, Latitude D620 and 120L.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:26 +02:00
Takashi Iwai
18c1c3f694 [ALSA] Return error if no user TLV is defined
Retrun error to user TLV_READ ioctl if no TLV is defined.
(Until now, nothing was written and rerunred successfully.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:21 +02:00
Takashi Iwai
86148e84c2 [ALSA] Fix errors with user TLV_WRITE
Fixed the errors at checking info.access field during user TLV_WRITE
call.  It should have been zero-initialized.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:17 +02:00
Takashi Iwai
1186ed8c7d [ALSA] Add dB scale information to vxpocket and vx222 drivers
Added the dB scale information to vxpocket and vx222 drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:12 +02:00
Takashi Iwai
c6ff77f71f [ALSA] Add dB scale information to pcxhr driver
Added the dB scale information to pcxhr driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:05 +02:00
Jochen Voss
3479307f8c [ALSA] Fix volume control for the AK4358 DAC
Fix volume control for the AK4358 DAC.
The attenuation control registers of the AK4358 use only 7bit for the
volume, the msb is used to enable attenuation output.  Without this
patch there are 256 volume levels the lower 128 of which are mute.

Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:00 +02:00
Takashi Iwai
071c73ad5f [ALSA] hda-codec - Fix mic capture with generic parser
Fixed the mic capture with generic parser of hda-codec driver
- Use VREF80 for mic pins if available
- Handle multiple inputs correctly on audio-input widget node.
Confirmed on a conexant codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:56 +02:00
Richard Fish
11b44bbde5 [ALSA] hda-codec - restore HDA sigmatel pin configs on resume
This patch restores the Intel HDA Sigmatel codec pin configuration on
resume.  Most of it is dedicated to saving the BIOS pin configuration
if necessary, so that even unrecognized chips can be resumed correctly.

Signed-off-by: Richard Fish <bigfish@asmallpond.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:51 +02:00
Guillaume Munch
6d8590650e [ALSA] hda-codec - Support for SigmaTel 9872
- AR11M and AR11S uses the same chip hence we claim to support the AR Series.
- Added commentary about STAC9225s which shares the same id as CXD9872RD.
- Added entry for 7662 but won't work automatically until pci_subdevice
  is known.
- 'vaio' model now corresponds to CXD9872RD_VAIO for backward compat.
- Replaced STAC766x_VAIO with CXD9872RD_VAIO, STAC9872AK_VAIO, STAC9872K_VAIO
  and CXD9872AKD_VAIO
- Added 'vaio-ar' model for potential future modifications.

Signed-off-by: Guillaume Munch <diabo@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:47 +02:00
Magnus Sandin
7b89190cf6 [ALSA] ac97 - Enable S/PDIF on ASUS P5P800-VM mobo
The attached patch will force building the S/PDIF controls on the PCU
SSID for Asus P5P800-VM motherboard, even if the  AC97_EI_SPDIF bit is
not set.

Signed-off-by: Magnus Sandin <magnus@sandin.cx>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:42 +02:00
Vladimir Avdonin
bab282b912 [ALSA] hda-codec - Fix for Acer laptops with ALC883 codec
Patch enables the internal speaker on acer laptops with ALC883.

Signed-off-by: Vladimir Avdonin <vldmrrr@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:38 +02:00
Takashi Iwai
a1c7a7d890 [ALSA] Add dB scale information to opl3sa2 driver
Added the dB scale information to opl3sa2 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:33 +02:00