Commit Graph

2831 Commits

Author SHA1 Message Date
Matthew Ranostay b22b48214f [ALSA] hda: Mono mux mixer support
Add support for the mono mux on several 92HD7xxx codecs.
Creates a dynamic mixer for the mux selection.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:09 +01:00
Clemens Ladisch 02f21c9d6b [ALSA] oxygen: add SPDIF loopback control
Add a mixer control for the SPDIF loopback function.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:09 +01:00
Mark Brown 08c8efe692 [ALSA] Fix lockdep warning in ASoC machine probe
Don't take the codec mutex during machine probe until we have registered
with ALSA, fixing a lockdep warning reported by Dmitry Baryshkov.
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:09 +01:00
Clemens Ladisch c518b35ea2 [ALSA] oxygen: TempoTec HiFier is probably not supported
The TempoTec HiFier has a somwhat different architecture; remove it from
the list of cards that are known to be supported.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:09 +01:00
Takashi Iwai 0de27c10d3 [ALSA] cs5535audio - Fix available sample rates
The available sample rates on CS5535 depend on AC97 codec chip.
Set the additional hw params limit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:09 +01:00
Clemens Ladisch c57cccc038 [ALSA] oxygen: optimize snd_pcm_hardware structures
Add one more indirection to the lookup of the snd_pcm_hardware
structures so that we can save the space of the duplicate ones.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:08 +01:00
Clemens Ladisch 7f0b89465b [ALSA] oxygen: add 192 kHz SPDIF input support
Change the oxygen_spdif_input_bits_changed() function so that clock
changes on the SPDIF input are correctly detected.  This means that
sample rates greater than 96 kHz are now supported.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:08 +01:00
Clemens Ladisch 5a256f862c [ALSA] oxygen: fix DAC source register fields
Fix some wrong values for the definitions of the source masks for DACS 1
and 3.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:08 +01:00
Clemens Ladisch e9d88a8bd9 [ALSA] oxygen: fix control filter
Actually use the template that was maybe changed by the control filter
instead of the original one.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:08 +01:00
Clemens Ladisch 7ef37cd954 [ALSA] oxygen: move model-specific data out of common header
Instead of having model-specific fields in the common struct oxygen, put
them into a private structure that is allocated together with the card
structure.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:08 +01:00
Clemens Ladisch 3b94253bc9 [ALSA] oxygen: reduce SPI clock frequency for AK4396/WM8785
According to the datasheets, the SPI clock cycle must be at least 200 ns
for the AK4396 and the WM8785, so we cannot use the default 160 ns.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:07 +01:00
Clemens Ladisch 71e22a4b77 [ALSA] oxygen: allow more sample rates with WM8785
Allow to record with 32 kHz, 64 kHz, 88.2 kHz and 176.4 kHz with cards
that have a WM8785 ADC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:07 +01:00
Clemens Ladisch 878ac3ee76 [ALSA] oxygen: add more symbols
Add symbol definitions for the various codecs and GPIO pins.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:07 +01:00
Clemens Ladisch 44fb7aae82 [ALSA] oxygen: remove MIDI autodetection
The MIDI bit in the MISC register is set by default and cannot be used
to detect the presence of a MIDI port.  Instead, add a parameter to the
oxygen_pci_probe() function so that model drivers can specify this.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:06 +01:00
Clemens Ladisch db2396d495 [ALSA] oxygen: fix pause handling
Use the DMA_PAUSE register for pausing instead of stopping DMA.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:06 +01:00
Clemens Ladisch c9946b2c80 [ALSA] oxygen: remove magic numbers
Replace some magic numbers with register symbols.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:05 +01:00
Takashi Iwai 6735e5723b [ALSA] emu10k1 - Fix over-sized kmalloc for TLV
Reported by Al Viro:
In copy_tlv(), the size of kmalloc is wrongly calculated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:05 +01:00
Takashi Iwai 28a0d9df07 [ALSA] hda-intel - Make azx_get_response() a bit more robust
In azx_[rirb_]get_response(), the timeout is checked at the end of the loop.
It's better to be checked just after the check of the RIRB index to avoid
a bogus error with a too long msleep().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:05 +01:00
Takashi Iwai 7cda8ba9f4 [ALSA] ice1712, ice1724 - Code clean up
Clean up ice1712/ice1724 codes.  The board-specific data is allocated
locally in each code instead of having an ungly union in struct ice1712.
Also, fix coding issues in prodigy_hifi.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:05 +01:00
Andrew Paprocki 797760ab14 [ALSA] hda_proc - Add a number of new settings to proc codec output
This patch adds additional output to the /proc codec#X info.
The following pieces of information are added to the output:
-  Balanced, L/R swap, trigger, impedance sense pin capabilities
-  Vref pin capabilities
-  Current Vref pin widget control setting
-  Default configuration association, sequence, and misc bit test
-  EAPD/BTL bits conveying balanced mode, EAPD, and L/R swap
-  Power state modified to show state name as well as setting vs actual value
-  GPIO parameter output on Audio Function Group, including enumeration of IO
   pins which are indicated present (Any I and O pins are not output at this
   time)
-  Stripe and L/R swap widget capabilities
-  All digital converter bits: enable, validity, validity config, preemphasis,
   copyright, non-audio, professional, generation level, and content category
