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>
This commit is contained in:

committed by
Takashi Iwai

parent
f7e4bad74e
commit
2509ec623d
@@ -776,6 +776,15 @@ static const struct snd_kcontrol_new os_128_control = {
|
||||
.put = os_128_put,
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new hdav_hdmi_control = {
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "HDMI Playback Switch",
|
||||
.info = snd_ctl_boolean_mono_info,
|
||||
.get = xonar_gpio_bit_switch_get,
|
||||
.put = xonar_gpio_bit_switch_put,
|
||||
.private_value = GPIO_HDAV_OUTPUT_ENABLE | XONAR_GPIO_BIT_INVERT,
|
||||
};
|
||||
|
||||
static int st_output_switch_info(struct snd_kcontrol *ctl,
|
||||
struct snd_ctl_elem_info *info)
|
||||
{
|
||||
@@ -960,7 +969,15 @@ static int xonar_d2_mixer_init(struct oxygen *chip)
|
||||
|
||||
static int xonar_hdav_mixer_init(struct oxygen *chip)
|
||||
{
|
||||
return add_pcm1796_controls(chip);
|
||||
int err;
|
||||
|
||||
err = snd_ctl_add(chip->card, snd_ctl_new1(&hdav_hdmi_control, chip));
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = add_pcm1796_controls(chip);
|
||||
if (err < 0)
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int xonar_st_mixer_init(struct oxygen *chip)
|
||||
|
Reference in New Issue
Block a user