Commit Graph

77 Commits

Author SHA1 Message Date
Clemens Ladisch 76bc7a0d0a ALSA: oxygen: add Xonar DGX support
Add the PCI ID of the Asus Xonar DGX card; it's otherwise
identical with the DG.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-05 14:24:12 +02:00
Takashi Iwai e9f66d9b9c ALSA: pci: clean up using module_pci_driver()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24 12:25:00 +02:00
Rusty Russell a67ff6a540 ALSA: module_param: make bool parameters really bool
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-19 10:34:41 +01:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Takashi Iwai 3733e424c4 ALSA: Use KBUILD_MODNAME for pci_driver.name entries
The convention for pci_driver.name entry in kernel drivers seem to be
the module name or equivalent ones.  But, so far, almost all PCI sound
drivers use more verbose name like "ABC Xyz (12)", and these are fairly
confusing when appearing as a file name.

This patch converts the all pci_driver.name entries in sound/pci/* to
use KBUILD_MODNAME for more unified appearance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 16:20:20 +02:00
Clemens Ladisch d1d7093f3f ALSA: oxygen: add S/PDIF source selection for Claro cards
Add a mixer control to switch between the optical and coaxial S/PDIF
inputs on the HT-Omega Claro and Claro halo cards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 17:54:15 +01:00
Clemens Ladisch 5fc5152474 ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
Enable the X-Meridian's CD input and the X-Meridian 2G's potential
MIDI ports.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 17:54:11 +01:00
Clemens Ladisch a4b1696916 ALSA: oxygen: add some card names
Instead of the generic Oxygen, use the actual card name, if known.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:28 +01:00
Clemens Ladisch 64878dfbf7 ALSA: oxygen: X-Meridian: add S/PDIF source selection
Add a mixer control to select between the on-board and extension board
S/PDIF inputs for the X-Meridian (2G).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:21 +01:00
Clemens Ladisch 9600732b6c ALSA: core, oxygen, virtuoso: add an enum control info helper
Introduce the helper function snd_ctl_enum_info() to fill out the
elem_info fields for an enumerated control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:53 +01:00
Clemens Ladisch 66410bfdf1 ALSA: oxygen: add Xonar DG support
Add experimental support for the Asus Xonar DG sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:46 +01:00
Clemens Ladisch 8443d2eb81 ALSA: oxygen: add X-Meridian 2G support
Add support for the AuzenTech X-Meridian 7.1 2G sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:42 +01:00
Clemens Ladisch 8c50b75979 ALSA: oxygen: add more PCI IDs
Add PCI IDs for some unknown models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:38 +01:00
Clemens Ladisch ce2c492090 ALSA: virtuoso: reduce MCLK in double rate modes
For the CSxxxx and AKxxxx DAC/ADC chips, the MCLK factor in double rate
modes (64-96 kHz) can be reduced to 128x without reducing sound quality.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:35 +01:00
Clemens Ladisch 5b8bf2a54f ALSA: oxygen: simplify model-specific MCLK handling
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>
2011-01-10 16:46:31 +01:00
Clemens Ladisch 1f4d7be729 ALSA: oxygen: allow different number of PCM and mixer channels
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>
2011-01-10 16:45:53 +01:00
Clemens Ladisch de66493693 ALSA: oxygen: update hardware comments
Reformat and update the comments that describe the hardware connections
on the various models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:43 +01:00
Clemens Ladisch 9719fcaa6a ALSA: oxygen: allow to dump codec registers
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>
2010-12-06 14:48:15 +01:00
Clemens Ladisch 2146dcfd15 ALSA: oxygen: add HiFier Serenade support
Add support for the TempoTec/MediaTek HiFier Serenade sound card.

The PCI ID was already there, but the driver handled it like the
Fantasia model, which resulted in a dummy recording device.  As
a stereo output-only card, this model is to be handled exactly
like the HG2PCI.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 14:57:32 +01:00
Clemens Ladisch 18f24839f1 ALSA: oxygen: reorganize PCI IDs
Sort the PCI IDs so that they make logical sense.  Also move the card
name comments into this list because the model symbols should be (more)
self-explanationary.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 14:56:04 +01:00
Clemens Ladisch 31f86bacfc ALSA: oxygen: add Kuroutoshikou CMI8787-HG2PCI support
Add support for the Kuroutoshikou CMI8787-HG2PCI sound card.

[replaced non-latin letters in the patch by tiwai]

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 08:26:13 +01:00
Clemens Ladisch 45c1de8e20 ALSA: oxygen: merge HiFier driver into snd-oxygen
The snd-hifier driver contains more duplicated code than model-specific
code, so it does not make sense for it to be a separate driver.
Handling the two-channel output restriction can be easily done in the
generic driver.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 08:19:11 +01:00
Takashi Iwai 4e83998f5a Merge branch 'fix/misc' into topic/misc 2010-10-11 13:45:22 +02:00
Takashi Iwai dd1d3a49db ALSA: oxygen - Add a SSID for CMI8787-HG2PCI
This board has a strange PCI SSID 13f6:ffff.  Works as compabile as
MODEL_CMEDIA_REF.

Reported-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-06 17:28:56 +02:00
Clemens Ladisch b6ca8ab399 ALSA: oxygen: handle CD input configuration with a flag
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>
2010-10-05 18:11:17 +02:00
Erik J. Staab 0873a5ae74 ALSA: oxygen: fix analog capture on Claro halo cards
On the HT-Omega Claro halo card, the ADC data must be captured from the
second I2S input.  Using the default first input, which isn't connected
to anything, would result in silence.

Signed-off-by: Erik J. Staab <ejs@insightbb.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-22 10:04:08 +02:00
Alexey Dobriyan cebe41d4b8 sound: use DEFINE_PCI_DEVICE_TABLE
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to
.devinit.rodata section, so they can be discarded in some cases,
and make them const.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 11:08:33 +01:00
Clemens Ladisch 1ff048869e sound: oxygen: add high-pass filter control
Add a control that allows disabling the high-pass filter of the WM8785 ADC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:08 +02:00
Clemens Ladisch 4852ad0247 sound: oxygen: add digital filter control
Add a control to select between sharp and slow roll-of filter responses
of the DACs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:00 +02:00
Clemens Ladisch 76ffe1e3fb sound: oxygen: allow custom MCLK rates
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>
2009-09-28 11:54:45 +02:00
Clemens Ladisch 6f0de3ce06 sound: oxygen: cache codec registers
Keep a cache of codec registers to avoid unnecessary writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:29 +02:00
Clemens Ladisch dc0adf48da sound: oxygen: more hardware documentation
Add some comments describing the hardware pin routing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:20 +02:00
Clemens Ladisch 873591db59 sound: oxygen: enable headphone output on Claro cards
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-03-09 09:45:11 +01:00
Clemens Ladisch d91b424d6d sound: oxygen: handle AK5385 ADC on Claro halo cards
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-20 11:14:09 +01:00
Clemens Ladisch 30459d7b18 sound: oxygen: handle cards with broken EEPROM
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-19 10:22:25 +01:00
Clemens Ladisch bb71858853 sound: oxygen: make the owner module a parameter of the probe function
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-19 10:22:22 +01:00
Clemens Ladisch de04b102bf ALSA: oxygen: add Claro halo support
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-11-28 14:49:54 +01:00
Clemens Ladisch c2bc4ff58d ALSA: oxygen: add self-documenting functions
Introduce some trivial functions to better document the relationships of
the various model callbacks.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-09-22 09:05:29 +02:00
Clemens Ladisch dbbbd67444 ALSA: oxygen: configure MIDI via device_config
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-22 09:03:42 +02:00
Clemens Ladisch d76596b1ee ALSA: oxygen: rename pcm_dev_cfg
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-22 09:02:08 +02:00
Clemens Ladisch 4bd0c3a690 ALSA: oxygen: handle X-Meridian dynamically
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-22 08:59:18 +02:00
Clemens Ladisch 2f1b0ec715 ALSA: oxygen: remove X-Meridian magic number
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-22 08:57:24 +02:00
Clemens Ladisch 568c59e722 ALSA: oxygen: add probe callback
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-22 08:56:01 +02:00
Clemens Ladisch df91bc23dc ALSA: oxygen: fix distorted output on AK4396-based cards
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-29 14:15:19 +02:00
Clemens Ladisch 4a4bc53bc5 [ALSA] oxygen: add PM support
Add suspend/resume support.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:17 +02:00
Clemens Ladisch 75146fc0f9 [ALSA] oxygen: separate out hardware initialization code
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 13:19:17 +02:00
Clemens Ladisch bbbfb55266 [ALSA] oxygen: simplify DAC volume initialization
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 13:19:16 +02:00
Clemens Ladisch e58aee9580 [ALSA] oxygen: save register writes
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 13:19:16 +02:00
Clemens Ladisch d023dc0aa2 [ALSA] oxygen: fix version in MODULE_LICENSE
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-05-19 13:19:15 +02:00
Clemens Ladisch 4972a177fe [ALSA] oxygen: generalize DAC volume TLV handling
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 12:00:37 +02:00