-  Converter stream and channel values for in/out widgets
-  SDI select value for in widgets
-  Unsolicited response widget capability tag and enabled bit
-  Delay widget capability value
-  Processing widget capability benign bit and number of coefficients
-  Realtek Define Registers: processing coefficient, coefficient index
[Also, fixed space/tab issues and make codes a bit more readable
  -- Takashi]

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:04 +01:00
Clemens Ladisch e005954934 [ALSA] oxygen: fix playback routing
The default playback routing must be 0xe4, not 0xe1; the front and
surround DACs were exchanged.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:04 +01:00
Clemens Ladisch c2353a0826 [ALSA] oxygen: add register definitions
Add more symbols for registers and register fields.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:04 +01:00
Timur Tabi 4052ce4cbf [ALSA] mpc8610: Add mmap support
Enable mmap support in the MPC8610 ASoC driver.  The driver can use ALSA's
default mmap functionality, it was just not enabled previously.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:04 +01:00
Jiang zhe f4beee9420 [ALSA] hda-codec - Fix capture source for Cx5045 codec
For codec conexant 5045, I found that the name of 'Capture Source Items'
is different from the name of mixer.
The mixer is:
HDA_CODEC_VOLUME('Ext Mic Playback Volume', 0x17, 0x2, HDA_INPUT),
HDA_CODEC_MUTE('Ext Mic Playback Switch', 0x17, 0x2, HDA_INPUT),
But the capture source item is :
static struct hda_input_mux cxt5045_capture_source = {
	.num_items = 2,
	.items = {
		{ 'IntMic', 0x1 },
		{ 'LineIn', 0x2 },
	}
};
I think that it's better to change the name of capture_source to avoid
misunderstanding.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:04 +01:00
Jiang Zhe 5218c89265 [ALSA] hda-codec - New model for conexant 5045 codec to support benq r55e
The benq r55e laptop have 3 jacks on the front panel.
One for HP, one for Line In and one for Mic In.
This patch implemented a new model to support it.

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:04 +01:00
Julian Scheel 88d1612cc2 [ALSA] ice1724 - Add missing prodigy_hifi.h
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Konstantin Kletschke <konsti@ku-gbr.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:03 +01:00
Clemens Ladisch 05855ba3f4 [ALSA] oxygen: make the I2S format configurable
Add proper register bit symbols for the I2S format field, and allow card
models to configure the I2S format to be used for the DACs and ADCs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:03 +01:00
Jaroslav Kysela b8c5b53e1f [ALSA] ice1712 - fixed midi input for Hoontech C-Ports
See ALSA bug#1846 for more details.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:03 +01:00
Julian Scheel 6b8d6e5518 [ALSA] ICE1724: Added support for Audiotrak Prodigy 7.1 HiFi & HD2, Hercules Fortissimo IV
See ALSA bug#2384 for more details.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Konstantin Kletschke <konsti@ku-gbr.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:03 +01:00
Vasily Khoruzhick da65fd3bf1 [ALSA] hda-codec - remove 11c1:1040 from patch_si3054.c id list
Codec with id 11c1:1040 sitting on hda bus isn't si3054-compatible.
It should be removed from patch_si3054.c id list.
The detailed information
	http://archives.linmodems.org/26457
From: Vasily Khoruzhick <anarsoul@gmail.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:02 +01:00
Takashi Iwai 52987656fb [ALSA] hda-intel - Add workarounds for STAC codecs
Some machines with STAC codecs seem to have problems (e.g. no audible
playback) when the delay in codec-read routine is too short.
I still don't figure out which command sequence causes this problem
(due to lack of test hardware), but it's known that increasing the
delay fixes.  So, added a stupid workaround here temporarily...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:02 +01:00
Andreas Degert 192b8e3922 [ALSA] hdsp: make Multiface II work again
This device has io_type == 1 (Multiface) and firmware_rev > 0xa
(fixes regression from changeset 5326)

Signed-off-by: Andreas Degert <ad@papyrus-gmbh.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:01 +01:00
T. H. Huth e70515dd51 [ALSA] snd-powermac: handle dead DMA transfers
This patch provides the snd-powermac sound driver with the ability to handle
dead DMA transfers. If a dead DMA transfer is detected, the driver now sets
up a new DMA transfer to continue with the sound output at the point where the
old transfer died.
This dead DMA transfer handling has become necessary with recent kernels on
certain G4 PowerMacs. Please refer to the following URLs for more information:
 https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3126
 https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/87652
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=436723
The patch is based on the dead DMA transfer handling code from the old dmasound
driver which can be found in the file sound/oss/dmasound/dmasound_awacs.c in
the Linux source code.

