Commit Graph

75 Commits

Author SHA1 Message Date
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 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
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 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
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
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
Clemens Ladisch 7c0141591f [ALSA] virtuoso: monitor external power on D2X
On the Xonar D2X, monitor the GPIO pin that indicates whether external
power is present.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:18 +01:00
Clemens Ladisch a360156049 [ALSA] oxygen: add front panel controls
Add mixer controls for the front panel AC97 codec.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:17 +01:00
Clemens Ladisch 911b499af4 [ALSA] oxygen: make line-in exclusive only on Xonar
Move the line input switching code to the Virtuoso driver because only
the Xonar cards bypass the analog mixer for line input.

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