summaryrefslogtreecommitdiff
path: root/sound/usb/proc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-13 12:57:39 +0200
committerTakashi Iwai <tiwai@suse.de>2012-04-13 12:57:39 +0200
commit22026c1a7be900cc6dabd6be37a77bb217d2d837 (patch)
tree138c95fe7c5020ef57dc30afe43f82ab6c7030a7 /sound/usb/proc.c
parent85f71932e5f22c8f4a28e09b2c27083839aa5bed (diff)
downloadlinux-3.10-22026c1a7be900cc6dabd6be37a77bb217d2d837.tar.gz
linux-3.10-22026c1a7be900cc6dabd6be37a77bb217d2d837.tar.bz2
linux-3.10-22026c1a7be900cc6dabd6be37a77bb217d2d837.zip
ALSA: usb: Remove obsoleted fields from struct snd_usb_substream
Many fields have been moved to struct snd_usb_endpoint. Also fix the proc output to correspond to the new structure. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/proc.c')
-rw-r--r--sound/usb/proc.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/sound/usb/proc.c b/sound/usb/proc.c
index 961c9a25068..06e23d89d11 100644
--- a/sound/usb/proc.c
+++ b/sound/usb/proc.c
@@ -115,6 +115,25 @@ static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct s
}
}
+static void proc_dump_ep_status(struct snd_usb_substream *subs,
+ struct snd_usb_endpoint *ep,
+ struct snd_info_buffer *buffer)
+{
+ if (!ep)
+ return;
+ snd_iprintf(buffer, " Packet Size = %d\n", ep->curpacksize);
+ snd_iprintf(buffer, " Momentary freq = %u Hz (%#x.%04x)\n",
+ snd_usb_get_speed(subs->dev) == USB_SPEED_FULL
+ ? get_full_speed_hz(ep->freqm)
+ : get_high_speed_hz(ep->freqm),
+ ep->freqm >> 16, ep->freqm & 0xffff);
+ if (ep->freqshift != INT_MIN) {
+ int res = 16 - ep->freqshift;
+ snd_iprintf(buffer, " Feedback Format = %d.%d\n",
+ (ep->syncmaxsize > 3 ? 32 : 24) - res, res);
+ }
+}
+
static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
{
if (subs->running) {
@@ -126,17 +145,8 @@ static void proc_dump_substream_status(struct snd_usb_substream *subs, struct sn
for (i = 0; i < subs->nurbs; i++)
snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);
snd_iprintf(buffer, "]\n");
- snd_iprintf(buffer, " Packet Size = %d\n", subs->curpacksize);
- snd_iprintf(buffer, " Momentary freq = %u Hz (%#x.%04x)\n",
- snd_usb_get_speed(subs->dev) == USB_SPEED_FULL
- ? get_full_speed_hz(subs->freqm)
- : get_high_speed_hz(subs->freqm),
- subs->freqm >> 16, subs->freqm & 0xffff);
- if (subs->freqshift != INT_MIN)
- snd_iprintf(buffer, " Feedback Format = %d.%d\n",
- (subs->syncmaxsize > 3 ? 32 : 24)
- - (16 - subs->freqshift),
- 16 - subs->freqshift);
+ proc_dump_ep_status(subs, subs->data_endpoint, buffer);
+ proc_dump_ep_status(subs, subs->sync_endpoint, buffer);
} else {
snd_iprintf(buffer, " Status: Stop\n");
}