[alsa-devel] [PATCH 7/7] M-Audio Fast Track Ultra: Add effect controls

Felix Homann linuxaudio at showlabor.de
Mon Apr 23 18:07:40 CEST 2012


Hi again,

2012/4/23 Takashi Iwai <tiwai at suse.de>:
>>
>> -     static char *texts[8] = {"Room 1",
>> -                              "Room 2",
>> -                              "Room 3",
>> -                              "Hall 1",
>> -                              "Hall 2",
>> -                              "Plate",
>> -                              "Delay",
>> -                              "Echo"
>> +     static const char *texts[8] = {"Room 1",
>
> Write it in the first place in that way.

Sure, would be better.

>
>
>> +                                    "Room 2",
>> +                                    "Room 3",
>> +                                    "Hall 1",
>> +                                    "Hall 2",
>> +                                    "Plate",
>> +                                    "Delay",
>> +                                    "Echo"
>>       };
>>
>>       uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
>> @@ -614,6 +614,13 @@ static int snd_ftu_eff_switch_get(struct snd_kcontrol *kctl,
>>       int err;
>>       unsigned char value[2];
>>
>> +     const int id = 6;
>> +     const int validx = 1;
>> +     const int val_len = 2;
>> +
>> +     value[0] = 0x00;
>> +     value[1] = 0x00;
>> +
>>       pval = (struct snd_ftu_eff_switch_priv_val *)
>>               kctl->private_value;
>>
>> @@ -630,14 +637,6 @@ static int snd_ftu_eff_switch_get(struct snd_kcontrol *kctl,
>>       if (snd_BUG_ON(!chip))
>>               return -EINVAL;
>>
>> -     const int id = 6;
>> -     const int validx = 1;
>> -     const int val_type = USB_MIXER_S16;
>
> Ditto.  Not good to fix something in a later patch if you already know
> it should be fixed.

If I had known I would have done...

Regards,

Felix


More information about the Alsa-devel mailing list