[ALSA] use PCM interface for IEC958 controls
authorClemens Ladisch <clemens@ladisch.de>
Wed, 3 Aug 2005 11:50:30 +0000 (13:50 +0200)
committerJaroslav Kysela <perex@suse.cz>
Tue, 30 Aug 2005 06:43:39 +0000 (08:43 +0200)
Digigram VX core,ENS1370/1+ driver,CA0106 driver,EMU10K1/EMU10K2 driver
RME HDSP driver,RME9652 driver
For consistency, use the PCM interface instead of MIXER for IEC958
default/mask/stream mixer controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/drivers/vx/vx_mixer.c
sound/pci/ca0106/ca0106_mixer.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/emu10k1/emumixer.c
sound/pci/ens1370.c
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/rme9652.c

index f00c88886460c8b8dff9a3a5dc8e05c8549cd28d..19fc68c23378c039b4bc856b54997372bf0915c1 100644 (file)
@@ -796,14 +796,14 @@ static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
 
 static snd_kcontrol_new_t vx_control_iec958_mask = {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
        .info =         vx_iec958_info, /* shared */
        .get =          vx_iec958_mask_get,
 };
 
 static snd_kcontrol_new_t vx_control_iec958 = {
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .info =         vx_iec958_info,
        .get =          vx_iec958_get,
index 0e5e9ce0ff28be76943cf8d9809a0028cbaa9bfe..b6b8882ce704fb3bd70dd11b5d380f97f64bcc8d 100644 (file)
@@ -297,7 +297,7 @@ static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol,
 static snd_kcontrol_new_t snd_ca0106_spdif_mask_control =
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
         .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
        .count =        4,
         .info =         snd_ca0106_spdif_info,
@@ -306,7 +306,7 @@ static snd_kcontrol_new_t snd_ca0106_spdif_mask_control =
 
 static snd_kcontrol_new_t snd_ca0106_spdif_control =
 {
-        .iface =       SNDRV_CTL_ELEM_IFACE_MIXER,
+        .iface =       SNDRV_CTL_ELEM_IFACE_PCM,
         .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .count =        4,
         .info =         snd_ca0106_spdif_info,
index e90c5ddd1d17ef0451e87010040c72bb71966ac7..52c7826df4402ee0e71629ff425bc5ab1f284d9a 100644 (file)
@@ -1183,7 +1183,7 @@ static int snd_emu10k1x_spdif_put(snd_kcontrol_t * kcontrol,
 static snd_kcontrol_new_t snd_emu10k1x_spdif_mask_control =
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
        .count =        3,
        .info =         snd_emu10k1x_spdif_info,
@@ -1192,7 +1192,7 @@ static snd_kcontrol_new_t snd_emu10k1x_spdif_mask_control =
 
 static snd_kcontrol_new_t snd_emu10k1x_spdif_control =
 {
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .count =        3,
        .info =         snd_emu10k1x_spdif_info,
index 279edaeb06638231dc8f0003272cb4ee077f74d1..d71a72e84bcc9181a7c2f23c31b14fd864c9cfe9 100644 (file)
@@ -181,7 +181,7 @@ static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol,
 static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
        .count =        4,
        .info =         snd_emu10k1_spdif_info,
@@ -190,7 +190,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
 
 static snd_kcontrol_new_t snd_emu10k1_spdif_control =
 {
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .count =        4,
        .info =         snd_emu10k1_spdif_info,
@@ -931,10 +931,14 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
                /* sb live! and audigy */
                if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_mask_control, emu)) == NULL)
                        return -ENOMEM;
+               if (!emu->audigy)
+                       kctl->id.device = emu->pcm_efx->device;
                if ((err = snd_ctl_add(card, kctl)))
                        return err;
                if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_control, emu)) == NULL)
                        return -ENOMEM;
+               if (!emu->audigy)
+                       kctl->id.device = emu->pcm_efx->device;
                if ((err = snd_ctl_add(card, kctl)))
                        return err;
        }
index bc8272be00318d65c0562bd9db39e942cf30a7df..f06b95f41a1de5daa5e73fad55d9b7d7829bd271 100644 (file)
@@ -1446,7 +1446,7 @@ static int snd_es1371_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 static snd_kcontrol_new_t snd_es1371_mixer_spdif[] __devinitdata = {
        ES1371_SPDIF(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH)),
        {
-               .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
                .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
                .info =         snd_ens1373_spdif_info,
                .get =          snd_ens1373_spdif_default_get,
@@ -1454,13 +1454,13 @@ static snd_kcontrol_new_t snd_es1371_mixer_spdif[] __devinitdata = {
        },
        {
                .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-               .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
                .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
                .info =         snd_ens1373_spdif_info,
                .get =          snd_ens1373_spdif_mask_get
        },
        {
-               .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
                .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
                .info =         snd_ens1373_spdif_info,
                .get =          snd_ens1373_spdif_stream_get,
index 60eef845a074961e71bbfd1646650457ed95bbcb..6694866089b5cd8061e088a1c27490d1109bbbe4 100644 (file)
@@ -3104,7 +3104,7 @@ HDSP_XLR_BREAKOUT_CABLE("XLR Breakout Cable", 0)
 
 static snd_kcontrol_new_t snd_hdsp_controls[] = {
 {
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .info =         snd_hdsp_control_spdif_info,
        .get =          snd_hdsp_control_spdif_get,
@@ -3112,7 +3112,7 @@ static snd_kcontrol_new_t snd_hdsp_controls[] = {
 },
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
        .info =         snd_hdsp_control_spdif_stream_info,
        .get =          snd_hdsp_control_spdif_stream_get,
@@ -3120,7 +3120,7 @@ static snd_kcontrol_new_t snd_hdsp_controls[] = {
 },
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),
        .info =         snd_hdsp_control_spdif_mask_info,
        .get =          snd_hdsp_control_spdif_mask_get,
@@ -3130,7 +3130,7 @@ static snd_kcontrol_new_t snd_hdsp_controls[] = {
 },
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),
        .info =         snd_hdsp_control_spdif_mask_info,
        .get =          snd_hdsp_control_spdif_mask_get,
index 6e3a91dba3eb62f71fd6d3bf3628cfc00bf0f999..8ee4d6fd6ea789e20b3c2b1e0180efc7cbcfe051 100644 (file)
@@ -1529,7 +1529,7 @@ static int snd_rme9652_get_tc_value(void *private_data,
 
 static snd_kcontrol_new_t snd_rme9652_controls[] = {
 {
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .info =         snd_rme9652_control_spdif_info,
        .get =          snd_rme9652_control_spdif_get,
@@ -1537,7 +1537,7 @@ static snd_kcontrol_new_t snd_rme9652_controls[] = {
 },
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
        .info =         snd_rme9652_control_spdif_stream_info,
        .get =          snd_rme9652_control_spdif_stream_get,
@@ -1545,7 +1545,7 @@ static snd_kcontrol_new_t snd_rme9652_controls[] = {
 },
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),
        .info =         snd_rme9652_control_spdif_mask_info,
        .get =          snd_rme9652_control_spdif_mask_get,
@@ -1555,7 +1555,7 @@ static snd_kcontrol_new_t snd_rme9652_controls[] = {
 },
 {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-       .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+       .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),
        .info =         snd_rme9652_control_spdif_mask_info,
        .get =          snd_rme9652_control_spdif_mask_get,