Commit Graph

1680 Commits

Author SHA1 Message Date
Takashi Iwai 3a841d519f [ALSA] ice1724 - Fix IRQ lock-up with MPU access
The sound boards with VT1724 and compatible chips may lock up when
MPU401 is accessed together with the PCM streaming.
This patch fixes the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:38:25 +02:00
Takashi Iwai 05808ecc45 [ALSA] hda - Fix Thinkpad X300 digital mic
TP X300 digital mic requires additional init verbs with magic COEFs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Takashi Iwai a0b8f7d89b [ALSA] hda - Fix model for Acer Aspire 5720z
Set the proper model=acer for Acer Aspire 5720z with ALC268 codec.
ALSA bug#3550:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3550

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Takashi Iwai ebf029da38 [ALSA] Fix possible races at free_irq in PCI drivers
The irq handler of PCI drivers must be released before releasing other
resources since the handler for a shared irq can be still called and
may access the freed resource again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:41 +02:00
Peter Lienig d80fd0935e [ALSA] ice1712 - Add Terrasoniq TS88 support
Added the support of Terrasonq TS88.

Signed-off-by: Peter Lienig <lienig@rheinmetall-de.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:40 +02:00
Jeff Garzik f000fd8093 [ALSA] Fix synchronize_irq() bugs, redundancies
free_irq() calls synchronize_irq() for you, so there is no need for
drivers to manually do the same thing (again).  Thus, calls where
sync-irq immediately precedes free-irq can be simplified.

However, during this audit several bugs were noticed, where free-irq is
preceded by a "irq >= 0" check... but the sync-irq call is not covered
by the same check.

So, where sync-irq could not be eliminated completely, the missing check
was added.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:40 +02:00
Karsten Wiese 8a87c9cf99 [ALSA] Audiophile 192: Fix ad converter initialization
Correct some arguments in calls to snd_ice1712_gpio_write_bits() from
ap192_set_rate_val().

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:40 +02:00
Karsten Wiese 775c199e6a [ALSA] Don't set gpio mask register in snd_ice1712_gpio_write_bits()
Some calls to snd_ice1712_gpio_write() go wrong, if
snd_ice1712_gpio_write_bits() ran before and changed the gpio mask register.
Read the actual gpio value and combine it with the to be set bits in the cpu
instead.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:39 +02:00
Karsten Wiese 988f066477 [ALSA] ice1724.c: toggle "chip reset" and "eeprom based setup" sequence
Let "chip reset" become first. Increasement of the "chip reset" related timeout
leads to correctly read eeprom's contents here.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:39 +02:00
Takashi Iwai 7943a8aba9 [ALSA] hda - Avoid unexpected breakage with ALC889A hack
The last ALC889A hack may break on some devices with certain model presets
since patch_alc*() have different model tables.  So, now it's handled in
the original patch_alc882() but fly to patch_alc883() in model=auto
appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:37 +02:00
Takashi Iwai cb308f97ae [ALSA] hda - Fix ALC889A codec support
ALC889A is recognized ALC885/ALC882 but it's actually closer to
ALC888/ALC883.

Cc: Kasper Sandberg <lkml@metanurb.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:37 +02:00
Matthew Ranostay 7c2ba97b8a [ALSA] hda: Add 5.1 support for second headphone jack
Several 92hd7xxx and STAC9228 laptops have multiple headphone jacks,
the second headphone jack should be used for the 5.1 surround sound.
Add support for 'Headphone as Line Out' switch, which allows it be used
in 5.1 surround sound.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:37 +02:00
Clemens Ladisch 4972a177fe [ALSA] oxygen: generalize DAC volume TLV handling
Add a pointer for DAC volume TLV data to the model structure so that the
model driver do not need to manually assign it in their control filter.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:37 +02:00
Clemens Ladisch e983532e44 [ALSA] oxygen: mute by default
Initialize the playback volume controls as being muted and having
minimal volume.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:37 +02:00
Clemens Ladisch 193e813814 [ALSA] oxygen: generalize handling of DAC volume limits
Add fields for the DAC volume limits to the module structure so that
model drivers do not need to install their own control info handlers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:36 +02:00
Clemens Ladisch 0c0e6daf14 [ALSA] hifier: remove empty hifier_mixer_init()
The empty hifier_mixer_init() function is useless; remove it.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:36 +02:00
Takashi Iwai 3adb8abc70 [ALSA] hda - Add support of AD1989A/AD1989B
Added the support of AD1989A and AD1989B codecs.
These codecs can have multiple SPDIF devices, but currently we handle
only one SPDIF.  If any real devices with two SPDIF interfaces (likely
one for SPDIF and one for HDMI), we'll fix this rightly.

Otherwise, these codecs are pretty similar with AD1988.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:36 +02:00
Clemens Ladisch a8bb1bad9b [ALSA] virtuoso: fix DX front panel I/O
Fix the GPIO 1 mixer control to enable I/O through the front panel
connector of the Xonar DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:36 +02:00
Herton Ronaldo Krzesinski eb5a662166 [ALSA] hda-intel: Add Quanta IL1 ALC267 model
This adds support for Quanta IL1 mini-notebook to alsa, defining a new model
for it. It comes with an ALC267 codec chip. Some notes about this model:

* In headphone automute, I use AC_VERB_SET_PIN_WIDGET_CONTROL instead of common
  amp mute, to avoid conflict with mixer switch (mixer and automute use the
  same nid).
* The only connected capture sources in the hardware are the internal mic and
  external mic jack. So instead of using an input source selector like on other
  ALC268 models, the mic automute automatically switch between captures.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:35 +02:00
Matthew Ranostay 0fc9dec46f [ALSA] hda: EAPD power management
Power management support for EAPD enabled laptops, when headphones
are sensed it pulls the EAPD GPIO line low to power it down.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:35 +02:00
Matthew Ranostay 780c8be4ab [ALSA] hda: Correct SPDIF out default config
Several laptops have have the SPDIF out defined as 'Digital other out'
when it should be 'SPDIF out' in the default config.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:34 +02:00
Tony Vroon 06a9c30cdd [ALSA] hda - Fujitsu Lifebook PC speaker signal
The legacy PC speaker signal was not routed to outputs. The codec is not
prevented from powering down in this patch, although I suppose one could
argue that perhaps it should be. Let me know if anyone feels strongly one
way or the other.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:34 +02:00
Jiang zhe 5b030389e4 [ALSA] hda - PCI quirk for laptop LG which use CMI9880
Please refer to [0003874] on the alsa mantis.
This patch added the pci quirk.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:34 +02:00
Jiang zhe 64654c2f9e [ALSA] hda - Should use HDA_OUTPUT instead of HDA_INPUT to mute pin 15 of ALC880
To mute the output of Pin widget 15 in ALC880, we should use the
HDA_OUTPUT. However, current code looks like :
snd_hda_codec_amp_stereo(codec, 0x15, HDA_INPUT, 0, HDA_AMP_MUTE, bits);
It may be a misspelling.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:34 +02:00
Frederik Deweerdt eaa9985b4e [ALSA] hda-codec - Fix unbalanced mutex
On Wed, Apr 02, 2008 at 08:19:29AM -0400, Miles Lane wrote:
> [   48.765906] [ BUG: bad unlock balance detected! ]
> [   48.765912] -------------------------------------
> [   48.765918] pulseaudio/4277 is trying to release lock
> (&codec->spdif_mutex) at:
> [   48.765930] [<c03031b7>] mutex_unlock+0x8/0xa
> [   48.765945] but there are no more locks to release!
> [   48.765950]
> [   48.765952] other info that might help us debug this:
> [   48.765959] 2 locks held by pulseaudio/4277:
> [   48.765965]  #0:  (&pcm->open_mutex){--..}, at: [<f89f134b>]
> snd_pcm_open+0xc1/0x1ba [snd_pcm]
> [   48.766003]  #1:  (&chip->open_mutex){--..}, at: [<f8b4f13d>]
> azx_pcm_open+0x36/0x184 [snd_hda_intel]
> [   48.766057]
> [   48.766059] stack backtrace:
> [   48.766066] Pid: 4277, comm: pulseaudio Not tainted 2.6.25-rc8-mm1 #12
> [   48.766086]  [<c013afc6>] print_unlock_inbalance_bug+0xce/0xd8
> [   48.766107]  [<c0109e1c>] ? save_stack_trace+0x1d/0x3b
> [   48.766130]  [<c012f54e>] ? __kernel_text_address+0x1b/0x27
> [   48.766146]  [<c0104533>] ? dump_trace+0xcd/0xd9
> [   48.766160]  [<c0109d9e>] ? save_stack_address+0x0/0x2c
> [   48.766176]  [<c013b80a>] ? find_usage_backwards+0xa4/0xc3
> [   48.766193]  [<c013cfb5>] lock_release_non_nested+0x84/0x120
> [   48.766209]  [<c03031b7>] ? mutex_unlock+0x8/0xa
> [   48.766222]  [<c013d1bb>] lock_release+0x16a/0x199
> [   48.766238]  [<c0303137>] __mutex_unlock_slowpath+0xa9/0x121
> [   48.766252]  [<c03031b7>] mutex_unlock+0x8/0xa
> [   48.766263]  [<f8b4ffd8>] snd_hda_multi_out_analog_open+0xd3/0xef
> [snd_hda_intel]

The following patch should fix it.

Cc: "Miles Lane" <miles.lane@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:33 +02:00
Andrew Morton 66c9aa6043 [ALSA] es1968 - fix coding style in the last patch
WARNING: braces {} are not necessary for single statement blocks
#40: FILE: sound/pci/es1968.c:1831:
+       if (diff > 1) {
+               __maestro_write(chip, IDR0_DATA_PORT, cp1);
+       }

total: 0 errors, 1 warnings, 35 lines checked

./patches/es1968-fix-jitter-on-some-maestro-cards.patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Andreas Mueller <andreas@stapelspeicher.org>
Tested-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:33 +02:00
Andreas Mueller f24bfa53da [ALSA] es1968: fix jitter on some maestro cards
This patch suppresses jitter on several Maestro cards in stereo mode (ALSA of
course).

The patch is also incorporated in the *BSD drivers where I "ported" it from.

Without this patch most of the stereo audio gets out of sync and really
distorted (oss-emulation with mplayer at 48000khz worked somehow).

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:33 +02:00
Denys Vlasenko 62cef8212f [ALSA] sound/pci/rme9652/hdspm.c: stop inlining largish static functions
sound/pci/rme9652/hdspm.c has unusually large number of static inline
functions - 22.

I looked through them and some of them seem to be too big to warrant inlining.

This patch removes "inline" from these static functions (regardless of number
of callsites - gcc nowadays auto-inlines statics with one callsite).

Size difference on 32bit x86:
   text    data     bss     dec     hex filename
  20437    2160     516   23113    5a49 linux-2.6-ALLYES/sound/pci/rme9652/hdspm.o
  18036    2160     516   20712    50e8 linux-2.6.inline-ALLYES/sound/pci/rme9652/hdspm.o

