Commit graph

77 commits

Author SHA1 Message Date
Harvey Harrison
b03671a826 ALSA: ac97_patch make functions static
Only used in ac97_codec by including ac97_patch.c directly, effectively static

Found by sparse:
sound/pci/ac97/ac97_patch.c:3551:5: warning: symbol 'patch_vt1617a' was not declared. Should it be static?
sound/pci/ac97/ac97_patch.c:3767:5: warning: symbol 'patch_vt1618' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-04 10:26:37 +02:00
John L. Utz III
9e285e1a58 ALSA: ac97 - vt1618 7.1 Audio Support
1. Implement 7.1 Output for vt1618 codec.
2. Fix typos in comments from my previous 1617a patch.

Signed-off-by: John L. Utz III <john.utz@dmx.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-29 10:06:18 +02:00
Takashi Iwai
8f4f4ef6fe ALSA: ac97 - Enable mono-out on ALC203 codec as default
Use pin 37 for mono-out as default on ALC203.

Reported-by: george pee <georgepee@gmail.com>
Tested-by: george pee <georgepee@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-06 15:40:28 +02:00
Adrian Bunk
13c2108de4 ALSA: make snd_ac97_add_vmaster() static
This patch makes the needlessly global snd_ac97_add_vmaster() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-27 10:22:26 +02:00
Mike Rapoport
25552e87aa ALSA: ac97 - fix patch_ucb1400 for proper resume
Replace 'snd_ac97_write' with snd_ac97_write_cache' in pacth_ucb1400 to allow
proper codec wakeup.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:32:07 +02:00
Juergen Beisert
0264b3b636 [ALSA] ac97: add support for wm9711 master left inv switch
This patch adds support for Master Left Inv Switch on wm9711.
At least required to drive the mono speaker on the PXA270 platfrom

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:25:34 +02:00
Daniel Jacobowitz
87af38dafe [ALSA] ac97 - Add virtual master control to VT1616/VT1617A codec.
Enable VMASTER for VT1616 / VT1617A codec.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:14 +02:00
Takashi Iwai
e48d6d97bb [ALSA] ac97 - Fix ASUS A9T laptop output
ASUS A9T laptop uses line-out pin as the real front-output while
other devices use it as the surround.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 16:20:42 +02:00
Takashi Iwai
2e75d050e4 [ALSA] ac97 - Add a workaround for broken quirk for VT1617A codec
On boards with VT1617A codec, the sound disappears suddenly.
This looks like a problem with HPE-bit control that is supposed to be
set in patch_vt1617a().  However, on such problematic hardwares, the
bit is actually reset mysteriously.

The patch adds a workaround for the wrong quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-05 14:12:08 +02:00
Takashi Iwai
4235a31784 [ALSA] intel8x0 - Add support of 8 channel sound
Added the support of 8 channel sound for codecs that are known to work.
So far, only ALC850 is marked as a 8ch-support codec.

