diff options
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/card.h | 15 | ||||
-rw-r--r-- | sound/usb/proc.c | 32 |
2 files changed, 21 insertions, 26 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index 8a08687e5bc0..77d2eec5e897 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h | |||
@@ -115,21 +115,6 @@ struct snd_usb_substream { | |||
115 | unsigned int cur_rate; /* current rate (for hw_params callback) */ | 115 | unsigned int cur_rate; /* current rate (for hw_params callback) */ |
116 | unsigned int period_bytes; /* current period bytes (for hw_params callback) */ | 116 | unsigned int period_bytes; /* current period bytes (for hw_params callback) */ |
117 | unsigned int altset_idx; /* USB data format: index of alternate setting */ | 117 | unsigned int altset_idx; /* USB data format: index of alternate setting */ |
118 | unsigned int datapipe; /* the data i/o pipe */ | ||
119 | unsigned int syncpipe; /* 1 - async out or adaptive in */ | ||
120 | unsigned int datainterval; /* log_2 of data packet interval */ | ||
121 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ | ||
122 | unsigned int freqn; /* nominal sampling rate in fs/fps in Q16.16 format */ | ||
123 | unsigned int freqm; /* momentary sampling rate in fs/fps in Q16.16 format */ | ||
124 | int freqshift; /* how much to shift the feedback value to get Q16.16 */ | ||
125 | unsigned int freqmax; /* maximum sampling rate, used for buffer management */ | ||
126 | unsigned int phase; /* phase accumulator */ | ||
127 | unsigned int maxpacksize; /* max packet size in bytes */ | ||
128 | unsigned int maxframesize; /* max packet size in frames */ | ||
129 | unsigned int curpacksize; /* current packet size in bytes (for capture) */ | ||
130 | unsigned int curframesize; /* current packet size in frames (for capture) */ | ||
131 | unsigned int syncmaxsize; /* sync endpoint packet size */ | ||
132 | unsigned int fill_max: 1; /* fill max packet size always */ | ||
133 | unsigned int txfr_quirk:1; /* allow sub-frame alignment */ | 118 | unsigned int txfr_quirk:1; /* allow sub-frame alignment */ |
134 | unsigned int fmt_type; /* USB audio format type (1-3) */ | 119 | unsigned int fmt_type; /* USB audio format type (1-3) */ |
135 | 120 | ||
diff --git a/sound/usb/proc.c b/sound/usb/proc.c index 961c9a250686..06e23d89d111 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 | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | static void proc_dump_ep_status(struct snd_usb_substream *subs, | ||
119 | struct snd_usb_endpoint *ep, | ||
120 | struct snd_info_buffer *buffer) | ||
121 | { | ||
122 | if (!ep) | ||
123 | return; | ||
124 | snd_iprintf(buffer, " Packet Size = %d\n", ep->curpacksize); | ||
125 | snd_iprintf(buffer, " Momentary freq = %u Hz (%#x.%04x)\n", | ||
126 | snd_usb_get_speed(subs->dev) == USB_SPEED_FULL | ||
127 | ? get_full_speed_hz(ep->freqm) | ||
128 | : get_high_speed_hz(ep->freqm), | ||
129 | ep->freqm >> 16, ep->freqm & 0xffff); | ||
130 | if (ep->freqshift != INT_MIN) { | ||
131 | int res = 16 - ep->freqshift; | ||
132 | snd_iprintf(buffer, " Feedback Format = %d.%d\n", | ||
133 | (ep->syncmaxsize > 3 ? 32 : 24) - res, res); | ||
134 | } | ||
135 | } | ||
136 | |||
118 | static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer) | 137 | static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer) |
119 | { | 138 | { |
120 | if (subs->running) { | 139 | if (subs->running) { |
@@ -126,17 +145,8 @@ static void proc_dump_substream_status(struct snd_usb_substream *subs, struct sn | |||
126 | for (i = 0; i < subs->nurbs; i++) | 145 | for (i = 0; i < subs->nurbs; i++) |
127 | snd_iprintf(buffer, "%d ", subs->dataurb[i].packets); | 146 | snd_iprintf(buffer, "%d ", subs->dataurb[i].packets); |
128 | snd_iprintf(buffer, "]\n"); | 147 | snd_iprintf(buffer, "]\n"); |
129 | snd_iprintf(buffer, " Packet Size = %d\n", subs->curpacksize); | 148 | proc_dump_ep_status(subs, subs->data_endpoint, buffer); |
130 | snd_iprintf(buffer, " Momentary freq = %u Hz (%#x.%04x)\n", | 149 | proc_dump_ep_status(subs, subs->sync_endpoint, buffer); |
131 | snd_usb_get_speed(subs->dev) == USB_SPEED_FULL | ||
132 | ? get_full_speed_hz(subs->freqm) | ||
133 | : get_high_speed_hz(subs->freqm), | ||
134 | subs->freqm >> 16, subs->freqm & 0xffff); | ||
135 | if (subs->freqshift != INT_MIN) | ||
136 | snd_iprintf(buffer, " Feedback Format = %d.%d\n", | ||
137 | (subs->syncmaxsize > 3 ? 32 : 24) | ||
138 | - (16 - subs->freqshift), | ||
139 | 16 - subs->freqshift); | ||
140 | } else { | 150 | } else { |
141 | snd_iprintf(buffer, " Status: Stop\n"); | 151 | snd_iprintf(buffer, " Status: Stop\n"); |
142 | } | 152 | } |