[alsa-devel] [PATCH 002/003] snd-powermac: AWACS and Screamer mixers for PM7500, Beige, and iMac SL
Takashi Iwai
tiwai at suse.de
Tue Apr 15 14:35:23 CEST 2008
At Mon, 14 Apr 2008 20:12:44 +0300,
Risto Suominen wrote:
>
> From: Risto Suominen <Risto.Suominen at gmail.com>
>
> Add mixer controls and correct headphone detection bits for PowerMacs
> 7300/7500 (AWACS) and G3 Beige (Screamer), and iMac G3 Slot-loading
> (Screamer).
>
> Signed-off-by: Risto Suominen <Risto.Suominen at gmail.com>
> ---
> Kernel version 2.6.25-rc8 (probably any 2.6)
>
> --- sound/ppc/awacs.c.orig 2008-04-05 17:45:08.000000000 +0300
> +++ sound/ppc/awacs.c 2008-04-07 11:24:08.108621048 +0300
> @@ -141,7 +141,7 @@ static int snd_pmac_awacs_info_volume(st
> uinfo->value.integer.max = 15;
> return 0;
> }
> -
> +
The embedded patch seems broken. Could you check your MUA?
> static int snd_pmac_awacs_get_volume(struct snd_kcontrol *kcontrol,
> struct snd_ctl_elem_value *ucontrol)
> {
> @@ -267,7 +267,8 @@ static int snd_pmac_awacs_put_switch(str
> static void awacs_set_cuda(int reg, int val)
> {
> struct adb_request req;
> - cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC, 0x8a, reg, val);
> + cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC, 0x8a,
> + reg, val);
> while (! req.complete)
> cuda_poll();
> }
The coding style fixes should be in a dedicated patch.
Otherwise it makes hard to follow the logical changes.
> @@ -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.
> -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.
Thanks,
Takashi
More information about the Alsa-devel
mailing list