aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-09-22ALSA: oxygen: add probe callbackClemens Ladisch1-1/+2
Add a probe callback to the model structure so that model-specific drivers can refine their model detection before the card is initialized. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-08-29ALSA: oxygen: fix distorted output on AK4396-based cardsClemens Ladisch1-0/+4
When changing the sample rate, the CMI8788's master clock output becomes unstable for a short time. The AK4396 needs the master clock to do SPI writes, so writing to an AK4396 control register directly after a sample rate change will garble the value. In our case, this leads to the DACs being misconfigured to I2S sample format, which results in a wrong output level and horrible distortions on samples louder than -6 dB. To fix this, we need to wait until the new master clock signal has become stable before doing SPI writes. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-19[ALSA] oxygen: add PM supportClemens Ladisch1-0/+12
Add suspend/resume support. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19[ALSA] oxygen: separate out hardware initialization codeClemens Ladisch1-7/+19
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[ALSA] oxygen: simplify DAC volume initializationClemens Ladisch1-14/+13
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[ALSA] oxygen: save register writesClemens Ladisch1-3/+14
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[ALSA] oxygen: fix version in MODULE_LICENSEClemens Ladisch1-1/+1
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-04-24[ALSA] oxygen: generalize DAC volume TLV handlingClemens Ladisch1-11/+2
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[ALSA] oxygen: mute by defaultClemens Ladisch1-3/+3
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[ALSA] oxygen: generalize handling of DAC volume limitsClemens Ladisch1-0/+4
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[ALSA] oxygen: fix line-in recording selection (now for real)Clemens Ladisch1-33/+0
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[ALSA] oxygen: move MIDI flag to model structClemens Ladisch1-1/+2
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[ALSA] oxygen: make SPI/2-wire configuration model-specificClemens Ladisch1-2/+4
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[ALSA] oxygen: change model-specific PCM device configurationClemens Ladisch1-10/+12
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[ALSA] oxygen: move WM8785 symbols to a header fileClemens Ladisch1-41/+1
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-02-22[ALSA] oxygen: fix line-in recording selectionClemens Ladisch1-0/+35
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-01-31[ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785Clemens Ladisch1-2/+2
While the AK4396 and WM8785 datasheets say that the SPI clock cycle length must be at least 200 ns, 320 ns seems not to work reliably with the controller, so we better use 160 ns. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] oxygen: fix AK4396 double rate upper limitClemens Ladisch1-1/+1
Fix the upper sample rate limit for the double rate mode of the AK4396 to the value from the datasheet. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] add TempoTec HiFier driverClemens Ladisch1-42/+1
Add a driver for the MediaTek/TempoTec HiFier Fantasia sound card. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] oxygen: make the number of analog output configurableClemens Ladisch1-0/+2
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[ALSA] oxygen: remove MIDI for generic cardsClemens Ladisch1-3/+4
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[ALSA] oxygen: move model-specific data out of common headerClemens Ladisch1-5/+15
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[ALSA] oxygen: reduce SPI clock frequency for AK4396/WM8785Clemens Ladisch1-2/+2
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[ALSA] oxygen: allow more sample rates with WM8785Clemens Ladisch1-17/+4
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[ALSA] oxygen: add more symbolsClemens Ladisch1-33/+105
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[ALSA] oxygen: remove MIDI autodetectionClemens Ladisch1-1/+1
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[ALSA] oxygen: add register definitionsClemens Ladisch1-4/+7
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[ALSA] oxygen: make the I2S format configurableClemens Ladisch1-0/+4
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[ALSA] oxygen: make PCM limits configurableClemens Ladisch1-0/+13
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[ALSA] oxygen: add control filter to model structClemens Ladisch1-2/+12
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[ALSA] oxygen: make all DMA channels configurableClemens Ladisch1-1/+10
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[ALSA] oxygen: make SPI configuration configurableClemens Ladisch1-0/+2
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[ALSA] oxygen: fix channel routingClemens Ladisch1-3/+3
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[ALSA] Remove sound/driver.hTakashi Iwai1-1/+0
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[ALSA] add CMI8788 driverClemens Ladisch1-0/+314
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>