Commit Graph

1941 Commits

Author SHA1 Message Date
Takashi Iwai 5c0d7bc103 ALSA: hda - Fix bdl_pos_adj value for ATI SB chipsets
ATI SB controllers seem to report the DMA ahead in the amount of FIFO.
Thus bdl_pos_adj should be 32 for them as default.

Also, the default value is set to -1, which means to make the driver
to choose the appropriate value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:34:25 +02:00
Takashi Iwai 555e219ffa ALSA: hda - bdl_pos_adj option to each instance
The option bdl_pos_adj should be provided for each card instance instead of
a global one because the value depends rather on each controller-chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:34:19 +02:00
Takashi Iwai d2e1c97331 ALSA: hda - remove position_fix=3
position_fix=3 is the option to correct the DMA position with the
FIFO size.  But, it never worked correctly, and we have now more other
workarounds for the DMA position fixes.  Thus better to remove it.

Also, change POS_FIX_NONE to POS_FIX_LPIB to represent its real role
better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:30:43 +02:00
Takashi Iwai 675f25d4d3 ALSA: hda - Add bdl_pos_adj option
Added a new option, bdl_pos_adj, to adjust the delay of IRQ-wakeup
timing.

Most HD-audio hardwares have a problem that a BDL IRQ is issued before
actually the data and the DMA pointer are updated.
We have already a mechanism to force to delay snd_pcm_period_elapsed()
calls via workq, but this costs much CPU, and typically the delay is
within one sample.  Thus, it's more clever to adjust the BDL entries
instead.

The new option adds the size of the delay in frames.  As default,
it's set to 1 -- that is, one sample delay.  Even the hardware is
really correct, one sample delay is relatively harmless in comparison
with reporting wrong positions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:30:20 +02:00
Takashi Iwai 781711a93e ALSA: emu10k1 - Fix page allocation with GFP_DMA
Added the missing GFP_ATOMIC to page_alloc when called with GFP_DMA.
GFP_KERNEL often results in stalls for ZONE_DMA, so GFP_ATOMIC is more
prgmatic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:29:38 +02:00
Akio Idehara 36ca6e133a [ALSA] hda - Add Toshiba dynabook SS RX1 support
I have Toshiba dynabook SS RX1 and this patch adds that support.

Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:29:33 +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
Akio Idehara 7b1e8795eb [ALSA] hda - Fix "alc262_sony_unsol[]" hda_verb array
I think that hda_verb array must have "terminator (empty array)".
But alc262_sony_unsol[] does not have it.
And it causes gcc-4.3's buggy behavior
with snd_hda_sequence_write().

Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-09 16:21:42 +02:00
Ville Syrjälä 8b83afe0d2 [ALSA] maestro3: Fix hw volume on HP OmniBook
Make the hw volume buttons work correctly on some HP OmniBook laptops.
The original quirk was apparently applied a bit too early and it was
also lacking some critial register writes. This improved sequence was
discovered by trial and error (like the original sequence). Tested and
found working on OB500 and OB6000 laptops.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 11:54:18 +02:00
Takashi Iwai 607d982bbe [ALSA] hda - increase max_codecs of ICH to 4
It turned out that some ICH9-based boards use SD3 for the audio codec
where the current driver code doesn't probe.  Since we have a better
codec slot check now, it must be safe to increase this to 4.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 11:54:13 +02:00
Takashi Iwai 2c3bf9abb1 [ALSA] hda - Fix PLL gating control on Realtek codecs
On some Realtek codecs, the analog PLL gating control bit must be set
off while the default value is 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 11:54:07 +02:00
Jiang zhe 17bba1b72d [ALSA] hda - support intel DG33 motherboards
These two motherboards's pin configuration are not covered by driver.
I wrote a new model to support them.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 11:53:59 +02:00
Jaroslav Franek 868e15dbd2 sound: emu10k1 - fix system hang with Audigy2 ZS Notebook PCMCIA card
When the Linux kernel is compiled with CONFIG_DEBUG_SHIRQ=y,
the Soundblaster Audigy2 ZS Notebook PCMCIA card causes the
system hang during boot (udev stage) or when the card is hot-plug.
The CONFIG_DEBUG_SHIRQ flag is by default 'y' with all Fedora
kernels since 2.6.23. The problem was reported as
https://bugzilla.redhat.com/show_bug.cgi?id=326411

The issue was hunted down to the snd_emu10k1_create() routine:

/* pseudo-code */
snd_emu10k1_create(...) {
	...
	request_irq(... IRQF_SHARED ...) {
		register the irq handler
		#ifdef CONFIG_DEBUG_SHIRQ
		call the irq handler: snd_emu10k1_interrupt() {
			poll I/O port   // <---- !! system hangs
			...
		}
		#endif
	}
	...
	snd_emu10k1_cardbus_init(...) {
		initialize I/O ports
	}
	...
}

The early access to I/O port in the interrupt handler causes
the freeze. Obviously it is necessary to init the I/O ports
before accessing them. This patch moves the registration of
the irq handler after the initialization of the I/O ports.

Signed-off-by: Jaroslav Franek <jarin.franek@post.cz>
Acked-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 11:16:06 +02:00
Tony Vroon 378bd6a521 [ALSA] hda - COMPAL IFL90/JFL-92 laptop quirk
Use quirk table to assign ALC268_TOSHIBA to COMPAL IFL90/JFL-92 laptops.
No analog output on autoprobe.

Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Guri <gurashka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-04 12:12:35 +02:00
Takashi Iwai 07bc76dfa1 [ALSA] hda - Fix resume of auto-config mode with Realtek codecs
The auto-config mode of Realtek ALC codecs has a bug since 2.6.25
that it cannot resume properly.  The problem was the wrong assignment
of init_hook that overrides the whole initialization.

Relevant bug reports:
	http://bugzilla.kernel.org/show_bug.cgi?id=10662
	https://bugzilla.novell.com/show_bug.cgi?id=385473

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-03 14:56:53 +02:00
Takashi Iwai d2cd74b158 [ALSA] emu10k1 - Fix inverted Analog/Digital mixer switch on Audigy2
On Audigy2 Platinum, the Analog/Digital mixer switch is inverted.
	https://bugzilla.novell.com/show_bug.cgi?id=396204

The patch adds a simple workaround.

