aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-03-04 13:46:14 -0500
committerTakashi Iwai <tiwai@suse.de>2010-03-05 02:18:07 -0500
commite11b4e0e4f5ab40ec342dc07b7201c09a45f9574 (patch)
tree9157d227a8bbbcff27235900c3720450cd4bed7f /sound
parente5779998bf8b70e48a6cc208c8b61b33bd6117ea (diff)
ALSA: usb-audio: rename substream format field to altset_idx
The snd_usb_substream::format field actually contains the index of the current alternate setting, so rename it to altset_idx to avoid confusion. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/card.h2
-rw-r--r--sound/usb/pcm.c8
-rw-r--r--sound/usb/proc.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 71f03c151030..856d71b7407d 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -54,7 +54,7 @@ struct snd_usb_substream {
54 struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */ 54 struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */
55 unsigned int cur_rate; /* current rate (for hw_params callback) */ 55 unsigned int cur_rate; /* current rate (for hw_params callback) */
56 unsigned int period_bytes; /* current period bytes (for hw_params callback) */ 56 unsigned int period_bytes; /* current period bytes (for hw_params callback) */
57 unsigned int format; /* USB data format */ 57 unsigned int altset_idx; /* USB data format: index of alternate setting */
58 unsigned int datapipe; /* the data i/o pipe */ 58 unsigned int datapipe; /* the data i/o pipe */
59 unsigned int syncpipe; /* 1 - async out or adaptive in */ 59 unsigned int syncpipe; /* 1 - async out or adaptive in */
60 unsigned int datainterval; /* log_2 of data packet interval */ 60 unsigned int datainterval; /* log_2 of data packet interval */
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 87863ccf9068..c3d5a977cfed 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -202,11 +202,11 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
202 return -EIO; 202 return -EIO;
203 } 203 }
204 subs->interface = -1; 204 subs->interface = -1;
205 subs->format = 0; 205 subs->altset_idx = 0;
206 } 206 }
207 207
208 /* set interface */ 208 /* set interface */
209 if (subs->interface != fmt->iface || subs->format != fmt->altset_idx) { 209 if (subs->interface != fmt->iface || subs->altset_idx != fmt->altset_idx) {
210 if (usb_set_interface(dev, fmt->iface, fmt->altsetting) < 0) { 210 if (usb_set_interface(dev, fmt->iface, fmt->altsetting) < 0) {
211 snd_printk(KERN_ERR "%d:%d:%d: usb_set_interface failed\n", 211 snd_printk(KERN_ERR "%d:%d:%d: usb_set_interface failed\n",
212 dev->devnum, fmt->iface, fmt->altsetting); 212 dev->devnum, fmt->iface, fmt->altsetting);
@@ -214,7 +214,7 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
214 } 214 }
215 snd_printdd(KERN_INFO "setting usb interface %d:%d\n", fmt->iface, fmt->altsetting); 215 snd_printdd(KERN_INFO "setting usb interface %d:%d\n", fmt->iface, fmt->altsetting);
216 subs->interface = fmt->iface; 216 subs->interface = fmt->iface;
217 subs->format = fmt->altset_idx; 217 subs->altset_idx = fmt->altset_idx;
218 } 218 }
219 219
220 /* create a data pipe */ 220 /* create a data pipe */
@@ -771,7 +771,7 @@ static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction)
771 struct snd_usb_substream *subs = &as->substream[direction]; 771 struct snd_usb_substream *subs = &as->substream[direction];
772 772
773 subs->interface = -1; 773 subs->interface = -1;
774 subs->format = 0; 774 subs->altset_idx = 0;
775 runtime->hw = snd_usb_hardware; 775 runtime->hw = snd_usb_hardware;
776 runtime->private_data = subs; 776 runtime->private_data = subs;
777 subs->pcm_substream = substream; 777 subs->pcm_substream = substream;
diff --git a/sound/usb/proc.c b/sound/usb/proc.c
index be3065ea1afa..78fc3ba2522c 100644
--- a/sound/usb/proc.c
+++ b/sound/usb/proc.c
@@ -116,7 +116,7 @@ static void proc_dump_substream_status(struct snd_usb_substream *subs, struct sn
116 unsigned int i; 116 unsigned int i;
117 snd_iprintf(buffer, " Status: Running\n"); 117 snd_iprintf(buffer, " Status: Running\n");
118 snd_iprintf(buffer, " Interface = %d\n", subs->interface); 118 snd_iprintf(buffer, " Interface = %d\n", subs->interface);
119 snd_iprintf(buffer, " Altset = %d\n", subs->format); 119 snd_iprintf(buffer, " Altset = %d\n", subs->altset_idx);
120 snd_iprintf(buffer, " URBs = %d [ ", subs->nurbs); 120 snd_iprintf(buffer, " URBs = %d [ ", subs->nurbs);
121 for (i = 0; i < subs->nurbs; i++) 121 for (i = 0; i < subs->nurbs; i++)
122 snd_iprintf(buffer, "%d ", subs->dataurb[i].packets); 122 snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);