summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-03-11 23:13:20 +0300
committerTakashi Iwai <tiwai@suse.de>2010-03-12 14:19:49 +0300
commit7e847894039d7590321de306fca2b1ae58662f29 (patch)
tree09ff9fc43280cf3263a0501fec6b6feee50e8939 /sound
parent36e632d61ae2febf55d5cd93b9e5ae0f5a5c6207 (diff)
downloadlinux-7e847894039d7590321de306fca2b1ae58662f29.tar.xz
linux/usb/audio.h: split header
- Split the audio.h file in two to clearly denote the differences between the standards. - Add many more defines to audio-v2.h. Most of them are not currently used. - Replaced a magic value with a proper define Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/card.c3
-rw-r--r--sound/usb/endpoint.c1
-rw-r--r--sound/usb/format.c1
-rw-r--r--sound/usb/pcm.c5
4 files changed, 7 insertions, 3 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 426aabc729d9..78d12ff00e8a 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -45,6 +45,7 @@
#include <linux/moduleparam.h>
#include <linux/mutex.h>
#include <linux/usb/audio.h>
+#include <linux/usb/audio-v2.h>
#include <sound/core.h>
#include <sound/info.h>
@@ -250,7 +251,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
* clock selectors and sample rate conversion units. */
cs = snd_usb_find_csint_desc(host_iface->extra, host_iface->extralen,
- NULL, UAC_CLOCK_SOURCE);
+ NULL, UAC2_CLOCK_SOURCE);
if (!cs) {
snd_printk(KERN_ERR "CLOCK_SOURCE descriptor not found\n");
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 91850f84cad6..b1309cdc1ac0 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
+#include <linux/usb/audio-v2.h>
#include <sound/core.h>
#include <sound/pcm.h>
diff --git a/sound/usb/format.c b/sound/usb/format.c
index b613e0aaeb63..0e04efe9551e 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
+#include <linux/usb/audio-v2.h>
#include <sound/core.h>
#include <sound/pcm.h>
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index e0f3f87f99a0..630e2203b344 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -17,6 +17,7 @@
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
+#include <linux/usb/audio-v2.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -215,7 +216,7 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface,
data[3] = rate >> 24;
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_OUT,
- 0x0100, chip->clock_id << 8,
+ UAC2_CS_CONTROL_SAM_FREQ << 8, chip->clock_id << 8,
data, sizeof(data), 1000)) < 0) {
snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d (v2)\n",
dev->devnum, iface, fmt->altsetting, rate);
@@ -223,7 +224,7 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface,
}
if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
- 0x0100, chip->clock_id << 8,
+ UAC2_CS_CONTROL_SAM_FREQ << 8, chip->clock_id << 8,
data, sizeof(data), 1000)) < 0) {
snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n",
dev->devnum, iface, fmt->altsetting);