On Wed, Mar 04, 2009 at 10:47:09AM +0900, Joonyoung Shim wrote:
The length of long control name doesn't include the length of widget name at present when widget->id is snd_soc_dapm_switch, so the long control name of dapm_switch is shortened. To avoid this problem, the long control name only for dapm_mixer_named_ctl must have simply the kcontrol name.
This is a good catch - thanks!
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.
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.