From: Takashi Iwai <tiwai@suse.de>
To: Adrian Pardini <pardo.bsso@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c
Date: Fri, 30 Jul 2010 14:24:45 +0200 [thread overview]
Message-ID: <s5hocdpp376.wl%tiwai@suse.de> (raw)
In-Reply-To: <201007201942.28942.pardo.bsso@gmail.com>
At Tue, 20 Jul 2010 19:42:28 -0300,
Adrian Pardini wrote:
>
> Hi all, this series of patches adds another control to cm6206 based cards to
> let the user select wich ouput the "Headphone" jack mirrors. Please review.
You can just remove "static" instead of moving the whole function,
right?
thanks,
Takashi
>
> Thanks.
>
> Signed-off-by: Adrian Pardini <adrian.pardini@solar.org.ar>
>
> diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
> index e7df1e5..c4cbbc0 100644
> --- a/sound/usb/mixer_quirks.c
> +++ b/sound/usb/mixer_quirks.c
> @@ -354,6 +354,22 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
> }
> }
>
> +/*
> + * C-Media CM106/CM106+ have four 16-bit internal registers that are nicely
> + * documented in the device's data sheet.
> + */
> +int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value)
> +{
> + u8 buf[4];
> + buf[0] = 0x20;
> + buf[1] = value & 0xff;
> + buf[2] = (value >> 8) & 0xff;
> + buf[3] = reg;
> + return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION,
> + USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT,
> + 0, 0, &buf, 4, 1000);
> +}
> +
> int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
> {
> int err;
> diff --git a/sound/usb/mixer_quirks.h b/sound/usb/mixer_quirks.h
> index bdbfab0..bc5d577 100644
> --- a/sound/usb/mixer_quirks.h
> +++ b/sound/usb/mixer_quirks.h
> @@ -9,5 +9,7 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
> void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer,
> int unitid);
>
> +int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value);
> +
> #endif /* SND_USB_MIXER_QUIRKS_H */
>
> diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
> index 9a9da09..b8a5a18 100644
> --- a/sound/usb/quirks.c
> +++ b/sound/usb/quirks.c
> @@ -353,22 +353,6 @@ static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev)
> return 0;
> }
>
> -/*
> - * C-Media CM106/CM106+ have four 16-bit internal registers that are nicely
> - * documented in the device's data sheet.
> - */
> -static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value)
> -{
> - u8 buf[4];
> - buf[0] = 0x20;
> - buf[1] = value & 0xff;
> - buf[2] = (value >> 8) & 0xff;
> - buf[3] = reg;
> - return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION,
> - USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT,
> - 0, 0, &buf, 4, 1000);
> -}
> -
> static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
> {
> /*
> --
> 1.5.4.3
>
>
>
> --
> Adrian.
> http://elesquinazotango.com.ar
> http://www.noalcodigodescioli.blogspot.com/
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2010-07-30 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 22:42 [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c Adrian Pardini
2010-07-20 22:44 ` [PATCH - usb: Headphone support for cm6206 2/2] usb: adds headphone source and mute controls to cm6206 Adrian Pardini
2010-07-30 12:31 ` Takashi Iwai
2010-07-30 14:51 ` Adrian Pardini
2010-07-30 15:08 ` Takashi Iwai
2010-07-30 12:24 ` Takashi Iwai [this message]
2010-07-30 14:39 ` [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c Adrian Pardini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hocdpp376.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=pardo.bsso@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox