diff options
Diffstat (limited to 'sound/pci/emu10k1/emumixer.c')
-rw-r--r-- | sound/pci/emu10k1/emumixer.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 6be82c5fe13..d71a72e84bc 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
@@ -181,7 +181,7 @@ static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol, | |||
181 | static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control = | 181 | static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control = |
182 | { | 182 | { |
183 | .access = SNDRV_CTL_ELEM_ACCESS_READ, | 183 | .access = SNDRV_CTL_ELEM_ACCESS_READ, |
184 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 184 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
185 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), | 185 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), |
186 | .count = 4, | 186 | .count = 4, |
187 | .info = snd_emu10k1_spdif_info, | 187 | .info = snd_emu10k1_spdif_info, |
@@ -190,7 +190,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control = | |||
190 | 190 | ||
191 | static snd_kcontrol_new_t snd_emu10k1_spdif_control = | 191 | static snd_kcontrol_new_t snd_emu10k1_spdif_control = |
192 | { | 192 | { |
193 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 193 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
194 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), | 194 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), |
195 | .count = 4, | 195 | .count = 4, |
196 | .info = snd_emu10k1_spdif_info, | 196 | .info = snd_emu10k1_spdif_info, |
@@ -295,7 +295,7 @@ static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol, | |||
295 | static snd_kcontrol_new_t snd_emu10k1_send_routing_control = | 295 | static snd_kcontrol_new_t snd_emu10k1_send_routing_control = |
296 | { | 296 | { |
297 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, | 297 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, |
298 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 298 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
299 | .name = "EMU10K1 PCM Send Routing", | 299 | .name = "EMU10K1 PCM Send Routing", |
300 | .count = 32, | 300 | .count = 32, |
301 | .info = snd_emu10k1_send_routing_info, | 301 | .info = snd_emu10k1_send_routing_info, |
@@ -364,7 +364,7 @@ static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol, | |||
364 | static snd_kcontrol_new_t snd_emu10k1_send_volume_control = | 364 | static snd_kcontrol_new_t snd_emu10k1_send_volume_control = |
365 | { | 365 | { |
366 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, | 366 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, |
367 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 367 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
368 | .name = "EMU10K1 PCM Send Volume", | 368 | .name = "EMU10K1 PCM Send Volume", |
369 | .count = 32, | 369 | .count = 32, |
370 | .info = snd_emu10k1_send_volume_info, | 370 | .info = snd_emu10k1_send_volume_info, |
@@ -427,7 +427,7 @@ static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol, | |||
427 | static snd_kcontrol_new_t snd_emu10k1_attn_control = | 427 | static snd_kcontrol_new_t snd_emu10k1_attn_control = |
428 | { | 428 | { |
429 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, | 429 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, |
430 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 430 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
431 | .name = "EMU10K1 PCM Volume", | 431 | .name = "EMU10K1 PCM Volume", |
432 | .count = 32, | 432 | .count = 32, |
433 | .info = snd_emu10k1_attn_info, | 433 | .info = snd_emu10k1_attn_info, |
@@ -737,7 +737,8 @@ static int rename_ctl(snd_card_t *card, const char *src, const char *dst) | |||
737 | return -ENOENT; | 737 | return -ENOENT; |
738 | } | 738 | } |
739 | 739 | ||
740 | int __devinit snd_emu10k1_mixer(emu10k1_t *emu) | 740 | int __devinit snd_emu10k1_mixer(emu10k1_t *emu, |
741 | int pcm_device, int multi_device) | ||
741 | { | 742 | { |
742 | int err, pcm; | 743 | int err, pcm; |
743 | snd_kcontrol_t *kctl; | 744 | snd_kcontrol_t *kctl; |
@@ -852,29 +853,35 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu) | |||
852 | 853 | ||
853 | if ((kctl = emu->ctl_send_routing = snd_ctl_new1(&snd_emu10k1_send_routing_control, emu)) == NULL) | 854 | if ((kctl = emu->ctl_send_routing = snd_ctl_new1(&snd_emu10k1_send_routing_control, emu)) == NULL) |
854 | return -ENOMEM; | 855 | return -ENOMEM; |
856 | kctl->id.device = pcm_device; | ||
855 | if ((err = snd_ctl_add(card, kctl))) | 857 | if ((err = snd_ctl_add(card, kctl))) |
856 | return err; | 858 | return err; |
857 | if ((kctl = emu->ctl_send_volume = snd_ctl_new1(&snd_emu10k1_send_volume_control, emu)) == NULL) | 859 | if ((kctl = emu->ctl_send_volume = snd_ctl_new1(&snd_emu10k1_send_volume_control, emu)) == NULL) |
858 | return -ENOMEM; | 860 | return -ENOMEM; |
861 | kctl->id.device = pcm_device; | ||
859 | if ((err = snd_ctl_add(card, kctl))) | 862 | if ((err = snd_ctl_add(card, kctl))) |
860 | return err; | 863 | return err; |
861 | if ((kctl = emu->ctl_attn = snd_ctl_new1(&snd_emu10k1_attn_control, emu)) == NULL) | 864 | if ((kctl = emu->ctl_attn = snd_ctl_new1(&snd_emu10k1_attn_control, emu)) == NULL) |
862 | return -ENOMEM; | 865 | return -ENOMEM; |
866 | kctl->id.device = pcm_device; | ||
863 | if ((err = snd_ctl_add(card, kctl))) | 867 | if ((err = snd_ctl_add(card, kctl))) |
864 | return err; | 868 | return err; |
865 | 869 | ||
866 | if ((kctl = emu->ctl_efx_send_routing = snd_ctl_new1(&snd_emu10k1_efx_send_routing_control, emu)) == NULL) | 870 | if ((kctl = emu->ctl_efx_send_routing = snd_ctl_new1(&snd_emu10k1_efx_send_routing_control, emu)) == NULL) |
867 | return -ENOMEM; | 871 | return -ENOMEM; |
872 | kctl->id.device = multi_device; | ||
868 | if ((err = snd_ctl_add(card, kctl))) | 873 | if ((err = snd_ctl_add(card, kctl))) |
869 | return err; | 874 | return err; |
870 | 875 | ||
871 | if ((kctl = emu->ctl_efx_send_volume = snd_ctl_new1(&snd_emu10k1_efx_send_volume_control, emu)) == NULL) | 876 | if ((kctl = emu->ctl_efx_send_volume = snd_ctl_new1(&snd_emu10k1_efx_send_volume_control, emu)) == NULL) |
872 | return -ENOMEM; | 877 | return -ENOMEM; |
878 | kctl->id.device = multi_device; | ||
873 | if ((err = snd_ctl_add(card, kctl))) | 879 | if ((err = snd_ctl_add(card, kctl))) |
874 | return err; | 880 | return err; |
875 | 881 | ||
876 | if ((kctl = emu->ctl_efx_attn = snd_ctl_new1(&snd_emu10k1_efx_attn_control, emu)) == NULL) | 882 | if ((kctl = emu->ctl_efx_attn = snd_ctl_new1(&snd_emu10k1_efx_attn_control, emu)) == NULL) |
877 | return -ENOMEM; | 883 | return -ENOMEM; |
884 | kctl->id.device = multi_device; | ||
878 | if ((err = snd_ctl_add(card, kctl))) | 885 | if ((err = snd_ctl_add(card, kctl))) |
879 | return err; | 886 | return err; |
880 | 887 | ||
@@ -924,10 +931,14 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu) | |||
924 | /* sb live! and audigy */ | 931 | /* sb live! and audigy */ |
925 | if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu)) == NULL) | 932 | if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu)) == NULL) |
926 | return -ENOMEM; | 933 | return -ENOMEM; |
934 | if (!emu->audigy) | ||
935 | kctl->id.device = emu->pcm_efx->device; | ||
927 | if ((err = snd_ctl_add(card, kctl))) | 936 | if ((err = snd_ctl_add(card, kctl))) |
928 | return err; | 937 | return err; |
929 | if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_control, emu)) == NULL) | 938 | if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_control, emu)) == NULL) |
930 | return -ENOMEM; | 939 | return -ENOMEM; |
940 | if (!emu->audigy) | ||
941 | kctl->id.device = emu->pcm_efx->device; | ||
931 | if ((err = snd_ctl_add(card, kctl))) | 942 | if ((err = snd_ctl_add(card, kctl))) |
932 | return err; | 943 | return err; |
933 | } | 944 | } |