[coding fix by Takashi Iwai <tiwai@suse.de>]

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:33 +02:00
Jiang zhe 4383fae0ec [ALSA] hda-codec - PCI quirk for MSI laptop
Please refer to [0003848] on the alsa mantis.
This patch adds the pci quirk and Mic-Int controller.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:33 +02:00
Clemens Ladisch 80060ecc45 [ALSA] virtuoso: initialize two-wire control register
On the Xonar DX, initialize all bits of the two-wire control register.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch 387fb6a206 [ALSA] virtuoso: add GPIO 1 mixer control
Add a mixer control for switching whatever it is that is connected to
GPIO pin 1 on the Xonar DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch 1d98c7d4be [ALSA] oxygen: use SPDIF input only if present
If the card model does not have a digital input or an AC97 codec,
disable the respective interrupt and mixer controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch 11864b4b84 [ALSA] virtuoso: correctly switch input jack on Xonar DX
When selecting the capture source on the Xonar DX, the input jack must
be routed to either the line input or the microphone input by setting a
GPIO pin.  This requires an additional callback so that the model driver
can hook into the toggling of AC97 switches.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch a9d3cc485e [ALSA] virtuoso: add Xonar DX support
Add support for the Asus Xonar DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch 80647ee26e [ALSA] virtuoso: fix typo
Fix a (fortunately harmless) typo.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch aef1a535c4 [ALSA] virtuoso: change card short name
Change the card short name to show to show the card name instead of the
chip name.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch d08267a9df [ALSA] virtuoso: set PCM1796 oversampling rate
When playing data at 96 kHz or higher, reduce the DAC oversampling rate
to 32.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch af9af1741f [ALSA] virtuoso: move some code to xonar_common_init()
Move the code that is common to all Xonar models to a separate function,
and make it more generic in preparation for another model.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch a694a6a0e4 [ALSA] virtuoso: allow both CS5381 and CS5361
Rename all CS5381 symbols to CS53x1 because they can also be used for
Xonar models with a CS5361.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch 271ebfca58 [ALSA] virtuoso: separate D2/D2X init functions
Use separate model structures for the D2 and D2X so that the init
function does not have to check for the model again.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch 10e6d5f9b6 [ALSA] oxygen: add I2C support
Add a function to write I2C registers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch 7a43567472 [ALSA] aw2: remove duplicate MODULE_LICENSE
"GPL 2" does not mean that there have to be two MODULE_LICENSE("GPL")
entries.  ;-)

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch e97f79994a [ALSA] oxygen: fix line-in recording selection (now for real)
On C-Media cards, the GPIO pin 0 of the CM9780 must be handled exactly
like on Xonar cards, so move the Xonar code to the common mixer code.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Herton Ronaldo Krzesinski 0c4cc4430f [ALSA] hda-codec - Support mic automute for Clevo M720R/SR
Add support for mic automute in clevo-m720r ALC883 model, and rename it
to more generic clevo-m720. Also change model entry in ALSA-Configuration.txt
accordingly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Herton Ronaldo Krzesinski 213f0bfe90 [ALSA] hda-codec - Map clevo-m720r ALC883 model for Clevo M720SR
Map clevo-m720r ALC883 model for Clevo M720SR.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Takashi Iwai 95866d3802 [ALSA] ymfpci - Fix race at removal
free_irq() must be called first to avoid races at removal.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Herton Ronaldo Krzesinski eea6419ea1 [ALSA] hda-codec - Use common 3stack-6ch mixer for 3stack-hp model
Forgot one more: 3stack-hp model also have now the same mixer as
3stack-6ch (after DAC assignment fix in ALC883), so use it avoiding
duplicating the same mixer definition.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Herton Ronaldo Krzesinski f24dbdc61d [ALSA] hda-codec - Use base ALC883 mixer for 6stack-dell model
After DAC assignment fix in ALC883, alc888_6st_dell_mixer is now the
same as alc883_base_mixer. Avoid duplicated code and use
alc883_base_mixer in 6stack-dell model, removing alc888_6st_dell_mixer
definition.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Herton Ronaldo Krzesinski 5d85f8d02a [ALSA] hda-codec - Remove now uneeded 6stack-hp model from ALC883
After DAC assignment fix in ALC883, the 6stack-hp model is now the same
as 6stack-dig. So just remove 6stack-hp model and replace its use with
6stack-dig.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Jiang zhe 0e31daf7d6 [ALSA] hda-codec - model for alc262 to support Lenovo 3000
This model is to support the Lenovo 3000 y410.
ALSA bug#3856:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3856

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00