Signed-off-by: T. H. Huth <th.huth@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:01 +01:00
Randy Dunlap 599c3e76fe [ALSA] sound: fix caiaq section mismatches
Fix section mismatch in caiaq: these __devinit functions can be
called at any time so they should not be __devinit.
WARNING: vmlinux.o(.text+0x10a8dae): Section mismatch: reference to .init.text:snd_usb_caiaq_audio_init (between 'setup_card' and 'create_card')
WARNING: vmlinux.o(.text+0x10a8dd6): Section mismatch: reference to .init.text:snd_usb_caiaq_midi_init (between 'setup_card' and 'create_card')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:01 +01:00
Randy Dunlap 1374f8ceee [ALSA] sound: fix rme9652 section mismatch
Fix section mismatch in hdsp:  snd_hdsp_proc_init() can be called from
an ioctl at any time.
WARNING: vmlinux.o(.text+0x1089bc2): Section mismatch: reference to .init.text: (between 'snd_hdsp_create_alsa_devices' and 'snd_hdsp_free')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:01 +01:00
Randy Dunlap 32a41b026e [ALSA] sound: fix atiixp section mismatch
Fix section mismatch in atiixp by making some functions __devinit.
WARNING: vmlinux.o(.text+0xfd9304): Section mismatch: reference to .init.data:atiixp_quirks (between 'ac97_probing_bugs' and 'snd_atiixp_codec_detect')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:00 +01:00
Randy Dunlap e4d76815c2 [ALSA] sound: fix ad1889 section mismatch
Fix section mismatch in ad1889 by renaming the pci_driver variable to a
whitelisted variable name.
WARNING: vmlinux.o(.data+0x2e5ff0): Section mismatch: reference to .init.text:snd_ad1889_probe (between 'ad1889_pci' and 'index')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:00 +01:00
Randy Dunlap e7d7c2e288 [ALSA] sound: fix mts64 section mismatches
Fix section mismatches in mts64 by making a static variable __devinitdata.
WARNING: vmlinux.o(.data+0x2e33f0): Section mismatch: reference to .init.data:mts64_ctl_smpte_switch (between 'control.19929' and 'snd_mts64_rawmidi_output_ops')
WARNING: vmlinux.o(.data+0x2e33f8): Section mismatch: reference to .init.data:mts64_ctl_smpte_time_hours (between 'control.19929' and 'snd_mts64_rawmidi_output_ops')
WARNING: vmlinux.o(.data+0x2e3400): Section mismatch: reference to .init.data:mts64_ctl_smpte_time_minutes (between 'control.19929' and 'snd_mts64_rawmidi_output_ops')
WARNING: vmlinux.o(.data+0x2e3408): Section mismatch: reference to .init.data:mts64_ctl_smpte_time_seconds (between 'control.19929' and 'snd_mts64_rawmidi_output_ops')
WARNING: vmlinux.o(.data+0x2e3410): Section mismatch: reference to .init.data:mts64_ctl_smpte_time_frames (between 'control.19929' and 'snd_mts64_rawmidi_output_ops')
WARNING: vmlinux.o(.data+0x2e3418): Section mismatch: reference to .init.data:mts64_ctl_smpte_fps (between 'control.19929' and 'snd_mts64_rawmidi_output_ops')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:00 +01:00
Clemens Ladisch 747c6016ce [ALSA] oxygen: make PCM limits configurable
Add a callback to the model structure to allow modification of the
hardware PCM limits.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:00 +01:00
Clemens Ladisch ccc80fb467 [ALSA] oxygen: add control filter to model struct
Allow the models to modify mixer controls before they are added to the
card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:00 +01:00
Clemens Ladisch e85e09250a [ALSA] oxygen: make all DMA channels configurable
Allow the card models to specify whether each of the hardware DMA
channels is used.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:00 +01:00
Clemens Ladisch 84aa6b7ba7 [ALSA] oxygen: make SPI configuration configurable
Add a field to the model structure so that it is possible to have a card
where the SPI outputs 4 and 5 are used for an EEPROM.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:59 +01:00
Clemens Ladisch 31c77643a0 [ALSA] oxygen: make AC97 codec optional
Only initialize and create mixer controls for the first AC97 codec when
one has actually been detected.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:59 +01:00
Takashi Iwai 12b74c80cc [ALSA] hda-codec - Enable VIA SPDIF input pin
Enable the SPDIF input-pin on VIA codecs when SPDIF-input is enabled
by BIOS.  Also, including a bit code clean up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:59 +01:00
Takashi Iwai 3866f0b0c2 [ALSA] hda-codec - Add the support of Dell OEM laptops with ALC268
Added the support of Dell OEM laptops (Vostro 1200) with ALC268 codec.
The new model=dell is provided.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:59 +01:00
Takashi Iwai f0747ee6c1 [ALSA] hda-codec - Disable PCBEEP mixer element in test model
It turned out that the PCBEEP element (0x1d) is disabled on some hardwares
although it's defined in the datasheet.  Because of the error at info of
this element, the mixer gets totally unusable.
Since the PCBEEP isn't that important feature, it's safer to disable this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:58 +01:00
Takashi Iwai 76e1ddfbda [ALSA] hda-code - Clean up STAC GPIO enablement code
There are two similar GPIO-enablement codes in patch_sigmatel.c.
Let's clean up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:58 +01:00
Tobin Davis bcd7200394 [ALSA] HDA: Enable chipset gcap usage
This patch removes hardcoded values for the number of streams supported
by the southbridge in most chipsets, and reads these values from the
chipset directly.  Most systems are hardwired for 4 streams in each
direction, but newer chipsets change that capability.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:58 +01:00
Clemens Ladisch fb920b7d8b [ALSA] oxygen: rename PCM to Master
Rename the 'PCM Playback Volume'/'Switch' mixer controls to 'Master'.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:58 +01:00
Krzysztof Helt 39516103e6 [ALSA] cs4231: remove one busy wait
This busy_wait is not needed after latest changes
to the cs4231-lib

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:58 +01:00
Clemens Ladisch 893e44ba5a [ALSA] oxygen: make line-in switch exclusive
The line input cannot be mixed with the other inputs, so we have to mute
the other input switches when it is selected.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:57 +01:00
Clemens Ladisch 01a3affb2e [ALSA] oxygen: use an array of snd_kcontrol pointers
Use an array for the pointers to known controls so that it is easier to
add more.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:57 +01:00
Clemens Ladisch 7113e95812 [ALSA] oxygen: fix channel routing
Do not exchange the surround and back jacks except when in 7.1 mode
where the surround jack is not rear but side.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:56 +01:00
Miguel Boton bc9abce0de [ALSA] fix compilation warning in GCC
'snd_shutdown_f_ops' is not a pointer so its address will never be NULL.
GCC will complain because 'fops_get' will do an unnecessary check because
'&snd_shutdown_f_ops' is always true.

