mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
ALSA: echoaudio - Re-enable the line-out control for the Mia card
Mia has an undocumented line-out control, and it has to be exposed. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
8fdc9e870c
commit
392bf2f1ba
2 changed files with 27 additions and 4 deletions
|
@ -950,7 +950,7 @@ static int __devinit snd_echo_new_pcm(struct echoaudio *chip)
|
||||||
Control interface
|
Control interface
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#ifndef ECHOCARD_HAS_VMIXER
|
#if !defined(ECHOCARD_HAS_VMIXER) || defined(ECHOCARD_HAS_LINE_OUT_GAIN)
|
||||||
|
|
||||||
/******************* PCM output volume *******************/
|
/******************* PCM output volume *******************/
|
||||||
static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
|
static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol,
|
||||||
|
@ -1003,6 +1003,19 @@ static int snd_echo_output_gain_put(struct snd_kcontrol *kcontrol,
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
|
||||||
|
/* On the Mia this one controls the line-out volume */
|
||||||
|
static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = {
|
||||||
|
.name = "Line Playback Volume",
|
||||||
|
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||||
|
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
|
||||||
|
SNDRV_CTL_ELEM_ACCESS_TLV_READ,
|
||||||
|
.info = snd_echo_output_gain_info,
|
||||||
|
.get = snd_echo_output_gain_get,
|
||||||
|
.put = snd_echo_output_gain_put,
|
||||||
|
.tlv = {.p = db_scale_output_gain},
|
||||||
|
};
|
||||||
|
#else
|
||||||
static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
|
static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
|
||||||
.name = "PCM Playback Volume",
|
.name = "PCM Playback Volume",
|
||||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||||
|
@ -1012,9 +1025,10 @@ static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = {
|
||||||
.put = snd_echo_output_gain_put,
|
.put = snd_echo_output_gain_put,
|
||||||
.tlv = {.p = db_scale_output_gain},
|
.tlv = {.p = db_scale_output_gain},
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* !ECHOCARD_HAS_VMIXER || ECHOCARD_HAS_LINE_OUT_GAIN */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ECHOCARD_HAS_INPUT_GAIN
|
#ifdef ECHOCARD_HAS_INPUT_GAIN
|
||||||
|
@ -2030,10 +2044,18 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
|
||||||
snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
|
snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip);
|
||||||
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
|
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0)
|
||||||
goto ctl_error;
|
goto ctl_error;
|
||||||
#else
|
#ifdef ECHOCARD_HAS_LINE_OUT_GAIN
|
||||||
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0)
|
err = snd_ctl_add(chip->card,
|
||||||
|
snd_ctl_new1(&snd_echo_line_output_gain, chip));
|
||||||
|
if (err < 0)
|
||||||
goto ctl_error;
|
goto ctl_error;
|
||||||
#endif
|
#endif
|
||||||
|
#else /* ECHOCARD_HAS_VMIXER */
|
||||||
|
err = snd_ctl_add(chip->card,
|
||||||
|
snd_ctl_new1(&snd_echo_pcm_output_gain, chip));
|
||||||
|
if (err < 0)
|
||||||
|
goto ctl_error;
|
||||||
|
#endif /* ECHOCARD_HAS_VMIXER */
|
||||||
|
|
||||||
#ifdef ECHOCARD_HAS_INPUT_GAIN
|
#ifdef ECHOCARD_HAS_INPUT_GAIN
|
||||||
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0)
|
if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0)
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#define ECHOCARD_HAS_ADAT FALSE
|
#define ECHOCARD_HAS_ADAT FALSE
|
||||||
#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32
|
#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32
|
||||||
#define ECHOCARD_HAS_MIDI
|
#define ECHOCARD_HAS_MIDI
|
||||||
|
#define ECHOCARD_HAS_LINE_OUT_GAIN
|
||||||
|
|
||||||
/* Pipe indexes */
|
/* Pipe indexes */
|
||||||
#define PX_ANALOG_OUT 0 /* 8 */
|
#define PX_ANALOG_OUT 0 /* 8 */
|
||||||
|
|
Loading…
Reference in a new issue