All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c
@ 2010-07-20 22:42 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:24 ` [PATCH - usb: Headphone support for cm6206 1/2] usb: move snd_usb_cm106_write_int_reg to mixer_quirks.c Takashi Iwai
  0 siblings, 2 replies; 7+ messages in thread
From: Adrian Pardini @ 2010-07-20 22:42 UTC (permalink / raw)
  To: alsa-devel

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/

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-30 15:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.