[alsa-devel] [PATCH 002/003] snd-powermac: AWACS and Screamer mixers for PM7500, Beige, and iMac SL

Risto Suominen risto.suominen at gmail.com
Tue Apr 15 19:56:00 CEST 2008


2008/4/15, Takashi Iwai <tiwai at suse.de>:
>
> The embedded patch seems broken.  Could you check your MUA?
>
Hmm, looks like copying from the other list changed tabs to spaces.

>
>
> The coding style fixes should be in a dedicated patch.
>  Otherwise it makes hard to follow the logical changes.
>
I'll split it in 2.

>
>  > @@ -493,14 +500,14 @@ static struct snd_kcontrol_new snd_pmac_
>  >         .private_value = AMP_CH_HD,
>  >       },
>  >       { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
>  > -       .name = "Tone Control - Bass",
>  > +       .name = "Tone Control - Bass Playback Volume",
>
>
> This shouldn't be changed.  "Tone Control - Bass" is the correct
>  standard control name.
>
>
>  >         .info = snd_pmac_awacs_info_tone_amp,
>  >         .get = snd_pmac_awacs_get_tone_amp,
>  >         .put = snd_pmac_awacs_put_tone_amp,
>  >         .private_value = 0,
>  >       },
>  >       { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
>  > -       .name = "Tone Control - Treble",
>  > +       .name = "Tone Control - Treble Playback Volume",
>
>
> Ditto.
>
The reason for this was that the tone controls appeared on Capture
page, too, even though they don't actually belong there.

>
>  > -static int build_mixers(struct snd_pmac *chip, int nums, struct
>  > snd_kcontrol_new *mixers)
>  > +static int build_mixers(struct snd_pmac *chip, int nums,
>  > +                     struct snd_kcontrol_new *mixers)
>  >  {
>  >       int i, err;
>  >
>  >       for (i = 0; i < nums; i++) {
>  > -             if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&mixers[i], chip))) < 0)
>  > +             if ((err = snd_ctl_add(chip->card,
>  > +                                    snd_ctl_new1(&mixers[i], chip))) < 0)
>  >                       return err;
>
>
> This "if ((err = ..." doesn't comply the standard coding style.
>  Try once checkpatch.pl script included in $LINUX/scripts.
>
Actually, I did, and it complained, but I think it made an error. It
somehow didn't see the 'less than' comparison.

Risto


More information about the Alsa-devel mailing list