aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/oxygen
AgeCommit message (Collapse)Author
2009-05-25sound: virtuoso: add Xonar Essence ST supportClemens Ladisch
Add support for the Asus Xonar Essence ST and its daughterboard. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25sound: virtuoso: enable HDAV S/PDIF inputClemens Ladisch
The Xonar HDAV1.3 has a digital input jack, so enable the corresponding device. This is not related to the HDMI stuff, which stays unsupported. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25sound: virtuoso: add another DX PCI IDClemens Ladisch
Add another PCI ID for a second revision of the Xonar DX. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25sound: oxygen: reset DMA when stream is closedClemens Ladisch
When a PCM stream is closed, flush the corresponding DMA channel. Otherwise, the DMA controller would continue to output the last sample which would result in a DC offset on the output. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-09sound: oxygen: enable headphone output on Claro cardsClemens Ladisch
On the HT-Omega Claro (halo) sound cards, the headphone amplifier must be enabled explicitly by setting a GPIO bit. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-27sound: oxygen: zero-initialize model dataClemens Ladisch
Model drivers assume that model_data is zeroed, so we better use kzalloc() (like we did before when it was allocated together with the card structure). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-26sound: virtuoso: add Xonar Essence STX supportClemens Ladisch
Add support for the Asus Xonar Essence STX sound card. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20sound: virtuoso: increase minimum volume to -60 dBClemens Ladisch
Use -60 dB as the minimum value of the master volume mixer control. While the DACs would support ranges down to about -120 dB, such attenuations are not useful in practice. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20sound: oxygen: handle AK5385 ADC on Claro halo cardsClemens Ladisch
The HT-Omega Claro halo's ADC is an AK5385 instead of a WM8785, so we should handle the ADC parameters as we do with the X-Meridian. Using the code for the wrong ADC does not seem to have any audible effects, and the Windows driver does it, but it is nonetheless a good idea to run the AK5385 with an oversampling ratio that is not outside the documented limits. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19sound: oxygen: automatically restore overwritten EEPROMClemens Ladisch
If the EEPROM was partially overwritten (which seems to happen before the OS is booted), restore its entire contents by deducing it from the remaining information. This does not have any effect on the Linux driver, which works even with incomplete information in the EEPROM, but it makes other drivers work again. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19sound: oxygen: handle cards with broken EEPROMClemens Ladisch
Under as yet unknown circumstances, the first word of the sound card's EEPROM gets overwritten. When this has happened, we cannot rely on the subsystem IDs that the kernel reads from the PCI configuration registers. Instead, we read the IDs directly from the EEPROM and do the ID matching manually. Because the model-specific driver cannot determine the model before calling oxygen_pci_probe(), that function now gets a get_model() callback as parameter. The customizing of the model structure, which was formerly done by the probe() callback, also has moved into get_model(). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19sound: oxygen: use static driver nameClemens Ladisch
When allocating resources, use a fixed name instead of reading it from the model structure. This allows us to allocate the resources before the actual model is known. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19sound: oxygen: allocate model_data dynamicallyClemens Ladisch
Allocate the model-specific data dynamically instead of including it in the memory block of the card structure. This will allow us to determine the actual model after the card creation. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19sound: oxygen: make the owner module a parameter of the probe functionClemens Ladisch
Move the owner field out of the oxygen_model structure and make it a parameter of oxygen_pci_probe(), because the actual owner module does not depend on the card model. Furthermore, moving it out of the model structure allows us to create the card structure before the actual model is known. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19Merge branch 'topic/snd_card_new-err' into topic/oxygenTakashi Iwai
2009-02-19sound: virtuoso: revert "do not overwrite EEPROM on Xonar D2/D2X"Clemens Ladisch
This reverts commit 7e86c0e6850504ec9516b953f316a47277825e33 ("do not overwrite EEPROM on Xonar D2/D2X") because it did not actually help with the problem. More user reports show that the overwriting of the EEPROM is not triggered by using this driver but by installing Linux, and that the installation of any other operating system (even one without any CMI8788 driver) has the same effect. In other words, the presence of this driver does not have any effect on the occurrence of the error. (So far, the available evidence seems to point to a BIOS bug.) Furthermore, it turns out that the EEPROM chip is protected against stray write commands by the command format and by requiring a separate write-enable command, so the error scenario in the previous commit (that SPI writes can be misinterpreted as an EEPROM write command) is not even theoretically possible. The mixer control that was removed as a consequence of the previous commit can only be partially emulated in userspace, which also means it cannot be seen be the in-kernel OSS API emulation, so it is better to revert that change. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-19sound: virtuoso: add newlineClemens Ladisch
Add a missing newline. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-19sound: virtuoso: enable UART on Xonar HDAV1.3Clemens Ladisch
This hardware has a better chance of working correctly if we don't forget to enable it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-15sound: virtuoso: do not overwrite EEPROM on Xonar D2/D2XClemens Ladisch
On the Asus Xonar D2 and D2X models, the SPI chip select signal for the fourth DAC shares its pin with the serial clock for the EEPROM that contains the PCI subdevice ID values. It appears that when DAC registers are written and some other unknown conditions occur (probably noise on the EEPROM's chip select line), the EEPROM gets overwritten with garbage, which makes it impossible to properly detect the card later. Therefore, we better avoid DAC register writes and make sure that the driver works with the DAC's registers' default values. Consequently, the sample format is now I2S instead of left-justified (no user-visible change), and the DAC's volume/mute registers cannot be used anymore (volume changes are now done by the software volume plugin). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in sound/pci/*Takashi Iwai
Convert from snd_card_new() to the new snd_card_create() function in sound/pci/*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28ALSA: oxygen: add Claro halo supportClemens Ladisch
Add support for the HT-Omega Claro halo (XT). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-09-24ALSA: oxygen: wait for ACK when resetting UARTClemens Ladisch
After sending a reset command to the UART, wait some time for the ACK to be generated (and to be read and dropped by the interrupt handler) before sending the next command. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: virtuoso: add Xonar HDAV1.3 supportClemens Ladisch
Add support for the Asus Xonar HDAV1.3 and the Xonar HDAV1.3 Deluxe. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: rename first PCM deviceClemens Ladisch
Rename the first PCM device from "Analog" to "Multichannel" because it can be used for HDMI output on the Xonar HDAV. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: virtuoso: rename AC97 callback functionClemens Ladisch
Rename the callback function that switches between line and mic inputs on the Xonar D1 because it is also usable on other models. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: virtuoso: make number of PCM1796 DACs configurableClemens Ladisch
Do not use a hardcoded number when iterating over the PCM1796 DACs to allow for cards with a different number of analog output channels. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: virtuoso: allow I2C-connected PCM1796Clemens Ladisch
Add support for PCM1796 chips that are connected with an I2C bus instead of SPI. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: add self-documenting functionsClemens Ladisch
Introduce some trivial functions to better document the relationships of the various model callbacks. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: add UART I/O functionsClemens Ladisch
Add functions to allow model drivers to communicate with external chips by doing I/O with the not-used-for-MIDI UART. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: configure MIDI via device_configClemens Ladisch
To enable the MIDI port, model drivers must now set flags in device_config, not only in misc_flags. This allows model drivers to enable the UART without creating an ALSA MIDI device. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: rename pcm_dev_cfgClemens Ladisch
Rename the pcm_dev_cfg field to device_config because there will be additional flags that do not describe PCM devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: virtuoso: create common functions for GPIO bit switch controlsClemens Ladisch
Factor out the common code of the mixer callbacks that handle controls that just switch a single GPIO bit. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: virtuoso: handle D2X/DX dynamicallyClemens Ladisch
The Xonar D2X and DX are very similar to the D2 and D1, respectively, so we can handle the differences dynamically instead of using a separate model structure for each one. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: handle X-Meridian dynamicallyClemens Ladisch
Handle the differences between the X-Meridian and the other models in the probe callback instead of using a second model structure. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: remove X-Meridian magic numberClemens Ladisch
Introduce symbols that indicate the two models handled by the snd-oxygen driver, instead of using a magic number. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: add probe callbackClemens Ladisch
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-09-22ALSA: oxygen: use a copy of the model structClemens Ladisch
Put a copy of the model structure into the chip structure so that model- specific drivers can modify it depending on a particular device instance. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22ALSA: oxygen: use SPDIF channel status symbolsClemens Ladisch
When setting the SPDIF channel status sample rate field, use the recently defined symbols instead of magic numbers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-08-29ALSA: oxygen: fix distorted output on AK4396-based cardsClemens Ladisch
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-08-26ALSA: oxygen: prevent muting of nonexistent AC97 controlsClemens Ladisch
The Xonar DX does not have CD Capture controls, so we have to check that a control actually exists before muting it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-14ALSA: virtuoso: add Xonar D1 supportClemens Ladisch
Add support for the Asus Xonar D1. It is the same as the DX, but without the external power detection. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-19[ALSA] virtuoso: restrict period time to less than 10 sClemens Ladisch
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[ALSA] oxygen: add symbols for buffer/period size constraintsClemens Ladisch
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[ALSA] oxygen: add PM supportClemens Ladisch
Add suspend/resume support. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19[ALSA] virtuoso: add xonar_enable_output()Clemens Ladisch
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[ALSA] oxygen: separate out hardware initialization codeClemens Ladisch
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 Ladisch
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 Ladisch
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: add symbol for I/O space sizeClemens Ladisch
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[ALSA] oxygen: fix version in MODULE_LICENSEClemens Ladisch
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>