Signed-off-by: Miguel Boton <mboton@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:56 +01:00
Takashi Iwai 52a1d4f9d6 [ALSA] hda-codec - Remove obsolete FIXME's
Removed 'FIXME' comments that have been already fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:56 +01:00
Claudio Matsuoka 5795b9e645 [ALSA] hda: Fix 5.1 sound in Dell 6stack ALC888 HDA
This patch fixes 5.1 surround output and headphone detection in the
Dell Inspiron 530 and possibly other Dell systems using the ALC888
codec (mode 6stack-dell).

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:56 +01:00
Andrew Paprocki e25bcdba19 [ALSA] hda_intel: Fix multiple device support by incrementing device count
Fixes multiple device support by incrementing the static device counter
at the end of the azx_probe() call. Without this, subsequent probes would
always use the index specified for the first card.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:55 +01:00
Timur Tabi 17467f2339 [ALSA] Add ASoC drivers for the Freescale MPC8610 SoC
Add the ASoC drivers for the Freescale MPC8610 SoC and the MPC8610 HPCD
reference board.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:55 +01:00
Takashi Iwai ce22e03e62 [ALSA] hda-codec - Don't build boost controls for digital mics
The ALC auto-probe creates mic boost controls automatically for the
probed pins, but it assumes that they are analog mics.  The digital
mics have no boost controls and must be skipped.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:55 +01:00
Takashi Iwai 9c8f2abdc5 [ALSA] hda-codec - print control name in error messages
Print the name of the defect controls in error messages in amp info
callback.  This will make debugging easier.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:55 +01:00
Matthew Ranostay 3fa2ef7468 [ALSA] hda: Add new STAC9205 PCI_QUIRK
Added a new STAC 9205 quirk for Vostro 1500.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:55 +01:00
Jaroslav Kysela 8c12158687 [ALSA] PCM interface - rename SNDRV_PCM_TSTAMP_MMAP to SNDRV_PCM_TSTAMP_ENABLE
Change semantics for SNDRV_PCM_TSTAMP_MMAP. Doing timestamping only in
the interrupt handler might cause that hw_ptr is not related to actual
timestamp. With this change, grab timestamp at every hw_ptr update to
have always valid timestamp + ring buffer position pair.
With this change, SNDRV_PCM_TSTAMP_MMAP was renamed to
SNDRV_PCM_TSTAMP_ENABLE. It's no regression (I think).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:54 +01:00
Matthew Ranostay a64135a2d8 [ALSA] hda: 92HD7XXX power management support
Added support for advanced power management support for output ports on
92HD7xxx family of codecs. Inactive output ports are powered down when
the pin sense  doesn't detect a connection, and powered back up when a
connection is sensed.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:54 +01:00
Takashi Iwai 2134ea4f37 [ALSA] hda-codec - Add virtual master controls
Add master controls using vmaster to codecs that have no real hardware
master volume registers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:54 +01:00
Takashi Iwai 3b0a5f22d4 [ALSA] Add virtual master control helpers
Added helper functions to implement virtual master volume controls.
The virtual master control is a control element that has multiple
slave controls.  The value of master element is equally added to
slave elements.
The functions are written for general purpose, but it's put in the
HD-audio directory as now, since HD-audio driver is the only user.
It should be moved to the common place once after other drivers use
vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:54 +01:00
Ian Molton ab40d4f12c [ALSA] soc - Preliminary ac97 drivers for Toshiba e800 PDAs
Currently only the AUX channel is used (touchscreen)

Signed-off-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:54 +01:00
Ben Dooks 6cab2d3ddd [ALSA] S3C2412: suspend and resume support
Support for suspend/resume for the S3C2412 ASoC IIS
core driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:53 +01:00
Ben Dooks 49646dfa2a [ALSA] ASoC: S3C2412 IIS driver
S3C2412 SoC IIS support for ALSA/ASoC

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:53 +01:00
Graeme Gregory 5cd919a214 [ALSA] soc - Support suspend and resume of the I2S interface on s3c24xx
Signed-off-by: Graeme Gregory <graeme@openmoko.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Graeme Gregory 96d90e1930 [ALSA] soc - Reinitialise DMA on every resume
This one changes the DMA initialisation as it turns out the DMA driver
in s3c24xx doesnt store registers between suspend/resume so you have
to re-initialise the channels on every resume.

