[alsa-devel] [PATCH - usb: Headphone support for cm6206 2/2] usb: adds headphone source and mute controls to cm6206
Takashi Iwai
tiwai at suse.de
Fri Jul 30 14:31:38 CEST 2010
At Tue, 20 Jul 2010 19:44:29 -0300,
Adrian Pardini wrote:
>
> +static int snd_cm6206_headphone_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
Try to avoid too long lines. Once when you feed your patch to
scripts/checkpatch.pl, you'll see it :)
> +static int snd_cm6206_headphone_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
> +{
> + struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
> + struct usb_device *dev = mixer->chip->dev;
> +
Remove a blank line here.
> + u16 reg2 = mixer->cm6206reg2;
I think the corresponding change in mixer.h is missing?
> + u16 idx = kcontrol->private_value = ucontrol->value.integer.value[0];
> +
> + reg2 = (u16)((((1<<7) | (idx<<5))<<8) | (reg2 & 0x1800));
We are no lispers. Please reduce parentheses. Also avoid unnecessary
cast.
thanks,
Takashi
More information about the Alsa-devel
mailing list