Commit graph

143 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
da3cec35dd ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13 11:46:38 +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
Rene Herman
68c072388d ALSA: re-order AC97 codec ID table.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-20 19:17:17 +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
Rene Herman
f6127efba1 ALSA: add TriTech 28023 AC97 codec ID and Wolfson 9701 name.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-15 15:08:25 +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
Takashi Iwai
6cabf6b069 ALSA: Fix AC97 power down
Some laptops don't like PR3 powerdown.  Do PR3 powerdown only
for the real power-saving.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:31:34 +02:00
Takashi Iwai
38f582270f [ALSA] ac97 - Fix power_save option value as time-out
The power_save option was set as boot although it was meant to be a
timeout value like the same option of snd-hda-intel originally.
Now fixed to the same style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:28:31 +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
Takashi Iwai
23ce154763 [ALSA] Make ak4531 local to ens1370 driver
The ak4531 module is used only by ens1370 driver (and unlikely that
any other will use it ever).  Let's make it local to ens1370.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 09:26:09 +02:00
Takashi Iwai
c18f68e4d8 [ALSA] Clean up sound/pci/ac97/Makefile
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 09:25:55 +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
Harvey Harrison
608b10bad3 [ALSA] sound: ac97_pcm.c fix shadowed variable warning
err is always assigned before it is used, no need to declare another
inside the if statement.
sound/pci/ac97/ac97_pcm.c:577:7: warning: symbol 'err' shadows an earlier one
sound/pci/ac97/ac97_pcm.c:572:6: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +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
9004acc70e [ALSA] Remove sound/driver.h
This header file exists only for some hacks to adapt alsa-driver
tree.  It's useless for building in the kernel.  Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it.  This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:48 +01: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
Krzysztof Helt
54720a2481 [ALSA] ac97_patch: compilation warning fix
This patch kills these two compilation warnings if
power management is disabled:
sound/pci/ac97/ac97_patch.h:86: warning: 'snd_ac97_restore_status'
declared 'static' but never defined
sound/pci/ac97/ac97_patch.h:87: warning: 'snd_ac97_restore_iec958'
declared 'static' but never defined

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:11 +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
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