Signed-off-by: Graeme Gregory <graeme@openmoko.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Liam Girdwood 2d6a4ac9ee [ALSA] soc - Initial WM8753 TLV support for capture mixer
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Mark Brown 4b67d35504 [ALSA] soc - Don't lock the codec list in snd_soc_dapm_new_widgets()
snd_soc_dapm_new_widgets() takes the codec lock when adding new widgets,
causing lockdep warnings when applications later call down through ALSA
to adjust controls.  Since widgets are only added during probe this lock
should be unneeded so don't take it.
Thanks to Dmitry Baryshkov <dbaryshkov@gmail.com> for reporting this issue.
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Laim Girdwood 9af6d95624 [ALSA] soc - Add support for passing kcontrols with events
Signed-off-by: Laim Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Liam Girdwood 6c59e6c412 [ALSA] soc - Clean up tabs
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Milan plzik 1b075e3f73 [ALSA] soc - Fix power switching support for DAPM_SWITCH widgets
Signed-off-by: Milan plzik <milan.plzik@gmail.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Liam Girdwood 4ccab3e72e [ALSA] soc - Ensure PCMs are suspended
This fixes a bug whereby PCMs were not being suspended when the rest of the
audio subsystem was suspended.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Liam Girdwood 3c1c47e0eb [ALSA] soc - Add D1 power event to power down event sequence
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Philipp Zabel a7a4ac86b4 [ALSA] ASoC TLV support
Add TLV support to ASoC.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Liam Girdwood 0b4d221b8d [ALSA] soc - Add device level DAPM event
Added a device level dapm event so that both the machine and codec are informed
when dapm events occur.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Joe Sauer 7570f29a54 [ALSA] Fix inverted Phone volume WM9712 mixer control
Signed-off-by: Joe Sauer <jsauer@vernier.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:50 +01:00
Matthew Ranostay 2f32d909f3 [ALSA] hda: STAC9228 VT fixes
Moved 2 systems PCI_QUIRK values to STAC_DELL_BIOS. Also the second
front HP jack is incorrect defined in the BIOS VT's for some laptops,
this patch corrects this.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:49 +01:00
Jiang zhe 3d5fa2e596 [ALSA] hda-codec - Device ID for Macbook sound card
Please refer to the [0003680] on ALSA bugtracking system.
The user found that 'model=mbp3' works and provided the ID.
From: Jiang zhe <zhe.jiang@intel.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:49 +01:00
Kailang Yang 8c427226ed [ALSA] hda-codec - Update realtek codec support
1. Support HP rp5700
2. Fixed alc_subsystem_id function (Bug fixed and support Desktop)
3. Support ASUS EP20

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:49 +01:00
Marcin Ślusarz 17596a80d3 [ALSA] rawmidi: let sparse know what is going on _for real_
snd_rawmidi_kernel_read1/write1 weren't annotated but used
copy_to_user/copy_from_user when one of parameters (kernel) was equal to 0
remove it and add properly annotated parameter

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:49 +01:00
Matthew Ranostay a780c0aeb3 [ALSA] hda: 92HD71BXX Mono Mute Support
Added a mono output mute mixer for the 92hd71bxx family of codecs, this
also removes the need for the mono out node to explicitly unmuted in the
core init.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:49 +01:00
Takashi Iwai 9004acc70e [ALSA] Remove sound/driver.h
This header file exists only for some hacks to adapt alsa-driver
tree.  It's useless for building in the kernel.  Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it.  This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:48 +01:00
Takashi Iwai 31e8960b35 [ALSA] Remove PCM sleep_min and tick
The 'tick' in PCM is set (again) via sw_params.  And, nobody uses
this feature at all except for a command line option of aplay.
(This is literally 'nobody', as I checked alsa-lib API calls in all
 programs in major distros.)
Above all, if we need finer wake-ups for the position update, it's
basically an issue that the driver should solve, not tuned by each
application.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:47 +01:00
Takashi Iwai 130755108b [ALSA] PCM - clean up snd_pcm_lib_read/write
Introduce a common helper function for snd_pcm_lib_read and snd_pcm_lib_write
for cleaning up the code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:47 +01:00
Takashi Iwai d948035a92 [ALSA] Remove PCM xfer_align sw params
The xfer_align sw_params parameter has never been used in a sane manner,
and no one understands what this does exactly.  The current
implementation looks also buggy because it allows write of shorter size
than xfer_align.  So, if you do partial writes, the write isn't actually
aligned at all.
Removing this parameter will make some pcm_lib_* code more readable
(and less buggy).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:47 +01:00
Takashi Iwai fa5717f209 [ALSA] Fix PCM write blocking
The snd_pcm_lib_write1() may block in some weird condition:
  - the stream isn't started
  - avail_min is big (e.g. period size)
  - partial write up to buffer_size - avail_min
