[alsa-devel] [PATCH] ASoC: Fix long name of control for dapm_switch

Joonyoung Shim dofmind at gmail.com
Fri Mar 6 01:02:16 CET 2009


> Unfortunately your patch doesn't apply against the current topic/asoc
> branch of Takashi's repository, I've implemented a slightly different
> version of it.
>
>> -                       name_len = strlen(w->kcontrols[i].name) + 1;
>> -                       if (w->id == snd_soc_dapm_mixer)
>> -                               name_len += 1 + strlen(w->name);
>> +                       if (w->id == snd_soc_dapm_mixer_named_ctl)
>> +                               name_len = strlen(w->kcontrols[i].name) + 1;
>> +                       else
>> +                               name_len = 2 + strlen(w->name)
>> +                                       + strlen(w->kcontrols[i].name);
>
> Here I just changed the test to != named_ctl.

ok, i will resend the patch.

>
>>
>> -                       switch (w->id) {
>> -                       case snd_soc_dapm_mixer:
>> -                       default:
>
> Your chanegs here appear to only flip to an if/else from a switch
> statement?  Please mention things like this in your commit logs (or
> split them into separate patches) - it makes your changes easier to
> review.

I think that a switch statement is used unnecessarily because this part has
only to check whether w->id is named_ctl.
ok, i will send them into splited patches.
Thanks.


-- 
- Joonyoung Shim


More information about the Alsa-devel mailing list