summaryrefslogtreecommitdiff
path: root/sound/pci/oxygen
AgeCommit message (Collapse)Author
2008-04-24[ALSA] Fix synchronize_irq() bugs, redundanciesJeff Garzik
free_irq() calls synchronize_irq() for you, so there is no need for drivers to manually do the same thing (again). Thus, calls where sync-irq immediately precedes free-irq can be simplified. However, during this audit several bugs were noticed, where free-irq is preceded by a "irq >= 0" check... but the sync-irq call is not covered by the same check. So, where sync-irq could not be eliminated completely, the missing check was added. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] oxygen: generalize DAC volume TLV handlingClemens Ladisch
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 Ladisch
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 Ladisch
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] hifier: remove empty hifier_mixer_init()Clemens Ladisch
The empty hifier_mixer_init() function is useless; remove it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: fix DX front panel I/OClemens Ladisch
Fix the GPIO 1 mixer control to enable I/O through the front panel connector of the Xonar DX. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: initialize two-wire control registerClemens Ladisch
On the Xonar DX, initialize all bits of the two-wire control register. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: add GPIO 1 mixer controlClemens Ladisch
Add a mixer control for switching whatever it is that is connected to GPIO pin 1 on the Xonar DX. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] oxygen: use SPDIF input only if presentClemens Ladisch
If the card model does not have a digital input or an AC97 codec, disable the respective interrupt and mixer controls. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: correctly switch input jack on Xonar DXClemens Ladisch
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>
2008-04-24[ALSA] virtuoso: add Xonar DX supportClemens Ladisch
Add support for the Asus Xonar DX. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: fix typoClemens Ladisch
Fix a (fortunately harmless) typo. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: change card short nameClemens Ladisch
Change the card short name to show to show the card name instead of the chip name. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: set PCM1796 oversampling rateClemens Ladisch
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[ALSA] virtuoso: move some code to xonar_common_init()Clemens Ladisch
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[ALSA] virtuoso: allow both CS5381 and CS5361Clemens Ladisch
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[ALSA] virtuoso: separate D2/D2X init functionsClemens Ladisch
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[ALSA] oxygen: add I2C supportClemens Ladisch
Add a function to write I2C registers. 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 Ladisch
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: disable clock of unused I2S inputsClemens Ladisch
Disable the master clock outputs of any unused I2S inputs. 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 Ladisch
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 Ladisch
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 Ladisch
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: add monitor controlsClemens Ladisch
Add controls to enable monitoring of the analog and digital inputs. To allow monitoring after loading the driver when nothing has been played back or recorded yet, the I2S input and outputs are initialized to a valid configuration. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] virtuoso: move PCM1796 symbols to a header fileClemens Ladisch
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[ALSA] oxygen: move WM8785 symbols to a header fileClemens Ladisch
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-04-24[ALSA] sound: virtuoso.c fix shadowed variable warningHarvey Harrison
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-02-29[ALSA] oxygen: add owner fieldClemens Ladisch
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-22[ALSA] oxygen: fix line-in recording selectionClemens Ladisch
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-02-22[ALSA] oxygen - Fix section mismatchTakashi Iwai
Removed invalid __devinit and __devexit that are remaining after split to a helper module. 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 Ladisch
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] virtuoso: monitor external power on D2XClemens Ladisch
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[ALSA] oxygen: add front panel captureClemens Ladisch
When a second AC97 codec is present, add a PCM device for capturing from the front panel. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] oxygen: add front panel controlsClemens Ladisch
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[ALSA] oxygen: use AC97 interruptClemens Ladisch
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>
2008-01-31[ALSA] oxygen: make line-in exclusive only on XonarClemens Ladisch
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[ALSA] oxygen: fix AK4396 double rate upper limitClemens Ladisch
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 Ladisch
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: more initializationClemens Ladisch
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[ALSA] oxygen: make the number of analog output configurableClemens Ladisch
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 Ladisch
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: fix SPDIF input ratesClemens Ladisch
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[ALSA] oxygen: add SPDIF loopback controlClemens Ladisch
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[ALSA] oxygen: optimize snd_pcm_hardware structuresClemens Ladisch
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[ALSA] oxygen: add 192 kHz SPDIF input supportClemens Ladisch
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[ALSA] oxygen: fix DAC source register fieldsClemens Ladisch
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[ALSA] oxygen: fix control filterClemens Ladisch
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[ALSA] oxygen: move model-specific data out of common headerClemens Ladisch
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 Ladisch
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 Ladisch
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>