The patch fixes this invalid blocking problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:46 +01:00
Takashi Iwai 8ace4f3c9d [ALSA] Remove indirect control access
This patch removes the indirect control access to the control elements.
The indirect access has never been used and is even broken on 32bit
ioctl wrapper.  Let's clean it up.
The pointers still remain in snd_ctl_elem_* structs just to make sure
that the struct size won't change.  Once after checking the size
consistency, we can get rid of them, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:46 +01:00
Takashi Iwai 38f8b397e1 [ALSA] hda-codec - Add model=laptop for HP 350 laptop
Added the proper model=laptop for HP 350 laptop with Cxt5045 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:46 +01:00
Jonathan Woithe 86c53bd26b [ALSA] hda-codec - Add test model for ALC268
This implements a test model for the ALC268.  It depends on the feature
added by alc260-test-eapd-0.2.diff.  This patch also adds a mention of
the ALC260 test model to ALSA-Configuration.txt since this seems to have
been missed.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:46 +01:00
Jonathan Woithe f8225f6d1f [ALSA] hda-codec - Add EAPD controls for ALC260 test model
This implements a switch control for the EAPD signal output by the ALC26x
chips.  Since some laptops may utilise this to activate useful things it
is handy to have a control for this in the ALC26x test models.  The patch
includes the control in the ALC260 test model.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:46 +01:00
Jaroslav Kysela a713b58347 [ALSA] PCM core - remove SNDRV_PCM_TSTAMP_MMAP condition in snd_pcm_status()
The condition caused that the returned ring buffer position does not match
with timestamp when SNDRV_PCM_TSTAMP_MMAP mode was enabled. Removing
condition makes unified behaviour and interrupt based timestamp can be
accessed via PCM_IOCTL_SYNC_PTR or mmaped status area.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:46 +01:00
Matthew Ranostay 0678accd2d [ALSA] hda: Dynamically create digital gain mixers
Dynamically create digital gain mixers for dmics that have out-amp
support. Also some 92HD73xx's codecs don't have DMIC gains, so this also
prevents creating dead mixers.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Takashi Iwai 5aba4f8ec7 [ALSA] hda-intel - Support multiple devices
It turned out that there can be multiple HD-audio devices on a single
machine (e.g. on-board audio and HDMI on graphic cards), so we need to
support multiple devices with snd-hda-intel driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Julia Lawall f11b799282 [ALSA] sound: Use time_before, time_before_eq, etc.
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@ change_compare_np @
expression E;
@@
(
- jiffies <= E
+ time_before_eq(jiffies,E)
|
- jiffies >= E
+ time_after_eq(jiffies,E)
|
- jiffies < E
+ time_before(jiffies,E)
|
- jiffies > E
+ time_after(jiffies,E)
)
@ include depends on change_compare_np @
@@
#include <linux/jiffies.h>
@ no_include depends on !include && change_compare_np @
@@
  #include <linux/...>
+ #include <linux/jiffies.h>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Krzysztof Helt 1bc9eed379 [ALSA] es18xx: Enable wavetable input from ESS chips
This patch enables wavetable chips ES689/ES69X connected to
ESS ES18xx chips. The wavetable chip uses FM DAC if the clock signal
from the wavetable is active.
It has no effect if there is no ESS wavetable chip present.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Jerone Young ebf00c54a6 [ALSA] hda-codec - Add IEC958 digital out support for Lenovo Thinkpads T61/X61
This patch adds IEC958 digital out support for the AD1984 sound card.
This card can be found in Lenovo Thinkapds T61/X61. The digital out is
not located on the Thinkpad, but optional docking station (it's coxial
digital out). I've add this support as it is done the exact same way
for the AD1983 & AD1884.
I have tested this patch with my Lenovo Thinkpad T61 hooked up to a
docking station (that has the digital coxial) and then run to my home
theater reciever. Works like a charm :-)

