mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
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>
This commit is contained in:
parent
85f71932e5
commit
22026c1a7b
2 changed files with 21 additions and 26 deletions
|
@ -115,21 +115,6 @@ struct snd_usb_substream {
|
||||||
unsigned int cur_rate; /* current rate (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 period_bytes; /* current period bytes (for hw_params callback) */
|
||||||
unsigned int altset_idx; /* USB data format: index of alternate setting */
|
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 */
|
|
||||||
unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */
|
|
||||||
unsigned int freqn; /* nominal sampling rate in fs/fps in Q16.16 format */
|
|
||||||
unsigned int freqm; /* momentary sampling rate in fs/fps in Q16.16 format */
|
|
||||||
int freqshift; /* how much to shift the feedback value to get Q16.16 */
|
|
||||||
unsigned int freqmax; /* maximum sampling rate, used for buffer management */
|
|
||||||
unsigned int phase; /* phase accumulator */
|
|
||||||
unsigned int maxpacksize; /* max packet size in bytes */
|
|
||||||
unsigned int maxframesize; /* max packet size in frames */
|
|
||||||
unsigned int curpacksize; /* current packet size in bytes (for capture) */
|
|
||||||
unsigned int curframesize; /* current packet size in frames (for capture) */
|
|
||||||
unsigned int syncmaxsize; /* sync endpoint packet size */
|
|
||||||
unsigned int fill_max: 1; /* fill max packet size always */
|
|
||||||
unsigned int txfr_quirk:1; /* allow sub-frame alignment */
|
unsigned int txfr_quirk:1; /* allow sub-frame alignment */
|
||||||
unsigned int fmt_type; /* USB audio format type (1-3) */
|
unsigned int fmt_type; /* USB audio format type (1-3) */
|
||||||
|
|
||||||
|
|
|
@ -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)
|
static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
|
||||||
{
|
{
|
||||||
if (subs->running) {
|
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++)
|
for (i = 0; i < subs->nurbs; i++)
|
||||||
snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);
|
snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);
|
||||||
snd_iprintf(buffer, "]\n");
|
snd_iprintf(buffer, "]\n");
|
||||||
snd_iprintf(buffer, " Packet Size = %d\n", subs->curpacksize);
|
proc_dump_ep_status(subs, subs->data_endpoint, buffer);
|
||||||
snd_iprintf(buffer, " Momentary freq = %u Hz (%#x.%04x)\n",
|
proc_dump_ep_status(subs, subs->sync_endpoint, buffer);
|
||||||
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);
|
|
||||||
} else {
|
} else {
|
||||||
snd_iprintf(buffer, " Status: Stop\n");
|
snd_iprintf(buffer, " Status: Stop\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue