aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-03-11 15:13:20 -0500
committerTakashi Iwai <tiwai@suse.de>2010-03-12 06:19:49 -0500
commit7e847894039d7590321de306fca2b1ae58662f29 (patch)
tree09ff9fc43280cf3263a0501fec6b6feee50e8939 /sound/usb
parent36e632d61ae2febf55d5cd93b9e5ae0f5a5c6207 (diff)
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/usb')
-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 @@
45#include <linux/moduleparam.h> 45#include <linux/moduleparam.h>
46#include <linux/mutex.h> 46#include <linux/mutex.h>
47#include <linux/usb/audio.h> 47#include <linux/usb/audio.h>
48#include <linux/usb/audio-v2.h>
48 49
49#include <sound/core.h> 50#include <sound/core.h>
50#include <sound/info.h> 51#include <sound/info.h>
@@ -250,7 +251,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
250 * clock selectors and sample rate conversion units. */ 251 * clock selectors and sample rate conversion units. */
251 252
252 cs = snd_usb_find_csint_desc(host_iface->extra, host_iface->extralen, 253 cs = snd_usb_find_csint_desc(host_iface->extra, host_iface->extralen,
253 NULL, UAC_CLOCK_SOURCE); 254 NULL, UAC2_CLOCK_SOURCE);
254 255
255 if (!cs) { 256 if (!cs) {
256 snd_printk(KERN_ERR "CLOCK_SOURCE descriptor not found\n"); 257 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 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include <linux/usb/audio.h> 20#include <linux/usb/audio.h>
21#include <linux/usb/audio-v2.h>
21 22
22#include <sound/core.h> 23#include <sound/core.h>
23#include <sound/pcm.h> 24#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 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include <linux/usb/audio.h> 20#include <linux/usb/audio.h>
21#include <linux/usb/audio-v2.h>
21 22
22#include <sound/core.h> 23#include <sound/core.h>
23#include <sound/pcm.h> 24#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 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/usb.h> 18#include <linux/usb.h>
19#include <linux/usb/audio.h> 19#include <linux/usb/audio.h>
20#include <linux/usb/audio-v2.h>
20 21
21#include <sound/core.h> 22#include <sound/core.h>
22#include <sound/pcm.h> 23#include <sound/pcm.h>
@@ -215,7 +216,7 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface,
215 data[3] = rate >> 24; 216 data[3] = rate >> 24;
216 if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR, 217 if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
217 USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_OUT, 218 USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_OUT,
218 0x0100, chip->clock_id << 8, 219 UAC2_CS_CONTROL_SAM_FREQ << 8, chip->clock_id << 8,
219 data, sizeof(data), 1000)) < 0) { 220 data, sizeof(data), 1000)) < 0) {
220 snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d (v2)\n", 221 snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d (v2)\n",
221 dev->devnum, iface, fmt->altsetting, rate); 222 dev->devnum, iface, fmt->altsetting, rate);
@@ -223,7 +224,7 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface,
223 } 224 }
224 if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, 225 if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
225 USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, 226 USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
226 0x0100, chip->clock_id << 8, 227 UAC2_CS_CONTROL_SAM_FREQ << 8, chip->clock_id << 8,
227 data, sizeof(data), 1000)) < 0) { 228 data, sizeof(data), 1000)) < 0) {
228 snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n", 229 snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n",
229 dev->devnum, iface, fmt->altsetting); 230 dev->devnum, iface, fmt->altsetting);