Commit Graph

172 Commits

Author SHA1 Message Date
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 7a5a27cfae [ALSA] Add default values for power-saving as Kconfig options
Added CONFIG_SND_AC97_POWER_SAVE_DEFAULT and CONFIG_SND_HDA_POWER_SAVE_DEFAULT
Kconfig options as the default values for power-saving mode of AC97 and
HD-audio drivers, respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:51 +02:00
Takashi Iwai d6c3cf81f0 [ALSA] ac97 - Suppress the reset of audio-codec from modem-codec at resume
On codec chips with both audio and modem functions (e.g. Conexant one),
performing AC97_RESET resets the whole registers.  When both audio and
modem drivers are resumed at the same time, the modem one often is
resumed after the audio, and it results in the reset of audio registers
(ALSA bug#3333).
This patch fixes such a problem.  Since the modem codec basically
doesn't need AC97_RESET, skip this initialization unless specified
as audio.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:34 +02:00
Takashi Iwai 45cffef1ff [ALSA] Use msecs_to_jiffies() in ac97_codec.c
Replace the direct calculation of jiffies with msecs_to_jiffies().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:40 +02:00
Takashi Iwai 6ddc9d2e82 [ALSA] Add missing static in ac97_codec.c
Added missing static to snd_ac97_restore_status() and
snd_ac97_restore_iec958() functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:14 +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
Michael Opdenacker 59c51591a0 Fix occurrences of "the the "
Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 08:57:56 +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 3b6baa5a0b [ALSA] Remove delayed work properly at free and suspend
Remove delayed work properly at free and suspend in ac97 codec and
ak4114 drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:28 +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
Takashi Iwai f1a63a38d2 [ALSA] ac97 - Suppress power-saving mode on non-supporting drivers
Don't enable power-saving mode on drivers that don't support
it.  The supporting drivers set AC97_SCAP_POWER_SAVE to scaps
at creation of ac97 instance.
Currently enable on the following drivers: intel8x0, intel8x0m,
atiixp, atiixp-modem, via82xx and via82xx-modem.
Also, a bit clean up of power-saving stuff:
- Don't create an own workq
- Remove superfluous ifdefs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:09 +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
James Courtier-Dutton f8cb2c450e [ALSA] ac97: Identify CMI9761 chips.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:56:11 +01:00
James C Georgas e8bb036a46 [ALSA] ac97_codec - trivial fix for bit update functions
This patch fixes a couple of bit update functions in
alsa-kernel/pci/ac97/ac97_codec.c, which could possibly corrupt bits not
in the given mask.
Specifically, it'll clobber unset bits in the target that are not in the
mask, when the corresponding bit in the given new value is set.

Signed-off-by: James C Georgas <jgeorgas@rogers.com>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:56:10 +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
Nicolas Pitre e1036502e5 [PATCH] remove config ordering/dependency between ucb1400-ts and sound subsystem
Commit 2d4ba4a3b9 introduced a dependency
that was never meant to exist when the ac97_bus.c module was created.
Move ac97_bus.c up the directory hierarchy to make sure it is built when
selected even if sound is configured out so things work as originally
intended.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-12 10:43:21 -08:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
Takashi Iwai da43deb116 [ALSA] Fix AC97 power-saving mode
Fix the bug in AC97 power-saving mode that the power isn't turned on
when power_save is set to 1 via sysfs during the power off state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-22 10:51:14 +02: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
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
Takashi Iwai 9107226d2c [ALSA] Add dB scale information to ak4531 codec
Added the dB scale information to ak4531 codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:01 +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
Takashi Iwai 6dbe662874 [ALSA] Add experimental support of aggressive AC97 power-saving mode
Added CONFIG_SND_AC97_POWER_SAVE kernel config to enable the support
of aggressive AC97 power-saving mode.  In this mode, the AC97
powerdown register bits are dynamically controlled at each open/close
of PCM streams.
The mode is activated via power_save option for snd-ac97-codec
driver.  As default it's off.  It can be turned on/off on the fly
via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:08 +02:00
Takashi Iwai c461482c80 [ALSA] Unregister device files at disconnection
Orignally proposed by Sam Revitch <sam.revitch@gmail.com>.
Unregister device files at disconnection to avoid the futher accesses.
Also, the dev_unregister callback is removed and replaced with the
combination of disconnect + free.
A new function snd_card_free_when_closed() is introduced, which is
used in USB disconnect callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:58 +02:00
Takashi Iwai 746d4a02e6 [ALSA] Fix disconnection of proc interface
- Add the linked list to each proc entry to enable a single-shot
  disconnection (unregister)
- Deprecate snd_info_unregister(), use snd_info_free_entry()
- Removed NULL checks of snd_info_free_entry()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:48 +02:00
Takashi Iwai 7931e2a92b [PATCH] ALSA: ac97: correct some Mic mixer elements
Revert the mixer element names of some Mic controls to the state of
2.6.17.  This should fix the name mismatch in alsactl.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-01 11:39:10 -07: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
Jaya Kumar 70c5acbdcc [ALSA] ac97_codec - fix duplicate control creation in AC97
This patch conditions AC97 control creation by whether or not the
codec is an AD18xx codec. This fixes the case where the default control
would get created and then snd_ac97_mixer_build fails out when creation
of ad18xx specific control would get attempted. This problem was found
and debuged by Marcelo Tosatti.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-22 21:34:20 +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
Takashi Iwai bf850204a7 [ALSA] Remove unneeded read/write_size fields in proc text ops
Remove unneeded read/write_size fields in proc text ops.
snd_info_set_text_ops() is fixed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:09 +02:00
Takashi Iwai 7b09679c43 [ALSA] ac97 - Move EXPORT_SYMBOL() to adjacent to each function
Move EXPORT_SYMBOL() to adjacent to each exported function/variable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:32:54 +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 73864fc634 [ALSA] ac97 - Add entry for VIA VT1618 codec
Modules: AC97 Codec

Added the missing entry for VIA VT1618 codec.
No particular patch is needed, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-12 11:34:20 +02:00
Takashi Iwai 0a589d8019 [ALSA] ac97 - Clean up obsolete workarounds
Modules: AC97 Codec

Clean up obsolete workarounds provided only for nm256.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:38:53 +01:00
Takashi Iwai 7c5706bb33 [ALSA] ac97 - Allow drivers to set static volume resolution table
Modules: AC97 Codec

Add the pointer to a static volume resolution table to ac97 template,
so that the drivers can define the volume resolution, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:38:46 +01: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
Takashi Iwai 50dabc2d11 [ALSA] ac97 - Add support of static resolution tables
Modules: AC97 Codec

Added the support of static resolution table support for codecs
that the driver cannot probe the volume resolution properly.

The table pointer should be set in each codec patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:28:34 +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
Matthew Garrett a0faefedf7 [ALSA] Add a new quirk for mute-LED and HP-only.
Modules: AC97 Codec,ATIIXP driver,Intel8x0 driver

This patch adds a new quirk for ac97 hardware that combines the existing
AC97_TUNE_MUTE_LED and AC97_TUNE_HP_ONLY quirks.  This is needed for several
current HP laptops.  Additionally, it adds the HP nx6125 to the
AC97_TUNE_MUTE_LED list.

Fixed for the latest version of ALSA by Takashi Iwai <tiwai@suse.de>.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:29 +01:00
Takashi Iwai 031c95d433 [ALSA] ac97 - Small fix for ALC65x codec
Modules: AC97 Codec

Small fix for ALC65x codec, sync with Realtek's driver codes:
- Rename 'IEC958 Playback Route' to 'IEC958 Playback Source' so that
  mixer can handle it properly

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:22 +01:00
Takashi Iwai adf1b3d25e [ALSA] Optimize for config without PROC_FS (pci drivers)
Optimize the code when compiled without CONFIG_PROC_FS for some pci drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:08 +01:00
Matthew Garrett 16f47bb660 [ALSA] ac97 - Add extra IDs for headphone autosense
Modules: AC97 Codec

The following patch adds some extra IDs for the list of hardware which
should have headphone line sense enabled by default.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:29:50 +01:00
Takashi Iwai 11d3824ad7 [ALSA] ak4531 - Add PM support
Modules: AK4531 codec

Add PM support to AK4531 codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:55 +01:00
Takashi Iwai e26e7545e9 [ALSA] ac97 - NULL check in snd_ac97_suspend/resume
Modules: AC97 Codec

Add NULL check in snd_ac97_suspend() and snd_ac97_resume() so that
the caller doesn't have to do it by itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:20:28 +01:00
Takashi Iwai 9398441eda [ALSA] ac97-codec - Better ac97_bus name
Modules: AC97 Codec

Generate a better name string for ac97_bus sysfs interface including
the name of ac97 codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:20:15 +01:00
Takashi Iwai 9f38945fab [ALSA] Remove xxx_t typedefs: AK4531 codec
Modules: AK4531 codec

Remove xxx_t typedefs from the AK4531 codec support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:41 +01:00
Takashi Iwai ee42381e71 [ALSA] Remove xxx_t typedefs: AC97
Modules: AC97 Codec

Remove xxx_t typedefs from the AC97 codec support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:12 +01:00
Takashi Iwai b9b4bdd9f1 [ALSA] ac97 - Remove ac9_enum definition from public header
Modules: AC97 Codec

Remove the definition of ac97_enum struct from the public ac97_codec.h.
It's used only in the module.

The location of struct ac97_pcm is moved closer to its accessor
to improve readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:17:03 +01:00
Jaroslav Kysela b4a621f547 [ALSA] ac97 - procfs - print PCI subsystem vendor/device values
Modules: AC97 Codec

For debugging and problem finding purposes, show also the PCI subsystem
vendor/device values in the ac97#X proc file.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-01-03 12:16:10 +01:00
Takashi Iwai 091e95ee7f [ALSA] ac97 - Fix confliction of DRA and surround slots
Modules: AC97 Codec

Fixed the confliction of DRA and surround slots 7/8.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:20:34 +01:00
Nishanth Aravamudan 8433a509c0 [ALSA] Fix schedule_timeout usage
Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.  Also use
human-time conversion functions instead of hard-coded division to avoid
rounding issues.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:19:49 +01:00
Takashi Iwai 7c22f1aaa2 [ALSA] Remove snd_runtime_check() macro
Remove snd_runtime_check() macro.
This macro worsens the readability of codes.  They should be either
normal if() or removable asserts.

Also, the assert displays stack-dump, instead of only the last caller
pointer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:17:42 +01:00
Sasha Khapyorsky 2ba71978c0 [ALSA] Removing obsolete AC97_SHARED_TYPES
This patch cleans last ac97 audio/modem codec interception in
initialization procedures (ac97_mixer_new()) and removes obsolete
SHARED_TYPE 'locking' which prevents from AMC codecs to function
correctly.

Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:16:59 +01:00
Takashi Iwai eb9b4142b3 [ALSA] Fix a typo
Modules: AC97 Codec

Fix a typo in the last patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:15:42 +01:00
Takashi Iwai 4525c9f31f [ALSA] Fix surround control of CMI9761
Modules: AC97 Codec

- Fixed surround controls of CMI9761 (model 83) in update_jacks callback.
- Clean up ad1888 and ad1985 update_jacks callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:15:39 +01:00
Russell King 9480e307cd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it.  Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:56 -07:00
Nicolas Pitre 90b66e8332 [ALSA] clean suspend/resume calls for ac97_bus_type
AC97 Codec
A single call to the driver suspend/resume method for each device is
enough. The level and SUSPEND_*/RESUME_* arguments are deprecated and
said to be removed eventually anyway (no other subsystem are using them
anymore except platform devices).

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-07 14:45:46 +02:00
Nicolas Pitre 72e75de2df [ALSA] remove redundent assignment to the ac97 device structure
AC97 Codec
Don't use dev.platform_data to store a reference to the containing
ac97_t structure.  Such assignment is redundent since we can deduce the
ac97_t structure location from the contained device structure.  This
sets platform_data free for other purposes.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-07 14:45:44 +02:00
Nicolas Pitre 3a91e95969 [ALSA] remove bogus match method for ac97_bus
AC97 Codec
The bus_id is initialized with a generic identifier string which is not
really useful for proper driver matching.  Let the driver decide what it
needs via its probe method instead.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-07 14:45:35 +02:00
Sasha Khapyorsky 27bcaa693c [ALSA] no templated index for si3036 modem controls
AC97 Codec
No index is templated for si3036 modem controls.

Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-07 14:45:27 +02:00
Sasha Khapyorsky 0444e2aca9 [ALSA] no templated index for mc97 controls
AC97 Codec
No index is templated for mdoem controls.

Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-07 14:45:25 +02:00
Takashi Iwai e560d8d836 [ALSA] Replace with kzalloc() - pci stuff
AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver
KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12 10:48:16 +02:00
Takashi Iwai a5022b0dc6 [ALSA] Fix ALC658D support
AC97 Codec
Fix the internal speaker problem (e.g. Targa Traveller 826)
with ALC658D codec.  The info is taken from Cyberlink/realtek-modified code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12 10:41:01 +02:00
Takashi Iwai ee71508e73 [ALSA] Fix EAPD for MSI S270
AC97 Codec
Fix pin47 setting for EAPD control on MSI S270 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12 10:35:10 +02:00
Sergey Vlasov 66d10647fe [ALSA] HP nx6110 quirks
Intel8x0 driver,AC97 Codec
The HP nx6110 laptop needs to have Headphone Jack Sense enabled so
that the internal speakers will be turned off when headphones are
plugged in.

Also ac97_quirk=hp_only is needed to make a single Master volume in
the mixer instead of separate volumes for internal speakers and
headphones, which just confuses the user.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30 08:46:55 +02:00
Jaroslav Kysela 5049c35b13 [ALSA] ac97_bus - revert last change and do it only in the ALSA tree
AC97 Codec

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-08-30 08:46:52 +02:00
Jaroslav Kysela 34ad73b9c5 [ALSA] ac97_bus - replace <linux/module.h> with <sound/driver.h> for consistency
AC97 Codec

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-08-30 08:46:48 +02:00
Bjorge Dijkstra 61be3ce0f2 [ALSA] ac97 - make ac97 codec device name unique
AC97 Codec
The patch fixes the bus_id conflict error when registering two codecs
of the same type (ALSA bug#1334).

Signed-off-by: Bjorge Dijkstra <bjorge@gmx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30 08:46:34 +02:00
Clemens Ladisch 3e6c6139f0 [ALSA] ac97: make patch_wolfson_wm97??_specific() functions static
AC97 Codec
Make the patch_wolfson_wm97??_specific() functions static again.
This patch was accidentally reverted in rev. 1.92.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-08-30 08:46:00 +02:00
Philip Prindeville 4b4994869d [ALSA] Add VT1617A codec support
AC97 Codec
Added (minimal) support of VT1617A codec with SPDIF.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30 08:45:22 +02:00
Clemens Ladisch a53fc188ec [ALSA] make local objects static
Memalloc module,PCM Midlevel,Timer Midlevel,GUS Library,AC97 Codec
ALI5451 driver,RME9652 driver
Make some functions/variables that are used in only one file static.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-08-30 08:45:01 +02:00
Liam Girdwood 064d2112ff [ALSA] WM9713 modem detection
AC97 Codec
This patch fixes a problem whereby the WM9713 has modem functionality
incorrectly detected after an AC97 cold reset.

Changes:-

  o Cleared AC97_SCAP_MODEM in wm9713 scaps

Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30 08:44:19 +02:00
Clemens Ladisch 10e8d78a94 [ALSA] use SNDRV_CTL_NAME_IEC958 macro
CMI8330 driver,ENS1370/1+ driver,FM801 driver,VIA82xx driver,AC97 Codec
ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
ICE1712 driver,ICE1724 driver
Where appropriate, use the SNDRV_CTL_NAME_IEC958 instead of a literal
string.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-08-30 08:43:35 +02:00
Liam Girdwood 0ca06a00e2 [ALSA] AC97 bus interface for ad-hoc drivers
AC97 Codec,PCI drivers
I've made the review changes and as requested I've pasted the RFC by
Nicolas below:-

'I would like to know what people think of the following patch.  It
allows for a codec on an AC97 bus to be shared with other drivers which
are completely unrelated to audio.  It registers a new bus type, and
whenever a codec instance is created then a device for it is also
registered with the driver model using that bus type.  This allows, for
example, to use the extra features of the UCB1400 like the touchscreen
interface and the additional GPIOs and ADCs available on that chip for
battery monitoring.  I have a working UCB1400 touchscreen driver here
that simply registers with the driver model happily working alongside
with audio features using this.'

Changes over RFC:-

  o Now matches codec name within codec group.
  o Added ac97_dev_release() to stop kernel complaining about no release
method for device.
  o Added 'config SND_AC97_BUS' to sound/pci/Kconfig and moved 'config
SND_AC97_CODEC' out with the PCI=n statement.
  o module is now called snd-ac97-bus

Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30 08:43:26 +02:00