summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-03-04 19:46:14 +0100
committerTakashi Iwai <tiwai@suse.de>2010-03-05 08:18:07 +0100
commite11b4e0e4f5ab40ec342dc07b7201c09a45f9574 (patch)
tree9157d227a8bbbcff27235900c3720450cd4bed7f
parente5779998bf8b70e48a6cc208c8b61b33bd6117ea (diff)
downloadlinux-e11b4e0e4f5ab40ec342dc07b7201c09a45f9574.tar.gz
linux-e11b4e0e4f5ab40ec342dc07b7201c09a45f9574.tar.bz2
linux-e11b4e0e4f5ab40ec342dc07b7201c09a45f9574.zip
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>
-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 {
struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */
unsigned int cur_rate; /* current rate (for hw_params callback) */
unsigned int period_bytes; /* current period bytes (for hw_params callback) */
- unsigned int format; /* USB data format */
+ unsigned int altset_idx; /* USB data format: index of alternate setting */
unsigned int datapipe; /* the data i/o pipe */
unsigned int syncpipe; /* 1 - async out or adaptive in */
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)
return -EIO;
}
subs->interface = -1;
- subs->format = 0;
+ subs->altset_idx = 0;
}
/* set interface */
- if (subs->interface != fmt->iface || subs->format != fmt->altset_idx) {
+ if (subs->interface != fmt->iface || subs->altset_idx != fmt->altset_idx) {
if (usb_set_interface(dev, fmt->iface, fmt->altsetting) < 0) {
snd_printk(KERN_ERR "%d:%d:%d: usb_set_interface failed\n",
dev->devnum, fmt->iface, fmt->altsetting);
@@ -214,7 +214,7 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
}
snd_printdd(KERN_INFO "setting usb interface %d:%d\n", fmt->iface, fmt->altsetting);
subs->interface = fmt->iface;
- subs->format = fmt->altset_idx;
+ subs->altset_idx = fmt->altset_idx;
}
/* create a data pipe */
@@ -771,7 +771,7 @@ static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction)
struct snd_usb_substream *subs = &as->substream[direction];
subs->interface = -1;
- subs->format = 0;
+ subs->altset_idx = 0;
runtime->hw = snd_usb_hardware;
runtime->private_data = subs;
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
unsigned int i;
snd_iprintf(buffer, " Status: Running\n");
snd_iprintf(buffer, " Interface = %d\n", subs->interface);
- snd_iprintf(buffer, " Altset = %d\n", subs->format);
+ snd_iprintf(buffer, " Altset = %d\n", subs->altset_idx);
snd_iprintf(buffer, " URBs = %d [ ", subs->nurbs);
for (i = 0; i < subs->nurbs; i++)
snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);