Signed-off-by: Jerone Young <jerone@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Matthew Ranostay c481fca3e6 [ALSA] hda: STAC927x VREF fix
Some laptops incorrectly assume the front input jack as a line in
instead of a microphone in. Which in turn disables the voltage
reference, in which non-amplified input is not possible.  This patch
enables VREF80 for the input jack.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Clemens Ladisch 740eb8358f [ALSA] oxygen: use uintptr_t in pointer casts
When we store the DMA channel number in the substream's private_data
pointer, use uintptr_t as an intermediate step when casting from/to
unsigned int to prevent the compiler from whining when the pointer size
is different.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Andrew Morton 93521d274b [ALSA] sound/usb/usbaudio.c: fix build with CONFIG_PM=n
sound/usb/usbaudio.c: In function 'usb_audio_suspend':
sound/usb/usbaudio.c:3674: error: implicit declaration of function 'snd_pcm_sus\pend_all'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Takashi Iwai 7db756f2b1 [ALSA] hda-codec - Sort ad1986a cfg table
Sort the ad1986a config table by PCI SSID (the last toshiba entry was
added wrongly).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Clemens Ladisch 1b8ff22fa8 [ALSA] add Asus Xonar driver
Add the snd-virtuoso driver for the Asus Virtuoso 200 chip used on the
PCI and PCI-E models of the Xonar sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Clemens Ladisch d0ce9946c5 [ALSA] add CMI8788 driver
Add the snd-oxygen driver for the C-Media CMI8788 (Oxygen) chip, used on
the Asound A-8788, AuzenTech X-Meridian, Bgears b-Enspirer,
Club3D Theatron DTS, HT-Omega Claro, Razer Barracuda AC-1,
Sondigo Inferno, and TempoTec HIFIER sound cards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Jiang Zhe a9b3aa8a0a [ALSA] hda-codec - alc268 input_mux should be a selector instead of mixer
According to the [0003659], the node 0x23,0x24 is a selector.
I checked the alc268 spec on the REALTEK website and it showed that they
were selectors indeed.
However, current code implement the alc268 input_mux in a mixer way.

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:44 +01:00
Jiang Zhe 6b7eb1960d [ALSA] hda-codec - Device ID for Toshiba laptop which uses AD1986A
The model laptop-eapd get rid of the high-pitched noise.
(ALSA bug#3662)

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:43 +01:00
Herton Ronaldo Krzesinski 6e7939bb4d [ALSA] hda-codec - Fix capture mixers of ALC662 models
The commit that added support for ASUS P701 eeepc also changed the
mixers of other ALC662 models, duplicating entries for the Capture
items, making them to not work anymore. This fixes it by removing
duplicated entries using where possible the common alc662_capture_mixer.
Also alc662_capture_mixer should use alc662* functions and not alc882
(I checked /proc/asound/card0/codec* on an eepc model and it's ok).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:43 +01:00
Harald Welte aa9673cf31 [ALSA] neo1973: ASoC include pathname fix
Fix s3c24xx include file path changes in asoc driver

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:43 +01:00
Clemens Ladisch 358ce0cf3f [ALSA] usb-audio: add UR-80 PCM quirk
Add a quirk entry to handle Edirol UR-80 audio I/O.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:43 +01:00
Andrew Paprocki 3982d17e3d [ALSA] hda-codec - Add missing #defines (and 1 rename) in hda_codec.h
Added AC_VERB_GET_DIGI_CONVERT_2 and renamed AC_VERB_GET_DIGI_CONVERT to
AC_VERB_GET_DIGI_CONVERT_1 to stay consistent with the SET variants. Added
AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK, AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK,
and AC_PINCAP_LR_SWAP. The missing fields were listed in the ALC883 datasheet
rev 1.3.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:42 +01:00
Takashi Iwai 1697055e6c [ALSA] hda-codec - Fix invalid access to non-existing dmux on STAC
The digital mux on STAC codecs doesn't always exist although the
driver builds dmux enum mixer elements unconditionally.
Now the driver creates 'digital input source' mixer elements only
when dmux is available.
Also, the patch adds the missing dmux definition for STAC925x.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:42 +01:00
Timur Tabi 8432395fd9 [ALSA] cs4270: wrong sample rate when CONFIG_SND_SOC_CS4270_VD33_ERRATA is set
When CONFIG_SND_SOC_CS4270_VD33_ERRATA is set, there was a mismatch between
the mclk_ratios[] and cs4270_mode_ratios[] arrays.  The two arrays have been
merged and code has been shuffled.  One side effect is that the
cs4270_set_dai_sysclk() and cs4270_set_dai_fmt() functions are available only
if I2C has been enabled.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:42 +01:00
Joe Perches 561de31a23 [ALSA] sound/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:41 +01:00
Hans-Christian Egtvedt f488d9fcc8 [ALSA] at73c213: replace spinlock in mixer functions with a mutex
This patch fixes the locking bug in the at73c213 SPI sound driver. This bug was
triggered because spinlocks were wrapped around the spi_sync call which might
sleep. The fix was to add a mutex to the sound driver and replace the spinlocks
in the mixer functions with mutex lock/unlock.
Tested on STK1000/STK1002.

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:39 +01:00
Takashi Iwai ac3e37412c [ALSA] hda-codec - sort pci quirk list
Sort pci quirk list in the order of PCI SSID.
This makes easier to find out the buggy duplicated entries.
Thanks to Andy Shevchenko for providing the sort script.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:37 +01:00
Takashi Iwai f78dfac904 [ALSA] Add missing device link
Added the missing link to struct device from the card instance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:37 +01:00
Takashi Iwai 48ecb7e879 [ALSA] hda-codec - Avoid overload of PCM volume on Cx5045 codec
The PCM volume of Cx5045 codec has overload that isn't useful but
rather harmful.  Add a hack to override the amp info to set the max
level 0 dB.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:37 +01:00
Matthew Ranostay 8e9068b1c7 [ALSA] hda: STAC927x DMIC Cleanup
Cleaned up STAC927x and added several subsystem id's for more laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
Andrew Paprocki 38fcaf8efc [ALSA] hda-codec - Fix definition of AC_KNBCAP_DELTA to match spec
AC_KNBCAP_DELTA is incorrectly defined as (1<<8). According to the Intel
HDA spec, this is bit 7 after AC_KNBCAP_NUM_STEPS which is a 0x7f mask.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
Takashi Iwai 5a7f261921 [ALSA] Add SNDRV_PCM_IOCTL_TSTAMP back to compat ioctl
The replaced one should be re-added for older alsa-lib.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
Jaroslav Kysela 28e9e47384 [ALSA] PCM - added back TSTAMP ioctl for PCM (for old alsa-lib binaries)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
Oliver Neukum f85bf29c94 [ALSA] usb audio suspend support
This patch implements suspend/resume support for USB audio devices.
It works with the microphone in my camera.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
David Dillow 175859bf16 [ALSA] sis7019: support the SiS 7019 Audio Accelerator
Basic audio support for the SiS 7019 Audio Accelerator as found in the
SiS 55x SoC. There is currently no synth support at the moment, but
audio playback and capture with two periods per buffer has seen
extensive use. Arbitrary period and buffer sizes (with multiple periods
per buffer) have seen light testing, but are believed to be production
ready.

Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:36 +01:00
Marcin Ślusarz 3b378e1f7e [ALSA] sound/core/seq: move declarations of globally visible variables to proper headers
sound/core/seq: move declarations of globally visible variables to proper headers

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Marcin Ślusarz 36b9cdfea6 [ALSA] info_oss: move prototype of snd_card_info_read_oss to info.h
info_oss: move prototype of snd_card_info_read_oss to info.h

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Marcin Ślusarz 67c393172c [ALSA] pcm_lib: fix sparse warning about different signedness
pcm_lib: fix sparse warning about different signedness

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Marcin Ślusarz be3e0115e3 [ALSA] pcm_lib: fix sparse warning about shadowing 'n' symbol
pcm_lib: fix sparse warning about shadowing 'n' symbol

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Marcin Ślusarz 757d5a7561 [ALSA] via82xx: minor optimization in snd_via82xx_free
via82xx: minor optimization in snd_via82xx_free
don't check X, when we just checked !X before goto

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Marcin Ślusarz b05e578740 [ALSA] pcm_native: fix sparse warning about shadowing 'state' symbol
pcm_native: fix sparse warning about shadowing 'state' symbol

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Takashi Iwai cd0b4ac839 [ALSA] sb16 - Suppress compile warning
sound/isa/sb/sb16_csp.c: In function ‘snd_sb_csp_new’:
sound/isa/sb/sb16_csp.c:121: warning: ‘version’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Andrew Morton 5050b0921a [ALSA] copy_ctl_value_from_user() warning fix
sound/core/control_compat.c: In function 'copy_ctl_value_from_user':
sound/core/control_compat.c:222: warning: 'count' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Takashi Iwai 6b587ef9a1 [ALSA] Fix old tstamp ioctl for compat_ioctl
Replaced the old SNDRV_PCM_IOCTL_TSTAMP with the new one in
PCM compat_ioctl.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Matthew Ranostay 541eee8768 [ALSA] hda: Added more 92HD71 codecs
Added more codecs to the 92HD71 family, as well as support for several
that don't have an analog mixer.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Matthew Ranostay 71685b90d2 [ALSA] hda: 92HD73 DMIC Amps
Changed hardware gain mixers for the digital mic's from HDA_OUTPUT to
HDA_INPUT.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Johannes Stezenbach 695005cfe4 [ALSA] hda-intel: Enable Analog CD Input from internal ATAPI connector on Asus M2N-SLI
Enable Analog CD Input from internal ATAPI connector on Asus M2N-SLI.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Matthew Ranostay e1f0d66908 [ALSA] hda: Added STAC92HD73 support
Added support for new STAC92HD73 family of codecs. Additionally added
features for multiple analog loopbacks, and multiple dmux mixers.
Regression testing for the analog loopback changes for STAC9205 and
STAC9274D completed with any issues, as well for the dmux changes.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:34 +01:00
Andy Shevchenko a8848bd647 [ALSA] hda-codec - Initial support of the Mitac 8252D (based on ALC883)
The attached patch adds initial support of the Mitac 8252D
(http://www.mitac-mtc.com.tw/English/products/8252Dspec.htm).
Working:
 - Front speakers (volume + mute)
 - Center/LFE speakers (volume + mute)
 - HP out (with Front Volume)
 - HP individual mute switch
 - HP Jack sense
 - Front Mic and its volume
Not tested:
 - external mic and its volume
Not working while now:
 - Mic Jack sense
Questionable:
 - is Mic have Jack sense?
 - one or two Mic volume controls?
 - CD/Line-in: presense in the mixer

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:33 +01:00
Kailang Yang f6a92248ae [ALSA] hda-codec - Add ALC889/ALC267/ALC269 support
Added the support of new Realtek codecs:
1. New ALC889 Support
2. New ALC267 Support
3. New ALC269 Support

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:33 +01:00
Josepch Chan f7278fd0a5 [ALSA] hda-codec - Add support for VIA VT1708B HD audio codec
This patch adds support for VIA new HD audio codec, VT1708B.

Signed-off-by: Josepch Chan <josephchan@via.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:33 +01:00
Nick Piggin eb415b8f6d [ALSA] alsa: usx2y nopage
Convert alsa usx2y driver from nopage to fault.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:32 +01:00
Nick Piggin 3ad5afcd5f [ALSA] alsa: nopage
Convert ALSA from nopage to fault.
Switch from OOM to SIGBUS if the resource is not available.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:32 +01:00
Takashi Iwai bba8dee782 [ALSA] hda-codec - Device ID for MSI L745
Added the model targa-2ch-dig for MSL L745 (ALSA bug#3641).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:31 +01:00
Jaroslav Kysela 67a7be7e9c [ALSA] PCM - fixed SNDRV_PCM_FORMAT_U24_BE silence constant
Reported by Timur Tabi <timur@freescale.com> .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:31 +01:00
Jaroslav Kysela b751eef1fd [ALSA] Use posix clock monotonic for PCM and timer timestamps
We need an accurate and continuous (monotonic) time sources to do
accurate synchronization among more timing sources. This patch allows
to enable monotonic timestamps for ALSA PCM devices and enables monotonic
timestamps for ALSA timer devices.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:31 +01:00
Clemens Ladisch 25543fa785 [ALSA] cmipci: document 'Modem' control version check
Add a comment that explains why the 'Modem' control doesn't work with
newer chips.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:31 +01:00
Clemens Ladisch 69a07304d5 [ALSA] cmipci: disable 'Modem' control on version 39 or newer chips
On version 39 or newer chips, we better remove the 'Modem' control
because this register bit now mutes the front channels of the
multichannel stream.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:31 +01:00
Takashi Iwai befceea90b [ALSA] echoaudio - convert from semaphore to mutex
Converted from semaphore to mutex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:31 +01:00
Andy Shevchenko e3cde64af4 [ALSA] hda-codec - Fix typo in the ALC883 initial code
The attached patch should fix typo in auto initialization verbs for ALC883
codec.

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:30 +01:00