This fix is a modified version of the patch on ALSA BTS#2097 by
Martin Ellis:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2097

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:11 +02:00
Takashi Iwai
4e98d6a7ce [ALSA] pci - check value range in ctl callbacks
Check the value ranges in ctl put callbacks properly in the rest of
PCI drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:24 +01:00
Jaroslav Kysela
c1017a4cdb [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16 16:51:18 +02:00
Keita Maehara
43115f58e2 [ALSA] ac97: YMF743 missing controls support (2/2)
These patches enable a few YMF743 controls (Tone/3D/IEC958) that won't
be detected with the current version of ALSA.
The second one contains following changes:
- A chip-specific SPDIF support for YMF743 (It doesn't have AC97
 standard SPDIF registers seen on YMF753).
- The implementation for 'IEC958 Playback Source' and 'IEC958 Mute'
 are identical to the ones for YMF753. But there is no 'IEC958 Output
 Pin' for YMF743.

Signed-off-by: Keita Maehara <maehara@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:57 +02:00
Keita Maehara
13043984e7 [ALSA] ac97: YMF743 missing controls support (1/2)
These patches enable some YMF743 controls (Tone/3D/IEC958) that won't
be detected with the current version of ALSA.
The first one contains only cosmetic changes to share a few
YMF753-specific symbols with YMF743.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:45 +02:00
Daniel T Chen
8286c53e54 [ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty
Included is a patch against current alsa-kernel hg tip adding
quirks that Ubuntu Dapper/Edgy/Feisty contains.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-16 12:23:03 +02:00
John Utz
e9024ccc2d [ALSA] ac97 - Smart 5.1 for VIA 1617a codec
This patch provides a single 8 way enum called 'Smart 5.1 Select' with
some reasonable names for each enum that allows the user to choose
which of the 8 possible settings for vt1617a's version of what via
calls 'Smart 5.1'.

Signed-off-by: John Utz <john.utz@dmx.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:48 +02:00
Takashi Iwai
592a82e8b6 [ALSA] ac97 - Fix MSI L720 laptop
Fix internal speaker output of MSI L720 laptop with ALC655 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:47 +02:00
Takashi Iwai
ac519028a4 [ALSA] ac97 - Make patch functions static
Include ac97_patch.c from the main ac97_codec.c in order to make
bunch of patch_*() functions static.  This helps optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:42 +02:00
Randy Cushman
c26a8de23a [ALSA] ac97 - fix AD shared shared jack control logic
This patch fixes the control logic for shared
Microphone in/Center+LFE out and Line in/Surround out jacks
for Analog Devices AD1888, AD1980 and AD1985 AC '97 CODECs.

Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-14 08:24:16 +01:00
Takashi Iwai
a31e8c7236 [ALSA] ac97 - Add Thinkpad X31 and R40 to AD1981x blacklist
Added Thinkpad X31 and R40 to AD1981x line/HP-jack-sense blacklist
for avoiding the harmful mixer controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-06 10:40:30 +01:00
Takashi Iwai
9e292c0013 [ALSA] ac97 - Fix silent output problem with Cx20551 codec
Fixed the silent output problem on laptops with Conexant Cx20551 codec
chip, such as Packard-bell EasyNote A* series.
The information was taken from ALSA bug#1134.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-14 08:38:21 +01:00
Takashi Iwai
0cb29ea0d4 [ALSA] Add even more 'const' to everything related to TLV
Mark TLV data as 'const'
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:19 +01:00
Daniel Jacobowitz
9f428175a5 [ALSA] ac97 - Fix vt1617a build ops
This patch connects the extra vt1616 controls for the vt1617a, which
is necessary to control the rear speakers on e.g. a Shuttle SN25P.

Signed-off-by: Daniel Jacobowitz <drow@false.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:02 +01:00
Randy Cushman
67e9f4b68c [ALSA] ac97 - fix various issues with AD1986/AD1986A support
Previously, ac97_codec.c was coded to support AD1986 and AD1986A
CODECs using code written for the AD1985 CODEC.  This allowed the
LINE_OUT and HEADPHONE jacks to function properly, however register
differences between the CODECs prevented line and microphone inputs
from functioning.
Specifically, this patch fixes issues with the following mixer
controls:  'V_REFOUT', 'Spread Front to Surround and Center/LFE',
'Exchange Front/Surround', 'Surround Jack Mode', and 'Channel Mode'.
This patch removes the undocumented AD1888 control
'High Pass Filter Enable' and adds the new control
'Exchange Mic/Line In'.

Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:46 +01:00
Randy Cushman
6428ea1b73 [ALSA] ac97 - fix malfunctioning mixer controls for AD1985
This patch replaces the 'V_REFOUT Enable' mixer switch control
with a listbox control for the AD1985 CODEC.
Previous patch 'AD1888 mixer controls for DC mode' added
controls that were propogated to multiple codecs.  For the
AD1985 codec, the bits VREFH and VREFD function differently,
preventing the 'V_REFOUT Enable' control from setting V_REFOUT
to Hi-Z.
This patch also corrects an issue in which register bits relating
to mixer controls 'Surround Jack Mode' and 'Channel Mode'.
The register bits controlled by these controls were being set
at boot time to states inconsistent with the stored values of
these controls.

Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:45 +01:00
Randy Cushman
831466f4ad [ALSA] ac97 - fix microphone and line_in selection logic
This patch fixes the Microphone and LINE_IN select logic for
Analog Devices surround codecs with shared jacks.  The existing
code can never utilize the shared jacks for Microphone and LINE_IN
due to the reversed jack selection logic.  The patched code
correctly selects the shared jack for input if the 'Channel Mode'
selector does not specify that the jack is to be used for output.
Specifically, in '2ch' mode the Center/LFE jack is used for
microphone input and the Surround jack is used for LINE_IN,
in '4ch' mode the Center/LFE jack is used for microphone input
and the Surround jack is used for output, and in '6ch' mode
both jacks are used for output.

Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:43 +01:00
James C Georgas
e4c3bf0f65 [ALSA] Remove AC97 POP control for STAC9708/11
The STAC9708/11 AC97 codecs implement the PCM Out Path & Mute bit in
the General Purpose register (0x20:F), even though they don't implement
the actual function in the mixer.
Since the alsa tests for the function by toggling the bit and reading
it back to see if it changed, it mistakenly creates a useless control.
This patch explicitly removes the control when the codec is an
STAC9708/11.
I put the check in patch_sigmatel_stac9708_specific(), because I have
an SBLive with this chip on it. I don't know if the STAC9758 or other
codecs also behave this way. If they do, then this check could maybe go
in patch_sigmatel_stac97xx_specific(), or some other more general
function.

Signed-off-by: James C Georgas <jgeorgas@rogers.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:38 +01:00
Jerome Demange
cbcc2c4c07 [ALSA] ac97 - enables sound output through speakers on MSI S250 laptop
Signed-off-by: Jerome Demange <jdemange@cict.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:58 +01:00
Takashi Iwai
c19bcdc64a [ALSA] ac97 - Fix potential negative array index
Fix the case cidx2 >= 0 and cidx2 < 0 which may result in negative
array index.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:50 +01:00
Jaroslav Kysela
e7d24f0bbd [ALSA] ac97_codec (ALC655): add EAPD hack for MSI L725 laptop
New PCI ID described and tested Spectr <spectr@gmail.com> .

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:34 +01:00
Luke Zhang
2aedbda6f9 [ALSA] WM9712 fixes for ac97_patch.c
This patch by Luke Zhang fixes a couple of issues with the WM9712
support in ac97_patch.c
Changes:-
 o Fix Out3 ZC switch invert.
 o Extend capture volume control to 6 bits.
 o Change Mic 1 volume mask to 5 bits (31).
 o Add Mic 2 volume.

Signed-off-by: Luke Zhang <lzhang@intrinsyc.com>
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-10-06 20:22: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
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
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
2f3482fbbd [ALSA] Add TLV support to AC97 codec driver
Added the TLV support to AC97 codec driver for addition of
dB range information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:42:51 +02:00
Magnus Sandin
d244bf897b [ALSA] Fix for LG K1 Express Laptop
Attached is the patch for the LG K1 Express (K1-2333V) laptop that
enables sound output.

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:41:10 +02:00
Mike Rapoport
82466ad76d [ALSA] add codec-specific controls for UCB1400
This patch adds some codec-specific controls for Philips UCB1400 codec.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:12 +02:00
Jaya Kumar
02856b5684 [ALSA] AD1888 mixer controls for DC mode
This patch adds two mixer controls. The V_REFOUT enable is a
documented register that couples the microphone input lines
to the V_REFOUT DC source. The High Pass Filter enable in the
AC97_AD_TEST2 (0x5c) is an undocumented register provided by
Miller Puckette via Analog Devices that enables the AD codec
to apply a high pass filter to the input.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-28 19:30:45 +02:00
Jaya Kumar
1561f09a2f [ALSA] AD1888 suspend/resume fix
This patch adds a write to an undocumented register, 0x60 Extended
Codec Register Page in the AD1888 codec. It is neccessary in order
to make suspend/resume work with the AD1888.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:30 +02:00
Rodolfo Giometti
1459c7849e [ALSA] Disable AC97 AUX and VIDEO controls for WM9705 touchscreen
This patch by Rodolfo Giometti disables the AC97 AUX and VIDEO controls
on the WM9705 when the touchscreen is selected as the AUX and VIDEO
lines are shared with the touch controller.
Changes:-
 o Added AC97_HAS_NO_AUX flag
 o Test for AC97_HAS_NO_AUX flag in snd_ac97_mixer_build()
 o Sets AC97_HAS_NO_VIDEO and AC97_HAS_NO_AUX in patch_wolfson05() when
WM9705 touch driver is selected.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:29 +02:00
Takashi Iwai
a43c4d4d73 [ALSA] ac97 - Add Thinkpad T41p to AD1981 jack-sense blacklist
Added Thinkpad T41p to the blacklist to disable HP/line jack-sensing
with AD1981B.  The jack-sensing is just harmful on this laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:09 +02:00
Takashi Iwai
eed656493a [ALSA] Add a workaround for ASUS A6KM
Added a workaround for ASUS A6KM board that requires EAPD
rather than SPDIF-in.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:22 +02:00
James Courtier-Dutton
d7f6f1157f [ALSA] AC97: Correct Mic Boost label.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22 21:32:40 +02:00
James Courtier-Dutton
21fdddea8e [ALSA] emu10k1: Add support for Audigy4 (not Pro)
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22 21:32:37 +02:00
Takashi Iwai
dbc967760b [ALSA] ac97 - Remove duplicated entry in lm4550_restbl
Modules: AC97 Codec

Removed the duplicated entry in lm4550_restbl.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:29:07 +01:00
Charl Coetzee
ba22429d3e [ALSA] ac97 - Added a codec patch for LM4550
Modules: AC97 Codec

Added a codec patch for LM4550.  It sets up a static volume resolution
table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:28:39 +01:00
Ingo Molnar
62932df8fb [ALSA] semaphore -> mutex (PCI part)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:25:29 +01:00
Takashi Iwai
da79e44df4 [ALSA] ac97 - Fix CLFE channel setting of ALC850
Modules: AC97 Codec

Fix CLFE channel setting of ALC850 (ALSA bug#1731).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-22 16:24:13 +01:00
Takashi Iwai
128a46a55d [ALSA] ac97 - Suppress jack sense controls for Thinkpads
Modules: AC97 Codec

Added a blacklist to suppress to create jack sense controls.
These controls must be always off on some devices (e.g. Thinkpad).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-22 16:24:05 +01:00