summaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.h
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: oxygen: modify the SPI writing functionRoman Volkov2014-01-291-1/+1
| | | | | | | | | | | | | Modify the oxygen_write_spi() function to use the newly introduced oxygen_wait_spi() function. Change return value from void to int, so it can return error codes. Older drivers just ignore that return value, new drivers can check this value. We need to wait AFTER initiating the SPI transaction, otherwise read operation will not work. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEPTakashi Iwai2012-08-141-1/+1
| | | | | | Otherwise we may get compile warnings due to unused functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Convert to new pm_ops for PCI driversTakashi Iwai2012-07-031-2/+1Star
| | | | | | | | | | Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: fix output routing on Xonar DGClemens Ladisch2011-01-311-0/+2
| | | | | | | | | | This card uses separate I2S outputs for the front speakers and headphones, and reverses the order of the three speaker outputs. To work around this, add a model-specific callback to adjust the controller's playback routing. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: do not show chip revision in card longnameClemens Ladisch2011-01-101-1/+0Star
| | | | | | | | Apparently, the revision is 2 on all sold sound cards, so this information is not actually useful. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: simplify model-specific MCLK handlingClemens Ladisch2011-01-101-4/+6
| | | | | | | | | Replace the get_i2s_mclk callback with tables of MCLK values. This simplifies the MCLK-handling code in both the framework and the model- specific drivers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: remove oxygen_model::private_data fieldClemens Ladisch2011-01-101-1/+0Star
| | | | | | | | The number of DACs can now be deduced from the dac_channels_mixer field, so the private_data field is no longer needed. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: allow different number of PCM and mixer channelsClemens Ladisch2011-01-101-1/+2
| | | | | | | | | For cards like the Xonar HDAV1.3, differentiate between the number of PCM channels that can be played and the number of channels whose volume can be adjusted. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: allow to dump codec registersClemens Ladisch2010-12-061-0/+3
| | | | | | | | To help with debugging, add the registers of the model-specific codecs to the controller and AC97 register dump in the proc file. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: virtuoso: fix front panel routing for D1/DX/ST(X)Clemens Ladisch2010-12-061-0/+1
| | | | | | | | | | | | | | The "Front Panel" switch on the Xonar D1/DX actually switches only the output direction, so mark it appropriately. The front panel microphone is controlled by the FMIC2MIC bit of the CM9780. It was unconditionally enabled on the D1/DX and never set on the ST(X); add a control for it. Selecting the front panel microphone as source does not actually disable the microphone jack, but this is bug-compatible with the Windows driver, and users rely on it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxygen: handle CD input configuration with a flagClemens Ladisch2010-10-051-0/+1
| | | | | | | | | There are more models without a CD input than with one, so handle this explicitly with a device_config flag to avoid having to define a control filter callback to filter it out. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: virtuoso: work around missing reset in the Xonar DS Windows driverClemens Ladisch2010-09-081-0/+1
| | | | | | | | | | | | | | | | For the WM8776 chip, this driver uses a different sample format and more features than the Windows driver. When rebooting from Linux into Windows, the latter driver does not reset the chip but assumes all its registers have their default settings, so we get garbled sound or, if the output happened to be muted before rebooting, no sound. To make that driver happy, hook our driver's cleanup function into the shutdown notifier and ensure that the chip gets reset. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-and-tested-by: Nathan Schagen Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: oxygen: allow custom MCLK ratesClemens Ladisch2009-09-281-0/+4
| | | | | | | | Add a callback that allows model drivers to modify the default I2S MCLK rate. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: oxygen: add stereo upmixing to center/LFE channelsClemens Ladisch2009-09-281-0/+1
| | | | | | | | | Add the possibility to route a mix of the two channels of stereo data to the center and LFE outputs. This is implemented only for models where the DACs support this, i.e., for the Xonar D1 and DX. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: oxygen: automatically restore overwritten EEPROMClemens Ladisch2009-02-191-0/+3
| | | | | | | | | | | | 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>
* sound: oxygen: handle cards with broken EEPROMClemens Ladisch2009-02-191-3/+14
| | | | | | | | | | | | | | | | | 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>
* sound: oxygen: make the owner module a parameter of the probe functionClemens Ladisch2009-02-191-1/+1
| | | | | | | | | | | 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>
* ALSA: oxygen: add UART I/O functionsClemens Ladisch2008-09-221-0/+6
| | | | | | | 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>
* ALSA: oxygen: configure MIDI via device_configClemens Ladisch2008-09-221-8/+13
| | | | | | | | 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>
* ALSA: oxygen: rename pcm_dev_cfgClemens Ladisch2008-09-221-1/+1
| | | | | | | 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>
* ALSA: oxygen: add probe callbackClemens Ladisch2008-09-221-1/+3
| | | | | | | 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>
* ALSA: oxygen: use a copy of the model structClemens Ladisch2008-09-221-36/+36
| | | | | | | | 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>
* [ALSA] oxygen: add PM supportClemens Ladisch2008-05-191-0/+6
| | | | | | | Add suspend/resume support. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] oxygen: save register writesClemens Ladisch2008-05-191-0/+6
| | | | | | | | | 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>
* [ALSA] oxygen: add symbol for I/O space sizeClemens Ladisch2008-05-191-0/+2
| | | | | | | | 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>
* [ALSA] oxygen: generalize DAC volume TLV handlingClemens Ladisch2008-04-241-0/+1
| | | | | | | | 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>
* [ALSA] oxygen: generalize handling of DAC volume limitsClemens Ladisch2008-04-241-0/+2
| | | | | | | | 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>
* [ALSA] virtuoso: correctly switch input jack on Xonar DXClemens Ladisch2008-04-241-0/+2
| | | | | | | | | | When selecting the capture source on the Xonar DX, the input jack must be routed to either the line input or the microphone input by setting a GPIO pin. This requires an additional callback so that the model driver can hook into the toggling of AC97 switches. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] oxygen: add I2C supportClemens Ladisch2008-04-241-0/+1
| | | | | | | Add a function to write I2C registers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] oxygen: fix line-in recording selection (now for real)Clemens Ladisch2008-04-241-2/+0Star
| | | | | | | | 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>
* [ALSA] oxygen: move MIDI flag to model structClemens Ladisch2008-04-241-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>
* [ALSA] oxygen: change model-specific PCM device configurationClemens Ladisch2008-04-241-1/+11
| | | | | | | | | | 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>
* [ALSA] virtuoso: monitor external power on D2XClemens Ladisch2008-01-311-0/+2
| | | | | | | | 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>
* [ALSA] oxygen: add front panel controlsClemens Ladisch2008-01-311-1/+1
| | | | | | | 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>
* [ALSA] oxygen: use AC97 interruptClemens Ladisch2008-01-311-0/+2
| | | | | | | | After an AC97 register read or write, use the AC97 interrupt instead of polling to wait for the access to be completed. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] oxygen: make line-in exclusive only on XonarClemens Ladisch2008-01-311-0/+2
| | | | | | | | 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>
* [ALSA] oxygen: make the number of analog output configurableClemens Ladisch2008-01-311-0/+1
| | | | | | | | 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>
* [ALSA] oxygen: move model-specific data out of common headerClemens Ladisch2008-01-311-1/+2
| | | | | | | | | 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>
* [ALSA] oxygen: add more symbolsClemens Ladisch2008-01-311-1/+1
| | | | | | | 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>
* [ALSA] oxygen: remove MIDI autodetectionClemens Ladisch2008-01-311-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>
* [ALSA] oxygen: make the I2S format configurableClemens Ladisch2008-01-311-0/+2
| | | | | | | | 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>
* [ALSA] oxygen: make PCM limits configurableClemens Ladisch2008-01-311-0/+3
| | | | | | | | 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>
* [ALSA] oxygen: add control filter to model structClemens Ladisch2008-01-311-3/+2Star
| | | | | | | | 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>
* [ALSA] oxygen: make all DMA channels configurableClemens Ladisch2008-01-311-1/+1
| | | | | | | | 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>
* [ALSA] oxygen: make SPI configuration configurableClemens Ladisch2008-01-311-0/+1
| | | | | | | | 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>
* [ALSA] oxygen: make AC97 codec optionalClemens Ladisch2008-01-311-1/+2
| | | | | | | | 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>
* [ALSA] oxygen: make line-in switch exclusiveClemens Ladisch2008-01-311-0/+4
| | | | | | | | 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>
* [ALSA] oxygen: use an array of snd_kcontrol pointersClemens Ladisch2008-01-311-2/+7
| | | | | | | | 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>
* [ALSA] add CMI8788 driverClemens Ladisch2008-01-311-0/+167
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>