There might be another device requiring a similar fix, too (or fix for
audigy2 generically), but right now I fix only the known broken one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-02 11:45:53 +02:00
Takashi Iwai 79d06432a2 [ALSA] hda - Fix model for LG LS75 laptop
Set the proper model for LG LS75 with CM9880 codec.
See ALSA bug#2105:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2105

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 16:56:00 +02:00
Takashi Iwai 269ef19caa [ALSA] hda - Fix mic input on HP2133
The mic pins are wrongly assigned on AD1884A mobile model.
The mic handling is fixed for the automatic mic selection, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 16:22:10 +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 a5003fc041 [ALSA] emu10k1 - simplify page allocation for synth
Simplify the page allocation of emu10k1 driver for emux synth support.
Since these pages aren't be necessarily coherent, we can avoid
expensive DMA-coherent routines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 11:37:41 +02:00
Takashi Iwai 8bb8b453cb [ALSA] trident - clean up obsolete synth codes
Clean up the unused synth codes in the memory handling of trident driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-30 09:48:33 +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
Kailang Yang f9423e7a94 [ALSA] hda - Fix EAPD and COEF setups for realtek codecs
Fixed EAPD and COEF setups for Realtek ALC662/663, 660-VD and 888 codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:22 +02:00
Kailang Yang 2f8932863d [ALSA] hda - show correct codec chip in PCM stream names
Show more exact codec chip name in the PCM stream name strings.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:22 +02:00
Kailang Yang 531240ff52 [ALSA] hda - Fix vref pincap check in alc882 auto-detection
Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:21 +02:00
Kailang Yang 6dda9f4a95 [ALSA] hda - Add ALC663 support
Added the support of ALC663 codec, including specific models for
ASUS M51VA, ASUS G71V, ASUS H13 and ASUS G50V.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:21 +02:00
Kailang Yang abbc9d1b25 [ALSA] hda - Add ICH9 controller support (8086:2911)
Added the missing PCI ID for ICH9 controller (8086:2911)

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:21 +02:00
Kailang Yang f269002e61 [ALSA] hda - Add support of Teradici controller
Add the new PCI ID 0x6549 0x1200 Teradici controller.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:21 +02:00
Takashi Iwai 62cf872a8e [ALSA] Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSE
Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSE to
represent its meaning more better.  This config isn't provided only
for the detection but for more verbose debug prints in general.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:21 +02:00
Takashi Iwai 6938d6b2a9 [ALSA] Fix AC97 kconfig items
The kconfig items related with AC97-powersave must be outside the
CONFIG_SND_PCI range.  And it'd be better together with CONFIG_SND_AC97.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:20 +02:00
Takashi Iwai 89fe511792 sound: Convert to menuconfig
Convert menu in sound Kconfig files to menuconfig and if.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:20 +02:00
Adrian Bunk a72e72469a [ALSA] remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:20 +02:00
Mauro Carvalho Chehab 587755f1f6 [ALSA] hda - Fix capture mute Widget for stac9250/9251
Fix capture mute widget for STAC9250/9251 codecs.  The widget 0x09
has no mute but 0x14 does actually.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-25 18:21:18 +02:00
Travis Place 97ec710cab [ALSA] hda - Added support for Foxconn P35AX-S mainboard
Added IDs for the Foxconn P35AX-S mainboard to patch_realtek.c, so
that ALC883_6ST_DIG is used by default.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-24 18:23:57 +02:00
Takashi Iwai 20a3a05dd6 [ALSA] hda - Fix COEF and EAPD in ALC889 auto-configuration mode
Fix the missing COEF and EAPD initialization in ALC889 auto-configuration
mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-24 18:23:49 +02:00
Takashi Iwai bc9b56238e [ALSA] hda - Fix noise on VT1708 codec
We get quite noisy output on the right channel on VT1708 codec
when 24bit samples are used.  Suppress the 24bit support until any
real fix is found.
	https://bugzilla.novell.com/show_bug.cgi?id=390473

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-24 18:23:35 +02:00
Travis Place b9e16bc548 [ALSA] hda - Add model for ASUS P5K-E/WIFI-AP
Added a config table entry for the ASUS P5K-E/WIFI-AP mainboard (ID
1043:8227) to use AD1988_6STACK_DIG

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-24 18:23:26 +02:00
Clemens Ladisch aea3bfbcfb [ALSA] ice1724: fix MIDI
The VT1724 MIDI port is not MPU-401 compatible; remove the hacks that
try to make the MPU-401 library work with it, and just use some simple
device-specific code.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Pavel Hofman <pavel.hofman@insite.cz>
2008-05-20 14:22:44 +02:00
Travis Place 186c3117f8 [ALSA] hda - Fix ASUS P5GD1 model
Corrected the model assignment for the ASUS P5GD1 w/SPDIF after reports of
surround sound not being possible.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-20 11:56:40 +02:00
Takashi Iwai ebc7a40663 [ALSA] hda - Fix ALC262 fujitsu model
Fixed the speaker auto-mute with two laptop and docking headphones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Tony Vroon <tony@linx.net>
2008-05-20 11:56:33 +02:00
Takashi Iwai 9ad593f6d3 [ALSA] hda - Fix DMA position inaccuracy
Many HD-audio controllers seem inaccurate about the IRQ timing of
PCM period updates.  This has caused problems on audio quality; e.g.
JACK doesn't work with two periods.

This patch fixes the problem by checking the current DMA position
at IRQ handler and delays the period-update via a workq if it's
inaccurate.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:19 +02:00
Andreas Mohr 02330fbaad [ALSA] PCI168 snd-azt3328 Linux driver: another huge update
- figured out 'Digital(ly) Enhanced Game Port' functionality,
  implemented support for it (eliminating gameport polling overhead)
- removed optional joystick activation, gameport now enabled unconditionally,
  since we now support it via the PCI I/O space, not via conflict-prone
  legacy I/O (which I was thus able to DISABLE now)!
- fix playback bug (a muted wave output would get unmuted upon start of
  playback, of course this is not what we want, thus remember mute state)
- implement partial power management: when idle, lower clock rate and disable
  codec (reduced noise!), and disable gameport circuit when unused
- instantiate OPL3 timer, too
- much better implementation of snd_azf3328_mixer_write_volume_gradually()
- slightly optimized interrupt handling
- lots of cleanup

This time, I also found a way to verify proper OPL3 operation
via MIDI file playback (emulation via synth hardware).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:19 +02:00
Clemens Ladisch ca1f30ad6c [ALSA] virtuoso: restrict period time to less than 10 s
Add a constraint for the period time so that there are less than ten
seconds between interrupts so that ALSA does not assume that the device
is dead.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:17 +02:00
Clemens Ladisch d55d7a1cbb [ALSA] oxygen: add symbols for buffer/period size constraints
Introduce symbols for the buffer/period size constraints so that their
limits and relationships become clearer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:17 +02:00
Clemens Ladisch 4a4bc53bc5 [ALSA] oxygen: add PM support
Add suspend/resume support.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:17 +02:00
Clemens Ladisch 92215f3a17 [ALSA] virtuoso: add xonar_enable_output()
Move the setting of the output enable GPIO bit to a separate function.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:17 +02:00
Clemens Ladisch 75146fc0f9 [ALSA] oxygen: separate out hardware initialization code
Create separate functions for the code that initializes the hardware, as
opposed to initializing internal driver state, so that they can be
reused for resume support.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:17 +02:00
Clemens Ladisch bbbfb55266 [ALSA] oxygen: simplify DAC volume initialization
When initializing the DAC volume registers, we can just use the generic
volume update functions instead of setting the registers manually.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:16 +02:00
Clemens Ladisch e58aee9580 [ALSA] oxygen: save register writes
Save the written values of all CMI8788 and AC97 registers and of some of
the DAC/ADC registers so that it is possible to restore the register
state later.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:16 +02:00
Clemens Ladisch c13650079b [ALSA] oxygen: add symbol for I/O space size
Remove another magic number - add a symbol for the size of the PCI I/O
range.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:15 +02:00
Clemens Ladisch d023dc0aa2 [ALSA] oxygen: fix version in MODULE_LICENSE
Adjust the MODULE_LICENSE strings to properly reflect the actual license.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:15 +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 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
Jacek Luczak 564c5bead4 [ALSA] Revert migration to alc_set_pin_output() in alc861_auto_set_output_and_unmute()
Change done by:
        commit f6c7e5461e
        [ALSA] hda-codec - Fix auto-configuration of Realtek codecs
