From: Adrian Pardini <pardo.bsso@gmail.com>
To: alsa-devel@alsa-project.org
Subject: [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c
Date: Tue, 20 Jul 2010 19:42:28 -0300 [thread overview]
Message-ID: <201007201942.28942.pardo.bsso@gmail.com> (raw)
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.
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/
next reply other threads:[~2010-07-20 22:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 22:42 Adrian Pardini [this message]
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 ` [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c Takashi Iwai
2010-07-30 14:39 ` 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=201007201942.28942.pardo.bsso@gmail.com \
--to=pardo.bsso@gmail.com \
--cc=alsa-devel@alsa-project.org \
/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