Ejemplo n.º 1
0
static int __init snd_gusmax_mixer(cs4231_t *chip)
{
    snd_card_t *card = chip->card;
    snd_ctl_elem_id_t id1, id2;
    int err;

    memset(&id1, 0, sizeof(id1));
    memset(&id2, 0, sizeof(id2));
    id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
    /* reassign AUXA to SYNTHESIZER */
    strcpy(id1.name, "Aux Playback Switch");
    strcpy(id2.name, "Synth Playback Switch");
    if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
        return err;
    strcpy(id1.name, "Aux Playback Volume");
    strcpy(id2.name, "Synth Playback Volume");
    if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
        return err;
    /* reassign AUXB to CD */
    strcpy(id1.name, "Aux Playback Switch");
    id1.index = 1;
    strcpy(id2.name, "CD Playback Switch");
    if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
        return err;
    strcpy(id1.name, "Aux Playback Volume");
    strcpy(id2.name, "CD Playback Volume");
    if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
        return err;
#if 0
    /* reassign Mono Input to MIC */
    if (snd_mixer_group_rename(mixer,
                               SNDRV_MIXER_IN_MONO, 0,
                               SNDRV_MIXER_IN_MIC, 0) < 0)
        goto __error;
    if (snd_mixer_elem_rename(mixer,
                              SNDRV_MIXER_IN_MONO, 0, SNDRV_MIXER_ETYPE_INPUT,
                              SNDRV_MIXER_IN_MIC, 0) < 0)
        goto __error;
    if (snd_mixer_elem_rename(mixer,
                              "Mono Capture Volume", 0, SNDRV_MIXER_ETYPE_VOLUME1,
                              "Mic Capture Volume", 0) < 0)
        goto __error;
    if (snd_mixer_elem_rename(mixer,
                              "Mono Capture Switch", 0, SNDRV_MIXER_ETYPE_SWITCH1,
                              "Mic Capture Switch", 0) < 0)
        goto __error;
#endif
    return 0;
}
Ejemplo n.º 2
0
static int __devinit snd_gusmax_mixer(struct snd_wss *chip)
{
	struct snd_card *card = chip->card;
	struct snd_ctl_elem_id id1, id2;
	int err;
	
	memset(&id1, 0, sizeof(id1));
	memset(&id2, 0, sizeof(id2));
	id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
	
	strcpy(id1.name, "Aux Playback Switch");
	strcpy(id2.name, "Synth Playback Switch");
	if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
		return err;
	strcpy(id1.name, "Aux Playback Volume");
	strcpy(id2.name, "Synth Playback Volume");
	if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
		return err;
	
	strcpy(id1.name, "Aux Playback Switch"); id1.index = 1;
	strcpy(id2.name, "CD Playback Switch");
	if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
		return err;
	strcpy(id1.name, "Aux Playback Volume");
	strcpy(id2.name, "CD Playback Volume");
	if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0)
		return err;
#if 0
	
	if (snd_mixer_group_rename(mixer,
				SNDRV_MIXER_IN_MONO, 0,
				SNDRV_MIXER_IN_MIC, 0) < 0)
		goto __error;
	if (snd_mixer_elem_rename(mixer,
				SNDRV_MIXER_IN_MONO, 0, SNDRV_MIXER_ETYPE_INPUT,
				SNDRV_MIXER_IN_MIC, 0) < 0)
		goto __error;
	if (snd_mixer_elem_rename(mixer,
				"Mono Capture Volume", 0, SNDRV_MIXER_ETYPE_VOLUME1,
				"Mic Capture Volume", 0) < 0)
		goto __error;
	if (snd_mixer_elem_rename(mixer,
				"Mono Capture Switch", 0, SNDRV_MIXER_ETYPE_SWITCH1,
				"Mic Capture Switch", 0) < 0)
		goto __error;
#endif
	return 0;
}