Commit Graph

282 Commits

Author SHA1 Message Date
Clemens Ladisch b78e3dbb04 [ALSA] oxygen: more initialization
Initialize more registers of the controller and the second AC97 codec.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:15 +01:00
Clemens Ladisch 976cd62700 [ALSA] oxygen: make the number of analog output configurable
Add a field to struct oxygen_model to allow model drivers for cards with
less than eight output channels.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:14 +01:00
Clemens Ladisch cd93dc8cca [ALSA] oxygen: remove MIDI for generic cards
None of the reference design models have MIDI, only the X-Meridian
allows to connect a MIDI adapter.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:13 +01:00
Clemens Ladisch 33c646e4ff [ALSA] oxygen: fix SPDIF input rates
Fix up SPDIF input sample rates again: 32 kHz and 64 kHz are not
supported.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:13 +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
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
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
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
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
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
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
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
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
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