broke sound on ALC861 Analog.

Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-05 14:12:08 +02:00
Takashi Iwai 20686c2437 [ALSA] fm801 - Fix kconfig dependency mess of fm801-tea575x
FM801-tea575x tuner has a reverse selection to V4L1 and this causes
nasty dependency problems.

The patch simplifies the dependency with a normal
"depends on VIDEO_V4L1".  This decreases the usability but fixes bugs,
yeah.  If any better feature like "requires" is introduced to kbuild
in future, we'll be able to switch it...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-05 14:12:08 +02:00
Takashi Iwai 7bd3c0f73c [ALSA] hda - Support IDT 92HD206 codec
Added the support for IDT 92HD206 codec chip.
It's compatible with STAC927x.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-05 14:12:07 +02:00
Takashi Iwai df99cd334e [ALSA] hda - Add support of Medion RIM 2150
Added the support of Medion RIM 2150 laptop with ALC880 codec.
ALSA bug#3708:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3708

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-29 19:01:57 +02:00
Takashi Iwai 7f70f046af [ALSA] ice1724 - Enable watermarks
Enable watermarks settings (previously commented out) for MPU RX/TX.
Otherwise irqs aren't issued properly.

Tested-by: Pavel Hofman <pavel.hofman@insite.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-29 19:01:56 +02:00
Takashi Iwai df7e3fdf83 [ALSA] Add MPU401_INFO_NO_ACK bitflag
Added MPU401_INFO_NO_ACK bitflag to ignore the ACK check for UART
commands.  VT172x doesn't handle ACK commands, for example.

Tested-by: Pavel Hofman <pavel.hofman@insite.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-29 19:01:56 +02:00
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
Matthew Ranostay 07bcb316cf [ALSA] hda: 92hd71bxxx DMIC nid
Added missing DMIC verb to dell_4_1_pin_configs[].

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Pavel Hofman d16be8ed69 [ALSA] ice1724 - Improved the Juli rate setting
* moving most of clock-specific code to card-specific routines
* support for ESI Juli
* to-be-researched - monitoring of analog/digital inputs

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Andrew Morton ff73317ea7 [ALSA] sound/pci/pcxhr/pcxhr.c: fix warnings
sparc64:

