Commit b3af9976 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Jaroslav Kysela <perex@suse.cz>

GUS Library
Fixed duplicate control IDs (PCM Playback Volume) for cards with the codec chip
parent 10b46db3
......@@ -813,6 +813,15 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control =
.put = snd_gf1_pcm_volume_put
};
static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "GPCM Playback Volume",
.info = snd_gf1_pcm_volume_info,
.get = snd_gf1_pcm_volume_get,
.put = snd_gf1_pcm_volume_put
};
static snd_pcm_ops_t snd_gf1_pcm_playback_ops = {
.open = snd_gf1_pcm_playback_open,
.close = snd_gf1_pcm_playback_close,
......@@ -880,6 +889,10 @@ int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pc
strcat(pcm->name, " (synth)");
gus->pcm = pcm;
if (gus->codec_flag)
kctl = snd_ctl_new1(&snd_gf1_pcm_volume_control1, gus);
else
kctl = snd_ctl_new1(&snd_gf1_pcm_volume_control, gus);
if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_gf1_pcm_volume_control, gus))) < 0)
return err;
kctl->id.index = control_index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment