Commit Graph

33 Commits

Author SHA1 Message Date
Clemens Ladisch dc3fcd1655 ALSA: virtuoso: fix Essence ST(X) S/PDIF input
On the Xonar Essence ST/STX, the connector J14 has been confirmed to be
a digital input, so enable it in the driver.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15 13:35:14 +02:00
Clemens Ladisch c81c6b356b ALSA: virtuoso: fix silent analog output on Xonar Essence ST Deluxe
Commit dd203fa97b (ALSA: virtuoso: remove non-working controls on
Essence ST Deluxe) made it impossible to adjust the volume after the
driver initialized it to muted.

Ensure that those DACs that can be accessed with I2C are initialized
to the same volume that is the reset default of the DAC without I2C.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.38+ <stable@kernel.org>
2011-07-18 09:39:50 +02: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 b532d6b8d3 ALSA: virtuoso: add Xonar HDAV1.3 Slim support
Add experimental support for the Asus Xonar HDAV1.3 Slim sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:49 +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 bc29e262c3 ALSA: virtuoso: use headphone gain setting only on front DAC
Do not apply the headphone gain offset to any but the front DAC.  These
DACs would not be used in headphone mode, so this saves a few register
writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:28 +01:00
Clemens Ladisch c97e2dc484 ALSA: virtuoso: handle DAC oversampling automatically
Remove the DAC Oversampling mixer control because this setting does not
make much sense.

For cards with the H6 daughterboard, 128x oversampling was disabled
anyway because these high MCLK frequency would not be compatible with
the connector cable.

For cards without the H6 daughterboard, 128x gives a slightly higher
output quality; there is no reason to reduce it to 64x except for saving
power, but then these cards have not been designed to be power efficient
anyway (the D2's blinkenlights cannot be disabled).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:24 +01:00
Clemens Ladisch 00b8dd7dd7 ALSA: virtuoso: use lower master clock with H6 daughterboard
Because of the unshielded connector cable, it is important to use as low
a master clock frequency as possible with the H6.

For double rate modes (64-96 kHz), the MCLK rate is unconditionally
lowered from 512x to 256x because the higher rate would not improve
anything.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:21 +01:00
Clemens Ladisch d353eaa9a8 ALSA: virtuoso: configure correct master clock frequency on the CS2000
The clock output of the CS2000, which is used as master clock for the
DACs, was using half the actual master clock frequency for some reason.
Using the theoretically correct frequency seems also to work in practice.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:17 +01:00
Clemens Ladisch dd203fa97b ALSA: virtuoso: remove non-working controls on Essence ST Deluxe
On the Xonar Essence ST Deluxe, remove all mixer controls that would
require I2C communication with the third DAC, which does not work
because of an addressing conflict with the CS2000 chip.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:14 +01:00
Clemens Ladisch 03ff959dd4 ALSA: virtuoso: change PCM1796 format to I2S
Change the PCM format used for the PCM1796 from left-justified to I2S to
ensure that the correct format is used even for the Essence ST Deluxe's
center/LFE DAC, where I2C does not work because of an address conflict
with the CS2000 chip.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:10 +01:00
Clemens Ladisch 79815e004c ALSA: virtuoso: wait for PCM1796 clock to become stable
The PCM1796 needs the master clock for I2C communication to work, so
add delays after clock changes to ensure that the clock is stable when
we try to write the DACs' registers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:07 +01:00
Clemens Ladisch 4106055ced ALSA: virtuoso: do not use fast I2C speed
To make the I2C communication reliable when using the H6 daughterboard,
reduce the I2C clock frequency.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:03 +01:00
Clemens Ladisch d2119c05e9 ALSA: oxygen: remove oxygen_model::private_data field
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>
2011-01-10 16:45:56 +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 e96f38f732 ALSA: virtuoso: fix front panel routing for D1/DX/ST(X)
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>
2010-12-06 14:48:08 +01:00
Clemens Ladisch 2509ec623d ALSA: virtuoso: add HDMI enable switch for HDAV1.3
The GPIO bit that enables analog output on the Xonar HDAV1.3 also
disables the HDMI audio output, so we better add a switch for it.
Hopefully, this is sufficient to make the HDMI output work.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:47:58 +01:00
Clemens Ladisch f7e4bad74e ALSA: virtuoso: initialize unknown GPIO bits
Initialize the configuration of some unknown GPIO output bits (that
might not be used at all) to be the same as in the Windows driver, just
to be sure.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:47:50 +01:00
Clemens Ladisch d737f3eede ALSA: virtuoso: fix Xonar STX anti-pop delay
The anti-pop delay for the STX should be 800 ms, not 100 ms like the ST.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:20 +02:00
Clemens Ladisch 2b830bae1f ALSA: virtuoso: add HDAV1.3 Slim PCI ID
Add a PCI ID for the Xonar HDAV1.3 Slim.  There is no actual support,
but the presence of the ID allows the EEPROM repair code to work for
this card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:19 +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
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 973dca93a3 sound: virtuoso: add PCM1796 oversampling control
Add a control to increase the oversampling factor to 128x on cards with
PCM1796 or PCM1792A DACs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:52 +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 a361e247b4 sound: virtuoso: add headphone impedance control
Add a mixer control to adjust the headphone amplifier output for
headphones with different impedances.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:37 +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 75919d7c05 sound: oxygen: better defaults for upmixing control
On card models with two-channel outputs, the base driver can
automatically disable the upmixing control so that the model
drivers do not need to do this.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:00 +02:00
Clemens Ladisch 268304f4c4 sound: virtuoso: fix Xonar Essence ST support
The Essence ST uses the CS2000 chip to generate the DAC master clock, so
we better initialize and program it appropriately.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:51 +02:00
Clemens Ladisch 65c3ac885c sound: virtuoso: split virtuoso.c
The virtuoso.c file has become rather big.  This patch splits it up so
that only code for very similar card models is in one file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:38 +02:00