sound/pci/pcxhr/pcxhr.c: In function `pcxhr_update_r_buffer':
sound/pci/pcxhr/pcxhr.c:459: warning: cast to pointer from integer of different size
sound/pci/pcxhr/pcxhr.c: In function `pcxhr_trigger_tasklet':
sound/pci/pcxhr/pcxhr.c:628: warning: long int format, different type arg (arg 4)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Andrew Morton ee0abefde5 [ALSA] sound/pci/pcxhr/pcxhr_core.c: fix printk warning
sound/pci/pcxhr/pcxhr_core.c: In function `pcxhr_set_pipe_state':
sound/pci/pcxhr/pcxhr_core.c:899: warning: long int format, different type arg (arg 4)

suseconds_t is int on sparc64.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Andrew Morton 91e24faa55 [ALSA] sound/pci/aw2/aw2-alsa.c needs dma-mapping.h
sparc32:

sound/pci/aw2/aw2-alsa.c: In function 'snd_aw2_create':
sound/pci/aw2/aw2-alsa.c:282: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
sound/pci/aw2/aw2-alsa.c:282: error: (Each undeclared identifier is reported only once
sound/pci/aw2/aw2-alsa.c:282: error: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch 43dd89c7e7 [ALSA] oxygen: disable clock of unused I2S inputs
Disable the master clock outputs of any unused I2S inputs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch db12b8e301 [ALSA] oxygen: move MIDI flag to model struct
Put the flag that enables the MIDI port into the model structure instead
of passing it as a separate parameter to oxygen_pci_probe().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch 87eedd2fd4 [ALSA] oxygen: make SPI/2-wire configuration model-specific
Allow the model drivers to specify if the codec communication goes over
SPI or a 2-wire bus.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch f009ad9b39 [ALSA] oxygen: change model-specific PCM device configuration
When specifying which PCM devices to use, model drivers now use flags
that also specify the routing between PCM devices and DMA channels
instead of just DMA channel bits.  This simplifies some code that checks
for these flags.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch fa5d8106cb [ALSA] oxygen: add monitor controls
Add controls to enable monitoring of the analog and digital inputs.

To allow monitoring after loading the driver when nothing has been
played back or recorded yet, the I2S input and outputs are initialized
to a valid configuration.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Clemens Ladisch 33fa724e29 [ALSA] virtuoso: move PCM1796 symbols to a header file
Move the PCM1796 register symbol definitions to their own header file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Clemens Ladisch f5b2368ba8 [ALSA] oxygen: move WM8785 symbols to a header file
Move the WM8786 register symbol definitions to their own header file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai 850f0e5212 [ALSA] hda-intel - Add sync support
Addded the support of sync streams to hda-intel driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai f081374b60 [ALSA] hda-codec - Support of Lenovo Thinkpad X300
Added the model thinkpad for Lenovo Thinkpad X300 with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai 888afa1541 [ALSA] hda-codec - keep the format verb at closing PCM streams
Keep the format verb at closing PCM streams.
Introduced snd_hda_codec_cleanup_stream() for the parcicular purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Takashi Iwai 117f257d7a [ALSA] hda-codec - Fix spekaer output of Panasonic CF-74
Add a new model "panasonic" for Panasonic CF-74 with STAC9200 codec
to fix the speaker output.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Takashi Iwai 2add9b9253 [ALSA] hda-intel - Add barrier
Add proper barriers in the RIRB communication code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Herton Ronaldo Krzesinski 86d34b7ec8 [ALSA] hda-codec - Map 3stack-6ch-dig ALC883 model for MSI 945GCM5 V2 (MSI-7267)
Map 3stack-6ch-dig ALC883 model for MSI 945GCM5 V2 (MSI-7267).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Herton Ronaldo Krzesinski f32a19e3e7 [ALSA] hda-codec - Fix DAC assignment order in ALC883
Actually clfe and surround DACs are inverted in alc883_dac_nids array
(see ALC883 datasheet). I discovered this while testing multi-channel
setup (using 3stack-6ch-dig model) on MSI 945GCM5 V2 motherboard that
has an ALC883 codec. Simply Rear Left/Right and Center/LFE were swapped
in 6 channel mode (also in 4 channel mode you didn't get rear left/right
output). Other models also were affected by this bug, as can be seen by
the mixer layouts that "workaround" this (the real bug was not noticed,
and some other models simply played with mixer and initial verbs). Thus
along with fixing the order of dac nids, also change the models that
relied on previous dac ordering properly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Julia Lawall b32300a4ce [ALSA] sound/pci: remove unused variable
The variable is_capture is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Takashi Iwai 43337ac0de [ALSA] ice1724 - Fix return codes in some pointis callbacks
Fixed the return codes (1 for changed values) in put callbacks of
pontis.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Pavel Hofman 841b23d4d7 [ALSA] some fixes and cleanup for ICE1724 cards
* removing the hack with NON_AKM ak4xxx type
* support for card-specific flags in ak4114_stats
* definition of the flags for corresponding cards

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Takashi Iwai c93f5a1eca [ALSA] ice1724 - Fix the SPDIF input sample-rate on Juli@
AK4114 on Juli@ has the SPDIF input sample rate detection and
causes errors when an incompatible sample rate is chosen.
The patch adds the open hook to check the current rate and limit
the hw constraints.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Tony Vroon 5d9fab2d84 [ALSA] hda-codec - Fujitsu Lifebook port replicator/dock headphone jack sense
The docking station headphone output had no audio and jack sense
was not considered.

Jack information from the laptop itself and the dock are combined, as
the dock does not obscure the connector.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Takashi Iwai ee9d6b9a30 [ALSA] hda-intel - Fix power-off hang on ASUS P5AD2
The hda-intel driver has a problem at power-off on ASUS P5AD2.
It's caused when the position-buffer is enabled -- most likely a
hardware-specific problem.

This patch adds a quirk to avoid the unnecessary enablement of
position-buffer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Herton Ronaldo Krzesinski 3da23cac3d [ALSA] hda-codec - Map 3stack-6ch-dig ALC662 model for Asus P5GC-MX
Map 3stack-6ch-dig ALC662 model for Asus P5GC-MX.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Herton Ronaldo Krzesinski 7055ad8a99 [ALSA] hda-codec - Fix ALC662 DAC mixer mutes
Currently ALC662 doesn't suport amp mute for AmpOut in nids 0x02, 0x03,
0x04 (see block diagram in ALC662 datasheet page 3, does M correspond to
mute?). The result is that currently mute for "Front Playback Switch",
"Surround Playback Switch", "Center Playback Switch" and "LFE Playback
Switch" mixer items doesn't work (tested on Asus P5GC-MX motherboard
with 3stack-6ch model).

The solution I found for this is to mute the proper inputs in 0x0c,
0x0d, 0x0e audio mixers.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Takashi Iwai 2626a263ff [ALSA] hda-codec - Fix orphan Headphone controls in STAC codecs
Currently, the headphone controls are created as Master wrongly in
some cases, and this prevents the virtual master controls.
The patch fixes the problem by simply using "Headphone" always for
headphone controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Matthew Ranostay d654a66035 [ALSA] hda: 92HD73xxx distortion fix
Fixed issue on some laptops that if the Master mixer and DAC mixers are
turned all the way up that will cause distortion. This is fixed by limiting
the max volume with the volume knob nid.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Takashi Iwai bb9f76cd59 [ALSA] hda-codec - Improve ALC262 ultra model
Improved ALC262 ultra model for Samsung Q1 Ultra series.

- clean up mixers
- support of input from HP jack as a mic
- add quirk for Q1 EL

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Takashi Iwai 9166257797 [ALSA] aw2 - Rename aw2-tsl.h to aw2-tsl.c
aw2-tsl.h should be rather a C file to be included since it's referred
only in aw2-saa6146.c and includes a table data.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Michael Gruber ee7a9c7c2e [ALSA] hda-intel - Fix microphone capture with ALC880 F1734 model
The default capture source should be the mic which is 0x01 on this model.
In addition to that the change to VREF50 allows for higher capture volume.

Signed-off-by: Michael Gruber <lists.mg@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Matthew Ranostay 7747ecceb5 [ALSA] hda: Reorganized DAC outputs
Changed so that internal speakers point to the Front mixer instead of Surround.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Tobin Davis b419f34699 [ALSA] HDA Codecs: add support for Toshiba Equium L30
This patch adds support for the Toshiba Equium L30 laptop and renames the mixer
controls to match Laptop usages.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Takashi Iwai 0ccb541c96 [ALSA] hda-codec - Add internal mic item for ALC268 acer model
Added the internal mic as a capture source item for ALC268 acer model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Takashi Iwai 7194cae62e [ALSA] hda-codec - Fix dmics on ALC268 in auto configuration
Fixed the handling of dmics on ALC268 in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Peer Chen 487145a198 [ALSA] hda_intel: Add the DIDs of nvidia MCP79 HD audio controller to hda_intel.c
Add the Device IDs of nvidia MCP79 HD audio controller to hda_intel.c

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Jiang zhe 2de3c232a0 [ALSA] hda-codec - model for cx20549 to support laptop HP530
Currently the model laptop-hpsense use the 0x12 as ExtMic,
and use 0x14 as Internal IntMic.
But the hp530 only have one ExtMic, the Pin widget is 0x14.

In this patch, I changed the mixer item for them.
I still reserved the IntMic item, it will be helpful if
other machine may use this model.

ALSA bug#3821.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Jiang zhe fb97dc6739 [ALSA] hda-codec - model for alc883 to support FUJITSU Pi2515
There is no suitable model for Pi2515.
This model is to support it.  ALSA bug#3800.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Pascal Terjan 8280823668 [ALSA] ALC288 - Add NEC S970 to the quirk table
NEC S970 has no sound in the internal speakers when autodetection is
used.
With targa-dig model, there is sound in the speakers and it gets
correctly muted when pluging headphones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Jiang zhe 368c7a95ea [ALSA] hda-codec - model for alc883 to support M720R
There is no suitable model for M720R (ALSA bug#3781).
This patch is to support HP jack-sensing and mixer.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Takashi Iwai fd2499f0ed [ALSA] aw2 - Remove endian dependency
Removed unnecessary dependency on the little-endianess.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Harvey Harrison 9bf8e7ddea [ALSA] sound: replace remaining __FUNCTION__ occurences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Andrew Morton 24982c5f7f [ALSA] hda_intel needs dma-mapping.h
sparc32:

sound/pci/hda/hda_intel.c: In function 'azx_create':
sound/pci/hda/hda_intel.c:1838: error: 'DMA_64BIT_MASK' undeclared (first use in this function)
sound/pci/hda/hda_intel.c:1838: error: (Each undeclared identifier is reported only once
sound/pci/hda/hda_intel.c:1838: error: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Takashi Iwai 40ac8c4f20 [ALSA] hda-codec - Fix the array over-range access with stac92hd71bxx codec
Add the check of the array range for dac_nids to prevent the over-range
access.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Matthew Ranostay 52fe0f9d59 [ALSA] hda: add verbs for 92hd73xxx laptops
Added core_init[] for several 92hd73xxx laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Matthew Ranostay bce6c2b5b4 [ALSA] hda: disable power management on fixed ports
Power management can't be enabled on fixed ports, since the presence
will always return false and prevent output.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Harvey Harrison 3c9a3203ff [ALSA] sound: hda: missing includes of hda_patch.h
Move the array declaration to hda_codec.c where it is used and add includes
where the individual presets are declared.

Fixes the following sparse warnings:
sound/pci/hda/patch_realtek.c:13744:25: warning: symbol 'snd_hda_preset_realtek' was not declared. Should it be static?
sound/pci/hda/patch_cmedia.c:729:25: warning: symbol 'snd_hda_preset_cmedia' was not declared. Should it be static?
sound/pci/hda/patch_analog.c:3656:25: warning: symbol 'snd_hda_preset_analog' was not declared. Should it be static?
sound/pci/hda/patch_sigmatel.c:3995:25: warning: symbol 'snd_hda_preset_sigmatel' was not declared. Should it be static?
sound/pci/hda/patch_si3054.c:286:25: warning: symbol 'snd_hda_preset_si3054' was not declared. Should it be static?
sound/pci/hda/patch_atihdmi.c:156:25: warning: symbol 'snd_hda_preset_atihdmi' was not declared. Should it be static?
sound/pci/hda/patch_conexant.c:1721:25: warning: symbol 'snd_hda_preset_conexant' was not declared. Should it be static?
sound/pci/hda/patch_via.c:1962:25: warning: symbol 'snd_hda_preset_via' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Takashi Iwai 64ed0dfd1f [ALSA] hda-codec - Use int instead of long in patch_sigmatel.c
The HD-audio parameters are at most 32bit int.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Harvey Harrison 8b55178515 [ALSA] sound: patch_sigmatel.c fix shadowed variable warning
Temp variable in the loop shadows the second argument (which is otherwise
unused in this function).  Change this to defcfg as it is used to hold
the default config.
sound/pci/hda/patch_sigmatel.c:2759:18: warning: symbol 'cfg' shadows an earlier one
sound/pci/hda/patch_sigmatel.c:2734:26: 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:19 +02:00
Harvey Harrison 0b76b51e58 [ALSA] sound: hdspm.c fix returning void expression warnings
Just drop the returns.
sound/pci/rme9652/hdspm.c:1031:3: warning: returning void-valued expression
sound/pci/rme9652/hdspm.c:1033:3: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison 0cd87b10ca [ALSA] sound: riptide.c fix shadowed variable warnings
In both cases we are passing around the substream number, use
sub_num for this.
sound/pci/riptide/riptide.c:1633:6: warning: symbol 'index' shadows an earlier one
sound/pci/riptide/riptide.c:121:12: originally declared here
sound/pci/riptide/riptide.c:1673:6: warning: symbol 'index' shadows an earlier one
sound/pci/riptide/riptide.c:121:12: 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:18 +02:00
Harvey Harrison caba7f70fc [ALSA] sound: pcxhr_core.c fix shadowed variable warning
Inner loop redeclares err with u32 rather than int, stupid fix here
is to change the inner err to err2.
sound/pci/pcxhr/pcxhr_core.c:1008:8: warning: symbol 'err' shadows an earlier one
sound/pci/pcxhr/pcxhr_core.c:983: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:18 +02:00
Harvey Harrison ff143874d0 [ALSA] sound: virtuoso.c fix shadowed variable warning
Use priv_idx as an identifier.
sound/pci/oxygen/virtuoso.c:277:15: warning: symbol 'index' shadows an earlier one
sound/pci/oxygen/virtuoso.c:56:12: 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:18 +02:00
Harvey Harrison c3daa92d60 [ALSA] sound: ice1712.c fix shadowed variable warnings
In all four case, adding a private value to the iooff index,
call it priv_idx.
sound/pci/ice1712/ice1712.c:1300:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here
sound/pci/ice1712/ice1712.c:1312:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here
sound/pci/ice1712/ice1712.c:1338:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here
sound/pci/ice1712/ice1712.c:1350:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here

[tiwai - fixed coding issues as well]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison f2948fc2f0 [ALSA] sound: emu10k1x.c fix shadowed variable warnings
enable in these contexts refers specifically to intr enable, as
per the two functions it is found in.  Use intr_enable instead.
sound/pci/emu10k1/emu10k1x.c:330:15: warning: symbol 'enable' shadows an earlier one
sound/pci/emu10k1/emu10k1x.c:53:12: originally declared here
sound/pci/emu10k1/emu10k1x.c:341:15: warning: symbol 'enable' shadows an earlier one
sound/pci/emu10k1/emu10k1x.c:53:12: originally declared here

instead of shadowing, use cap_voice as we test for the capture
voice in this statement.
sound/pci/emu10k1/emu10k1x.c:798:25: warning: symbol 'pvoice' shadows an earlier one
sound/pci/emu10k1/emu10k1x.c:787:24: 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:18 +02:00
Harvey Harrison 4677df07e5 [ALSA] sound: emuproc.c fix signedness warning
Reading regs from the fpga into an int instead of a u32, trivial
fix.
sound/pci/emu10k1/emuproc.c:422:34: warning: incorrect type in argument 3 (different signedness)
sound/pci/emu10k1/emuproc.c:422:34:    expected unsigned int [usertype] *value
sound/pci/emu10k1/emuproc.c:422:34:    got int *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison 3fa4a90738 [ALSA] sound: au88x0_pcm.c fix integer as NULL pointer warning
sound/pci/au88x0/au88x0_pcm.c:508:15: warning: Using plain integer as NULL pointer

Also some small codingstyle fixes.

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
Harvey Harrison bed515b0df [ALSA] sound: ca0106_mixer.c fix shadowed variable warnings
Change the variable err to _err within the ADD_CTLS macro to avoid
shadowing the local variable.

sound/pci/ca0106/ca0106_mixer.c:710:2: warning: symbol 'err' shadows an earlier one
sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here
sound/pci/ca0106/ca0106_mixer.c:712:3: warning: symbol 'err' shadows an earlier one
sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here
sound/pci/ca0106/ca0106_mixer.c:721:3: warning: symbol 'err' shadows an earlier one
sound/pci/ca0106/ca0106_mixer.c:663: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
Harvey Harrison d967a02712 [ALSA] sound: ca0106_main.c fix shadowed variable warnings
change to intr_enable as per the two functions it is defined in.
sound/pci/ca0106/ca0106_main.c:438:15: warning: symbol 'enable' shadows an earlier one
sound/pci/ca0106/ca0106_main.c:159:12: originally declared here
sound/pci/ca0106/ca0106_main.c:449:15: warning: symbol 'enable' shadows an earlier one
sound/pci/ca0106/ca0106_main.c:159:12: 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
Harvey Harrison c74056d437 [ALSA] sound: ali5451.c fix shadowed variable warnings
enable is used to test for whether or not spdif should be enabled,
change to spdif_enable.

sound/pci/ali5451/ali5451.c:1812:15: warning: symbol 'enable' shadows an earlier one
sound/pci/ali5451/ali5451.c:63:12: originally declared here
sound/pci/ali5451/ali5451.c:1840:27: warning: symbol 'enable' shadows an earlier one
sound/pci/ali5451/ali5451.c:63:12: 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
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
Harvey Harrison 44977b719f [ALSA] sound: rme96.c fix integer as NULL pointer warning
kernel style does assignment outside of if() block
sound/pci/rme96.c:1562:71: warning: Using plain integer as NULL pointer

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
Harvey Harrison 4db9e4f2b5 [ALSA] sound: rme32.c fix integer as NULL pointer warning
kernel style does assignment outside of if() statements.
sound/pci/rme32.c:1353:71: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:16 +02:00
Harvey Harrison e37273d348 [ALSA] sound: maestro3.c fix shadowed variable warnings
change id to elem_id as it is used to initialize each mixer element
sound/pci/maestro3.c:2071:25: warning: symbol 'id' shadows an earlier one
sound/pci/maestro3.c:67:13: originally declared here

index is used in each of these places to count over the dsp's memory,
change to the name dsp_index
sound/pci/maestro3.c:2572:9: warning: symbol 'index' shadows an earlier one
sound/pci/maestro3.c:66:12: originally declared here
sound/pci/maestro3.c:2604:9: warning: symbol 'index' shadows an earlier one
sound/pci/maestro3.c:66:12: originally declared here

[tiwai - fixed coding style issues as well]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:16 +02:00
Harvey Harrison 58e4334e82 [ALSA] sound: fm801.c fix shadowed variable warning
id was only used as a counter in a for loop, move the declaration
to where it is used and change it to i.
sound/pci/fm801.c:1288:6: warning: symbol 'id' shadows an earlier one
sound/pci/fm801.c:51:13: originally declared here

[tiwai - fixed a coding style issue as well]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:16 +02:00
Harvey Harrison 3463d8fa14 [ALSA] sound: es1968.c fox shadowed variable warning
id is used when initializing the mixer elements, use elem_id here
instead.
sound/pci/es1968.c:1963:25: warning: symbol 'id' shadows an earlier one
sound/pci/es1968.c:129:13: 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:16 +02:00
Harvey Harrison 405b0a377c [ALSA] sound: ens1370.c fix shadowed variable warning
index is incremented only when AC97_EI_SPDIF and then assigned to
the index field.  Change the temporary name to is_spdif.

sound/pci/ens1370.c:1638:10: warning: symbol 'index' shadows an earlier one
sound/pci/ens1370.c:84:12: 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:16 +02:00
Harvey Harrison 7dfa31ed5e [ALSA] sound: cmipci.c fix shadowed variable warning
A temporary variable for each mixer element is used in an initialization
loop, use the name elem_id.

sound/pci/cmipci.c:2747:26: warning: symbol 'id' shadows an earlier one
sound/pci/cmipci.c:56:13: originally declared here

[tiwai - fixed a coding style issue as well]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:16 +02:00
Takashi Iwai b26451c059 [ALSA] hda-codec - Add docking-station mic input for Thinkpad X61
Added the docking-stationc mic input to the capture source list
for Thinkpad X61.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:15 +02:00
Takashi Iwai aea7bb0a6f [ALSA] hda-codec - Fix initial DAC numbers of 92HD71bxx codecs
Fix the initial num_dacs of 92HD71bxx codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:15 +02:00
Remy Bruno 47ba97f8fa [ALSA] hdsp - RME 9632 fix at 192kHz
The bits indicating SPDIF frequency in the status register are not the same for
the 9632 than for the other cards, because it also supports 192kHz. A specific
bitmask has thus been added (used in hdsp_spdif_sample_rate()).
The 9632 does not seem to report external sample rates greater than 96kHz. In
this case, the best seems to report spdif rate when autosync reference is
spdif. This also required to move function hdsp_spdif_sample_rate().

Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:15 +02:00
Matthew Ranostay ae0afd81b3 [ALSA] hda: Mic as output fix
Added logic to check if AUTO_PIN_FRONT_MIC is available for output
switch, if AUTO_PIN_MIC isn't.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:15 +02:00
Takashi Iwai 87218e9c6e [ALSA] hda-intel - Use PCI_DEVICE() macro
Clean up the pci id table using PCI_DEVICE() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:14 +02:00
Matthew Ranostay 03d7ca177f [ALSA] hda: STAC927x analog mic
Some laptops have a internal analog microphone that is not setup by the BIOS.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:14 +02:00
Matthew Ranostay a766264010 [ALSA] hda: 92HDxxxx PCI Quirks
Added PCI_QUIRKS for laptop that have the 92HDxxx family of codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:14 +02:00
Matthew Ranostay 7989fba979 [ALSA] hda: STAC927x invalid association value
STAC_DELL_BIOS quirks were setting the association value wrong
for port 0x0f, which prevented it from being included in hp_outs[].

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:14 +02:00
Matthew Ranostay 4451089e2a [ALSA] hda: fix STAC927x power management
Fix issue on STAC927x codecs that first DAC was getting powered down
even if was being used.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:13 +02:00
Takashi Iwai 34b6757dc7 [ALSA] aw2 - Add missing module parameters
Added the missing declarations for module parameters.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:13 +02:00
Cedric Bregardis 98f2a97f20 [ALSA] Emagic Audiowerk 2 ALSA driver.
Signed-off-by: Cedric Bregardis <cedric.bregardis@free.fr>
Signed-off-by: Jean-Christian Hassler <jhassler@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:13 +02:00
Takashi Iwai 67ebcb0311 [ALSA] hda-codec - Don't create multiple capture streams for single inputs
When the device has only one input source, it makes no sense to have
multiple capture streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:13 +02:00
Takashi Iwai 85860c06ab [ALSA] hda-codec - Fix ALC268 capture source
Initialize the capture source properly for auto model.
It's especially important for cases that only mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:13 +02:00
Takashi Iwai aef9d318b1 [ALSA] hda-codec - Add beep volume control to ALC268
Added the beep volume control to ALC268 codec support code.
Since the codec doesn't return the correct AMP caps, we need to override
the value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +02:00
Kailang Yang 77a261b755 [ALSA] hda-codec - Fix ALC662 recording
Fixed ALC662 recording issue.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +02:00
Takashi Iwai 8b6ed8e70d [ALSA] hda-intel - Clean up stream definitions
Clean up the code to define playback/capture streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +02:00
Takashi Iwai 49c88b85b5 [ALSA] ca0106 - Add master volume controls
Added master volume and switch controls for ca0106 using vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +02:00
Takashi Iwai 1c82ed1bc5 [ALSA] Keep private TLV entry in vmaster itself
Use a private array for TLV entries of virtual master controls instead
of (supposed) static array.  This cleans up the existing codes.

Also, now vmaster assumes the simple dB-range TLV that is the only type
it can handle.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +02:00
Takashi Iwai e922b0028f [ALSA] Move vmaster code to sound core
Move the codes for virtual master controls to sound core part so that
not only hda-intel drivers can use it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:12 +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 b40b04ad38 [ALSA] hda-codec - Add model=mobile for AD1884A & co
Added the new model mobile for AD1884A and compatible codecs.
It's a reduced version of model=laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:11 +02:00
Takashi Iwai c505925968 [ALSA] hda-codec - Add support of AD1883/1884A/1984A/1984B
Added the support of new AD codecs: AD1883, AD1884A, AD1984A and AD1984B.
These are almost compatible except for additional digital pins, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:11 +02:00
Takashi Iwai 88c71a9974 [ALSA] hda-codec - Fix missing capsrc_nids for ALC262
ALC262 must have capsrc_nids defined as well as in ALC882.
Also, add a NULL check in alc882_mux_enum_put to avoid Oops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Libin Yang 814b1a5ce6 [ALSA] HDA-Intel - Patch to support RV7xx HDMI Audio
This patch is to add R7xx HDMI audio support.

Signed-off-by: Libin Yang <Libin.yang@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai d260cdf656 [ALSA] hda-codec - Fix breakage of resume in auto-config of realtek codecs
The last patch for fixing the auto-config pin setting breaks the resume
due to a wrong use of snd_hda_codec_amp_stereo().  The code in the init
hook shouldn't touch the amp cache.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai c8cd128117 [ALSA] hda-codec - Add more names to vendor list
Added more known names to the vendor id list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai 9a08160bdb [ALSA] hda-codec - Add "IEC958 Default PCM" switch
Added a new mixer switch to enable/disable the sharing of the default
PCM stream with analog and SPDIF outputs.  When "IEC958 Default PCM"
switch is on, the PCM stream is routed both to analog and SPDIF outputs.
This is the behavior in the earlier version.

Turning this switch off has a merit for some codecs, though.  Some codec
chips don't support 24bit formats for SPDIF but only for analog outputs.
In this case, you can use 24bit format by disabling this switch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai f6c7e5461e [ALSA] hda-codec - Fix auto-configuration of Realtek codecs
This patch fixes some bugs in the auto-configurator of Realtek codecs:
- add missing pin set-up for speaker pins
- fix the speaker auto-mute function not to conflict with the existing
  "Speaker" mixer switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai 5832fcf8b5 [ALSA] hda-codec - More fix-up for auto-configuration
In some cases, the BIOS sets up only the HP pins with different assoc
and sequence numbers, e.g. on FSC Esprimo with ALC262.

This patch adds a fix-up for such a case.  When multiple HPs are defined
and no line-outs is found, the configurator tries to re-assign some pins
from HP list to line-out, judging from the sequence number.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:10 +02:00
Takashi Iwai 5d5d5f43f1 [ALSA] hda-codec - Implement auto-mic jack sensing on Samsung laptops
Implemented the auto-mic jack sensing for Samsung laptops with AD1986A
codec chip (model=laptop-eapd).

The hardware uses pin 0x1d and 0x1f for the internal and external
mics, respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Takashi Iwai e140634812 [ALSA] hda-codec - Clean up capture source selection of Realtek codecs
Clean up the codes of the capture source selection for Realtek codecs.
Now using common helper functions with the new capsrc_nids field.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Takashi Iwai f0824812af [ALSA] hda-codec - Fix automute of AD1981HD hp model
Reprogram the speaker-pin setting at each HP pin plug to make sure
the spekaer auto-muting on AD1981HD hp model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Takashi Iwai 937b416027 [ALSA] hda-codec - Fix ALC880 F1734 model
Fixed some issues with ALC880 F1734 model
 - fix capture via mic
 - enable volume-wheel control

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Jonathan Woithe aa27a44395 [ALSA] hda-codec - remove duplicate controls in alc268 test mixer
I've just noticed that there are a handful of duplicate controls in the
ALC268 test model mixer.  This patch (against alsa-driver 1.0.16) removes
them.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:09 +02:00
Takashi Iwai cc4d13873a [ALSA] hda-codec - Correct HDMI transmitter names
Give better names to the new HDMI transmitter chips.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:08 +02:00
Takashi Iwai 21c7b0819f [ALSA] hda-intel - Fix a compile error with CONFIG_SND_DEBUG_DETECT=y
Forgot to get rid of the obsolete fragsize field from a debug print.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:08 +02:00
Jaroslav Kysela ef2cd2ccad [ALSA] ice1712 - added support for M-Audio Delta 66E
See ALSA bug#3327 for more details. Experimental.
Also fix support for M-Audio Delta 1010E - subdevice check.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-04-24 12:00:08 +02:00
Jaroslav Kysela a60567d13c [ALSA] Added support for Delta1010E (newer revisions of Delta1010)
For more details, see ALSA bug#3327 .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-04-24 12:00:08 +02:00
Takashi Iwai cf7aaca8ba [ALSA] hda-intel - Support 64bit buffer allocation
The HD-audio hardware usually supports 64bit address for DMA and other
buffers.  The patch enables the feature if supported.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:08 +02:00
Takashi Iwai 4ce107b990 [ALSA] hda-intel - Use SG buffer
Use SG buffers for the HD-audio instead of linear buffers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:08 +02:00
Matthew Ranostay b76c850fbc [ALSA] hda: STAC927x power down inactive DACs
On several laptops that have STAC9228 codecs have unused DACs,
this powers them down to a D3 state.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:08 +02:00
Alan Horstmann d043143d80 [ALSA] ice1712 - Fix hoontech MIDI input
Fixes the problems with Midi In on Hoontech/STA dsp24 cards, for example with
DSP2000 box, without restricting the box configurations available.  Also adds
mpu_401 name strings.

Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Takashi Iwai 7d664ed58f [ALSA] hda-codec - Add ID for an unknown HDMI codec chip
Added the ID for an unknown HDMI codec chip on Jetway J9F2.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Takashi Iwai 7ba72ba1fe [ALSA] hda-intel - Fix PCM device number assignment
In the current scheme, PCM device numbers are assigned incrementally
in the order of codecs.  This causes problems when the codec number
is irregular, e.g. codec #0 for HDMI and codec #1 for analog.  Then
the HDMI becomes the first PCM, which is picked up as the default
output device.  Unfortuantely this doesn't work well with normal
setups.

This patch introduced the fixed device numbers for the PCM types,
namely, analog, SPDIF, HDMI and modem.  The PCM devices are assigned
according to the corresponding PCM type.  After this patch, HDMI will
be always assigned to PCM #3, SPDIF to PCM #1, and the first analog
to PCM #0, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Takashi Iwai a76969228a [ALSA] ice1724 - Add ADC setup in set_rate callback for Audiophile192
Added the missing GPIO setup for the AK5385A ADC codec on Audiophile192.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Takashi Iwai f339eb0f30 [ALSA] ice1724 - Enable AK4114 support for Audiophile192
Fixed and enabled the support of AK4114 chip on Audiophile192.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Mirco Tischler f12462c522 [ALSA] hda-codec - Add support of Zepto laptops
Adds support for zepto laptops with alc268 intel_hda codec.

Signed-off-by: Mirco Tischler <mt-ml@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:07 +02:00
Takashi Iwai 12a733e56c [ALSA] hda-codec - Add SI HDMI codec support
Added the support of SI HDMI codec, found in ASUS machines.
ALSA bug#3654
        https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3654

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:06 +02:00
Takashi Iwai 09f9970139 [ALSA] hda-codec - Allow multiple SPDIF devices
The current code doesn't allow multiple SPDIF devices, and causes
errors when multiple SPDIF devices are found (e.g. SPDIF out and HDMI).
This patch allows multiple SPDIF devices by incrementing the index
automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:06 +02:00
Tobin Davis bf277785d6 [ALSA] HDA - Add support for the OQO Model 2
This patch adds support for the OQO Model 2 Ultra Mobile PC.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:06 +02:00
Tobias Klauser 3f76d9841e ALSA: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
2008-04-21 22:25:51 +00:00
Arjan van de Ven 4b47c971dc es1968: fix sleep-while-holding-lock bug
snd_es1968_ac97_read() calls snd_es1968_ac97_wait() first outside a locked
area, and later, while holding a lock.

snd_es1968_ac97_wait() has a polling loop with a cond_resched() inside it..
which sleeps, so the second call is invalid.

This patch adds a version of the wait function that just pure polls.  While
this is not very elegant in principle, it's very likely the easiest thing to
do here, we already checked if the chip was ready (while yielding) just
before, so it is very unlikely to take a long time here.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-08 18:25:53 -07:00
Takashi Iwai 0d9ac27afa [ALSA] intel8x0 - Add quirk for Compaq Deskpro EN
Added the ac97_quirk hp_only for Compaq Deskpro EN.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 15:21:27 +01:00
Herton Ronaldo Krzesinski b4818494ed [ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control
Fix the line-out volume control of eeepc p701 to be a proper slave of
the virtual master control.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 15:20:08 +01:00
Harvey Harrison 008f3599ef [ALSA] sound: ice1712: unused structs
Don't need to declare a struct when defining a structure layout.  Both
of these structs are unused.
sound/pci/ice1712/revo.c:39:3: warning: symbol 'revo51' was not declared. Should it be static?
sound/pci/ice1712/phase.c:54:3: warning: symbol 'phase28' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 12:11:25 +01:00
Takashi Iwai 31bffaa943 [ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls
Some models like eeepc ep20 have invalid mixer names that aren't
handled properly by virtual master controls.  Rename them to the
proper names.

Also fixed some typos in the mixer names but they are not compiled
in right now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:17 +01:00
Takashi Iwai b6a370b6fb [ALSA] intel8x0 - Add quirk for Acer Travelmate 2310
Added ac97_quirk=hp-only for Acer Travelmate 2310.
ALSA bug#3656
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3656

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:17 +01:00
Andrew Paprocki 0b167bf456 [ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard
This adds a quirk to the Realtek ALC883 table for the Albatron KI690-AM2
motherboard to use the 6stack-dig model.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:16 +01:00
Clemens Ladisch b930b9f41d [ALSA] oxygen: add owner field
I forgot to set the module owner for the HiFier/Xonar models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:16 +01:00
Tony Vroon 3f1eeaed2c [ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table
Add the proper model entry for Fujitsu Lifebook E8410 with ALC262 codec.

From: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:16 +01:00
Takashi Iwai fb304ce53a [ALSA] hda-codec - Fix AD1988 capture elements
The some indices of capture elements of AD1988 are wrongly assigned.
This patch fixes it.  See ALSA bug#3795
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3795

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:15 +01:00
Takashi Iwai b84f08d491 [ALSA] hda-codec - Fix Master volume on HP dv8000
HP dv8000 laptop has a problem with Master volume.  It's due to the
connection of the widget 0x13.  When it's connected from the analog
amp mixer (0x19), it works as expected mysteriously (ALSA bug#3775):
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3775

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-02-29 11:28:14 +01:00
Clemens Ladisch 2f93d797ea [ALSA] bt87X: fix freeing of shared interrupt
Call free_irq() after iounmap() because other devices could trigger our
shared interrupt handler.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Takashi Iwai c6cd7d7efe [ALSA] hda-intel - Fix Oops with ATI HDMI devices
The driver gets Oops with ATI HDMI devices due to the wrong calculation
of index for playback streams.  This patch fixes it.  Reference:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3746

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Takashi Iwai 9e03ad7907 [ALSA] hda-codec - Fix amp-in values for pin widgets
Pin widgets have always one amp-input value regardless of number of
connections.  The proc file showed values wrongly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Takashi Iwai cced83b62c [ALSA] hda-codec - Fix ALC882 capture source selection
The capture source selection for ADC list with two elements is buggy
becaues of a wrong capture mux list.  This patch fixes the starting
index based on spec->num_adc_nids.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Takashi Iwai 614ca92b51 [ALSA] hda-codec - Fix wrong capture source selection for ALC883 codec
The widget list of capture source selection for ALC883 contains the
wrong NIDs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Takashi Iwai 2f08554977 [ALSA] hda-codec - Don't create vmaster if no slaves found
Don't create vmaster controls if no slaves are found in the given list.
This prevents the error due to an empty vmaster control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Serge A. Suchkov 14c65f98bf [ALSA] hda-codec - Fix race condition in generic bound volume/swtich controls
Attached patch fix race condition in hd_codec generic bound volume/swtich
controls

oops on this bug can be easy reproduced by two mixer apps on SMP system with
PREEMPT kernel

dmesg:

 ALSA /home/ss/ALSA/alsa-driver-1.0.16/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:596:
 hda_intel: azx_get_response timeout, switching to polling mode: las
 t cmd=0x014f0900
 BUG: unable to handle kernel paging request at virtual address 00070006
 printing eip: f8f43e95 *pde = 00000000
 Oops: 0000 [#1] PREEMPT SMP
 Modules linked in: i915 drm snd_seq_dummy snd_seq_oss snd_seq_midi_event
 snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss bnep rfcomm hidp l2cap
 bluetooth w
 lan_wep acpi_cpufreq coretemp hwmon mmc_block pcspkr psmouse wlan_scan_sta
 ath_rate_sample snd_hda_intel ath_pci serio_raw wlan tg3 sdhci snd_pcm
 firewire_o
 hci mmc_core i2c_i801 snd_timer firewire_core snd_page_alloc ath_hal(P)
 snd_hwdep snd iTCO_wdt crc_itu_t iTCO_vendor_support shpchp video output
 acer_acpi b
 acklight led_class wmi_acer

 Pid: 3969, comm: gkrellm Tainted: P        (2.6.24-jm #4)
 EIP: 0060:[<f8f43e95>] EFLAGS: 00010292 CPU: 0
 EIP is at snd_hda_mixer_bind_ctls_info+0x20/0x43 [snd_hda_intel]
 EAX: 00000000 EBX: f7478e00 ECX: f763e000 EDX: f764f788
 ESI: 00070002 EDI: edce5e00 EBP: edc3fe64 ESP: edc3fe54
  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
 Process gkrellm (pid: 3969, ti=edc3e000 task=f1e4e000 task.ti=edc3e000)
 Stack: f764f77c f7478e00 edce5e00 f6dd6000 edc3fe84 f8e590e8 edc7a239 f6d14034
       f764f34c f6c0f7e0 edc3ff30 f6d14034 edc3fea8 f8e591b7 edc3ff30 edc3ff2c
       00000000 f70aa668 f6d14034 f8e59165 bfbfadb0 edc3ff40 f8e587aa edc3ff2c
 Call Trace:
 [<c0104fbb>] show_trace_log_lvl+0x1a/0x2f
 [<c010506d>] show_stack_log_lvl+0x9d/0xa5
 [<c0105119>] show_registers+0xa4/0x1bd
 [<c0105354>] die+0x122/0x206
 [<c03daccc>] do_page_fault+0x535/0x623
 [<c03d940a>] error_code+0x72/0x78
 [<f8e590e8>] snd_mixer_oss_get_volume1_vol+0x74/0xf1 [snd_mixer_oss]
 [<f8e591b7>] snd_mixer_oss_get_volume1+0x52/0xa5 [snd_mixer_oss]
 [<f8e587aa>] snd_mixer_oss_ioctl1+0x673/0x71e [snd_mixer_oss]
 [<f8e588af>] snd_mixer_oss_ioctl+0xb/0xd [snd_mixer_oss]
 [<c017af0a>] do_ioctl+0x22/0x67
 [<c017b186>] vfs_ioctl+0x237/0x24a
 [<c017b1ca>] sys_ioctl+0x31/0x4b
 [<c010402e>] syscall_call+0x7/0xb
 =======================
 Code: 3f 49 c7 89 f8 59 5b 5e 5f 5d c3 55 89 e5 57 89 d7 56 53 89 c3 83 ec 04
 8b 70 5c 8b 40 60 05 7c 01 00 00 89 45 f0 e8 c0 3f 49 c7 <8b> 46 04 89 fa 89
 4
 3 5c 89 d8 8b 0e ff 11 89 73 5c 89 c7 8b 45
 EIP: [<f8f43e95>] snd_hda_mixer_bind_ctls_info+0x20/0x43 [snd_hda_intel]
 SS:ESP 0068:edc3fe54
 ---[ end trace 0a20bc209e9397cc ]---

similar issue report present in ALSA bugtracking system
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3652

Signed-off-by: Serge A. Suchkov <Serge.A.S@tochka.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:09 -08:00
Clemens Ladisch 902b05c117 [ALSA] oxygen: fix line-in recording selection
The GPIO pin 0 of the CM9780 must be set when muting the line input even
on non-Xonar cards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 14:20:08 -08:00