[ALSA] use SNDRV_CTL_NAME_IEC958 macro
CMI8330 driver,ENS1370/1+ driver,FM801 driver,VIA82xx driver,AC97 Codec ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver ICE1712 driver,ICE1724 driver Where appropriate, use the SNDRV_CTL_NAME_IEC958 instead of a literal string. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
Родитель
506d4c6a5f
Коммит
10e8d78a94
|
@ -194,8 +194,8 @@ AD1848_DOUBLE("Wavetable Capture Volume", 0, CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4
|
|||
AD1848_SINGLE("3D Control - Switch", 0, CMI8330_RMUX3D, 5, 1, 1),
|
||||
AD1848_SINGLE("PC Speaker Playback Volume", 0, CMI8330_OUTPUTVOL, 3, 3, 0),
|
||||
AD1848_SINGLE("FM Playback Switch", 0, CMI8330_RECMUX, 3, 1, 1),
|
||||
AD1848_SINGLE("IEC958 Input Capture Switch", 0, CMI8330_RMUX3D, 7, 1, 1),
|
||||
AD1848_SINGLE("IEC958 Input Playback Switch", 0, CMI8330_MUTEMUX, 7, 1, 1),
|
||||
AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",CAPTURE,SWITCH), 0, CMI8330_RMUX3D, 7, 1, 1),
|
||||
AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",PLAYBACK,SWITCH), 0, CMI8330_MUTEMUX, 7, 1, 1),
|
||||
};
|
||||
|
||||
#ifdef ENABLE_SB_MIXER
|
||||
|
|
|
@ -1955,7 +1955,7 @@ static const snd_kcontrol_new_t snd_ac97_controls_alc650[] = {
|
|||
};
|
||||
|
||||
static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc650[] = {
|
||||
AC97_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0),
|
||||
AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), AC97_ALC650_MULTICH, 11, 1, 0),
|
||||
AC97_SINGLE("Analog to IEC958 Output", AC97_ALC650_MULTICH, 12, 1, 0),
|
||||
/* disable this controls since it doesn't work as expected */
|
||||
/* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */
|
||||
|
@ -2098,12 +2098,12 @@ static int alc655_iec958_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
|
|||
}
|
||||
|
||||
static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = {
|
||||
AC97_PAGE_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0, 0),
|
||||
AC97_PAGE_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), AC97_ALC650_MULTICH, 11, 1, 0, 0),
|
||||
/* disable this controls since it doesn't work as expected */
|
||||
/* AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0), */
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Playback Route",
|
||||
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
|
||||
.info = alc655_iec958_route_info,
|
||||
.get = alc655_iec958_route_get,
|
||||
.put = alc655_iec958_route_put,
|
||||
|
@ -2682,7 +2682,7 @@ static const snd_kcontrol_new_t snd_ac97_controls_it2646[] = {
|
|||
};
|
||||
|
||||
static const snd_kcontrol_new_t snd_ac97_spdif_controls_it2646[] = {
|
||||
AC97_SINGLE("IEC958 Capture Switch", 0x76, 11, 1, 0),
|
||||
AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0x76, 11, 1, 0),
|
||||
AC97_SINGLE("Analog to IEC958 Output", 0x76, 12, 1, 0),
|
||||
AC97_SINGLE("IEC958 Input Monitor", 0x76, 13, 1, 0),
|
||||
};
|
||||
|
|
|
@ -1959,9 +1959,9 @@ static int snd_ali5451_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
|
|||
static snd_kcontrol_new_t snd_ali5451_mixer_spdif[] __devinitdata = {
|
||||
/* spdif aplayback switch */
|
||||
/* FIXME: "IEC958 Playback Switch" may conflict with one on ac97_codec */
|
||||
ALI5451_SPDIF("IEC958 Output switch", 0, 0),
|
||||
ALI5451_SPDIF(SNDRV_CTL_NAME_IEC958("Output ",NONE,SWITCH), 0, 0),
|
||||
/* spdif out to spdif channel */
|
||||
ALI5451_SPDIF("IEC958 Channel Output Switch", 0, 1),
|
||||
ALI5451_SPDIF(SNDRV_CTL_NAME_IEC958("Channel Output ",NONE,SWITCH), 0, 1),
|
||||
/* spdif in from spdif channel */
|
||||
ALI5451_SPDIF(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0, 2)
|
||||
};
|
||||
|
|
|
@ -2231,7 +2231,7 @@ static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = {
|
|||
},
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Output Switch",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Output ",NONE,SWITCH),
|
||||
.info = snd_mixer_boolean_info,
|
||||
.get = snd_cs46xx_iec958_get,
|
||||
.put = snd_cs46xx_iec958_put,
|
||||
|
@ -2239,7 +2239,7 @@ static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = {
|
|||
},
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Input Switch",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Input ",NONE,SWITCH),
|
||||
.info = snd_mixer_boolean_info,
|
||||
.get = snd_cs46xx_iec958_get,
|
||||
.put = snd_cs46xx_iec958_put,
|
||||
|
@ -2249,7 +2249,7 @@ static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = {
|
|||
/* Input IEC958 volume does not work for the moment. (Benny) */
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Input Volume",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Input ",NONE,VOLUME),
|
||||
.info = snd_cs46xx_vol_info,
|
||||
.get = snd_cs46xx_vol_iec958_get,
|
||||
.put = snd_cs46xx_vol_iec958_put,
|
||||
|
|
|
@ -1159,12 +1159,12 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
|
|||
/* Optical SPDIF Playback Volume */
|
||||
A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_OPT_SPDIF_L);
|
||||
A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_OPT_SPDIF_R);
|
||||
snd_emu10k1_init_stereo_control(&controls[nctl++], "IEC958 Optical Playback Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_control(&controls[nctl++], SNDRV_CTL_NAME_IEC958("Optical ",PLAYBACK,VOLUME), gpr, 0);
|
||||
gpr += 2;
|
||||
/* Optical SPDIF Capture Volume */
|
||||
A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_OPT_SPDIF_L);
|
||||
A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_OPT_SPDIF_R);
|
||||
snd_emu10k1_init_stereo_control(&controls[nctl++], "IEC958 Optical Capture Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_control(&controls[nctl++], SNDRV_CTL_NAME_IEC958("Optical ",CAPTURE,VOLUME), gpr, 0);
|
||||
gpr += 2;
|
||||
|
||||
/* Line2 Playback Volume */
|
||||
|
@ -1389,7 +1389,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
|
|||
A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000);
|
||||
}
|
||||
}
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + nctl++, "IEC958 Optical Raw Playback Switch", gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + nctl++, SNDRV_CTL_NAME_IEC958("Optical Raw ",PLAYBACK,SWITCH), gpr, 0);
|
||||
gpr += 2;
|
||||
|
||||
A_PUT_STEREO_OUTPUT(A_EXTOUT_REAR_L, A_EXTOUT_REAR_R, playback+2 + SND_EMU10K1_PLAYBACK_CHANNELS);
|
||||
|
@ -1716,7 +1716,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
/* IEC958 TTL Playback Volume */
|
||||
for (z = 0; z < 2; z++)
|
||||
VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_SPDIF_CD_L + z, gpr + z);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, "IEC958 TTL Playback Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, SNDRV_CTL_NAME_IEC958("TTL ",PLAYBACK,VOLUME), gpr, 0);
|
||||
gpr += 2;
|
||||
|
||||
/* IEC958 TTL Capture Volume + Switch */
|
||||
|
@ -1724,8 +1724,8 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_SPDIF_CD_L + z, gpr + 2 + z);
|
||||
VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z);
|
||||
}
|
||||
snd_emu10k1_init_stereo_control(controls + i++, "IEC958 TTL Capture Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, "IEC958 TTL Capture Switch", gpr + 2, 0);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, SNDRV_CTL_NAME_IEC958("TTL ",CAPTURE,VOLUME), gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, SNDRV_CTL_NAME_IEC958("TTL ",CAPTURE,SWITCH), gpr + 2, 0);
|
||||
gpr += 4;
|
||||
}
|
||||
|
||||
|
@ -1750,7 +1750,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
/* IEC958 Optical Playback Volume */
|
||||
for (z = 0; z < 2; z++)
|
||||
VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_TOSLINK_L + z, gpr + z);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, "IEC958 LiveDrive Playback Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, SNDRV_CTL_NAME_IEC958("LiveDrive ",PLAYBACK,VOLUME), gpr, 0);
|
||||
gpr += 2;
|
||||
|
||||
/* IEC958 Optical Capture Volume */
|
||||
|
@ -1758,8 +1758,8 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_TOSLINK_L + z, gpr + 2 + z);
|
||||
VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z);
|
||||
}
|
||||
snd_emu10k1_init_stereo_control(controls + i++, "IEC958 LiveDrive Capture Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, "IEC958 LiveDrive Capture Switch", gpr + 2, 0);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, SNDRV_CTL_NAME_IEC958("LiveDrive ",CAPTURE,VOLUME), gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, SNDRV_CTL_NAME_IEC958("LiveDrive ",CAPTURE,SWITCH), gpr + 2, 0);
|
||||
gpr += 4;
|
||||
}
|
||||
|
||||
|
@ -1784,7 +1784,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
/* IEC958 Coax Playback Volume */
|
||||
for (z = 0; z < 2; z++)
|
||||
VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_COAX_SPDIF_L + z, gpr + z);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, "IEC958 Coaxial Playback Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, SNDRV_CTL_NAME_IEC958("Coaxial ",PLAYBACK,VOLUME), gpr, 0);
|
||||
gpr += 2;
|
||||
|
||||
/* IEC958 Coax Capture Volume + Switch */
|
||||
|
@ -1792,8 +1792,8 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_COAX_SPDIF_L + z, gpr + 2 + z);
|
||||
VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z);
|
||||
}
|
||||
snd_emu10k1_init_stereo_control(controls + i++, "IEC958 Coaxial Capture Volume", gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, "IEC958 Coaxial Capture Switch", gpr + 2, 0);
|
||||
snd_emu10k1_init_stereo_control(controls + i++, SNDRV_CTL_NAME_IEC958("Coaxial ",CAPTURE,VOLUME), gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, SNDRV_CTL_NAME_IEC958("Coaxial ",CAPTURE,SWITCH), gpr + 2, 0);
|
||||
gpr += 4;
|
||||
}
|
||||
|
||||
|
@ -1920,7 +1920,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
|||
#endif
|
||||
}
|
||||
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, "IEC958 Optical Raw Playback Switch", gpr, 0);
|
||||
snd_emu10k1_init_stereo_onoff_control(controls + i++, SNDRV_CTL_NAME_IEC958("Optical Raw ",PLAYBACK,SWITCH), gpr, 0);
|
||||
gpr += 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -1444,7 +1444,7 @@ static int snd_es1371_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
|
|||
|
||||
/* spdif controls */
|
||||
static snd_kcontrol_new_t snd_es1371_mixer_spdif[] __devinitdata = {
|
||||
ES1371_SPDIF("IEC958 Playback Switch"),
|
||||
ES1371_SPDIF(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH)),
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
|
||||
|
|
|
@ -1155,10 +1155,10 @@ FM801_SINGLE("FM Playback Switch", FM801_FM_VOL, 15, 1, 1),
|
|||
static snd_kcontrol_new_t snd_fm801_controls_multi[] __devinitdata = {
|
||||
FM801_SINGLE("AC97 2ch->4ch Copy Switch", FM801_CODEC_CTRL, 7, 1, 0),
|
||||
FM801_SINGLE("AC97 18-bit Switch", FM801_CODEC_CTRL, 10, 1, 0),
|
||||
FM801_SINGLE("IEC958 Capture Switch", FM801_I2S_MODE, 8, 1, 0),
|
||||
FM801_SINGLE("IEC958 Raw Data Playback Switch", FM801_I2S_MODE, 9, 1, 0),
|
||||
FM801_SINGLE("IEC958 Raw Data Capture Switch", FM801_I2S_MODE, 10, 1, 0),
|
||||
FM801_SINGLE("IEC958 Playback Switch", FM801_GEN_CTRL, 2, 1, 0),
|
||||
FM801_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), FM801_I2S_MODE, 8, 1, 0),
|
||||
FM801_SINGLE(SNDRV_CTL_NAME_IEC958("Raw Data ",PLAYBACK,SWITCH), FM801_I2S_MODE, 9, 1, 0),
|
||||
FM801_SINGLE(SNDRV_CTL_NAME_IEC958("Raw Data ",CAPTURE,SWITCH), FM801_I2S_MODE, 10, 1, 0),
|
||||
FM801_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), FM801_GEN_CTRL, 2, 1, 0),
|
||||
};
|
||||
|
||||
static void snd_fm801_mixer_free_ac97_bus(ac97_bus_t *bus)
|
||||
|
|
|
@ -572,7 +572,7 @@ static snd_kcontrol_new_t ad1983_mixers[] = {
|
|||
},
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Playback Route",
|
||||
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
|
||||
.info = ad1983_spdif_route_info,
|
||||
.get = ad1983_spdif_route_get,
|
||||
.put = ad1983_spdif_route_put,
|
||||
|
@ -705,7 +705,7 @@ static snd_kcontrol_new_t ad1981_mixers[] = {
|
|||
/* identical with AD1983 */
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Playback Route",
|
||||
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
|
||||
.info = ad1983_spdif_route_info,
|
||||
.get = ad1983_spdif_route_get,
|
||||
.put = ad1983_spdif_route_put,
|
||||
|
|
|
@ -1422,7 +1422,7 @@ static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_switch __devinitdata
|
|||
|
||||
static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_switch __devinitdata = {
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Multi Capture Switch",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Multi ",CAPTURE,SWITCH),
|
||||
.info = snd_ice1712_pro_mixer_switch_info,
|
||||
.get = snd_ice1712_pro_mixer_switch_get,
|
||||
.put = snd_ice1712_pro_mixer_switch_put,
|
||||
|
@ -1441,7 +1441,7 @@ static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_volume __devinitdata
|
|||
|
||||
static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_volume __devinitdata = {
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Multi Capture Volume",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Multi ",CAPTURE,VOLUME),
|
||||
.info = snd_ice1712_pro_mixer_volume_info,
|
||||
.get = snd_ice1712_pro_mixer_volume_get,
|
||||
.put = snd_ice1712_pro_mixer_volume_put,
|
||||
|
@ -2203,7 +2203,7 @@ static snd_kcontrol_new_t snd_ice1712_mixer_pro_analog_route __devinitdata = {
|
|||
|
||||
static snd_kcontrol_new_t snd_ice1712_mixer_pro_spdif_route __devinitdata = {
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "IEC958 Playback Route",
|
||||
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
|
||||
.info = snd_ice1712_pro_route_info,
|
||||
.get = snd_ice1712_pro_route_spdif_get,
|
||||
.put = snd_ice1712_pro_route_spdif_put,
|
||||
|
|
|
@ -1466,7 +1466,7 @@ static snd_kcontrol_new_t snd_vt1724_spdif_switch __devinitdata =
|
|||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
/* FIXME: the following conflict with IEC958 Playback Route */
|
||||
// .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH),
|
||||
.name = "IEC958 Output Switch",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Output ",NONE,SWITCH),
|
||||
.info = snd_vt1724_spdif_sw_info,
|
||||
.get = snd_vt1724_spdif_sw_get,
|
||||
.put = snd_vt1724_spdif_sw_put
|
||||
|
|
|
@ -1484,7 +1484,7 @@ static int snd_via8233_dxs3_spdif_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
|
|||
}
|
||||
|
||||
static snd_kcontrol_new_t snd_via8233_dxs3_spdif_control __devinitdata = {
|
||||
.name = "IEC958 Output Switch",
|
||||
.name = SNDRV_CTL_NAME_IEC958("Output ",NONE,SWITCH),
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.info = snd_via8233_dxs3_spdif_info,
|
||||
.get = snd_via8233_dxs3_spdif_get,
|
||||
|
|
Загрузка…
Ссылка в новой задаче