At Thu, 16 May 2013 20:26:17 +0200, Torstein Hegge wrote:
freqshift is only set for the data endpoint and syncmaxsize is only set for the sync endpoint. This results in a syncmaxsize of zero used in the proc output feedback format calculation, which gives a feedback format incorrectly shown as 8.16 for UAC2 devices.
As neither the data nor the sync endpoint gives all the relevant content, output the two combined.
Also remove the sync_endpoint "packet size" which is always zero and the sync_endpoint "momentary freq" which is constant.
Tested with UAC2 async and UAC1 adaptive, not tested with UAC1 async.
Reported-by: B. Zhang bb.zhang@free.fr Signed-off-by: Torstein Hegge hegge@resisty.net
Thanks, applied.
Takashi
Cc: Takashi Iwai tiwai@suse.de Cc: Daniel Mack zonque@gmail.com Cc: Clemens Ladisch clemens@ladisch.de Cc: Davor Herga davor.herga@guest.arnes.si
sound/usb/proc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/sound/usb/proc.c b/sound/usb/proc.c index d218f76..462a5ed 100644 --- a/sound/usb/proc.c +++ b/sound/usb/proc.c @@ -117,21 +117,22 @@ 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_usb_endpoint *data_ep,
struct snd_usb_endpoint *sync_ep, struct snd_info_buffer *buffer)
{
- if (!ep)
- if (!data_ep) return;
- snd_iprintf(buffer, " Packet Size = %d\n", ep->curpacksize);
- snd_iprintf(buffer, " Packet Size = %d\n", data_ep->curpacksize); snd_iprintf(buffer, " Momentary freq = %u Hz (%#x.%04x)\n", subs->speed == 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;
? get_full_speed_hz(data_ep->freqm)
: get_high_speed_hz(data_ep->freqm),
data_ep->freqm >> 16, data_ep->freqm & 0xffff);
- if (sync_ep && data_ep->freqshift != INT_MIN) {
snd_iprintf(buffer, " Feedback Format = %d.%d\n",int res = 16 - data_ep->freqshift;
(ep->syncmaxsize > 3 ? 32 : 24) - res, res);
}(sync_ep->syncmaxsize > 3 ? 32 : 24) - res, res);
}
@@ -141,8 +142,7 @@ static void proc_dump_substream_status(struct snd_usb_substream *subs, struct sn snd_iprintf(buffer, " Status: Running\n"); snd_iprintf(buffer, " Interface = %d\n", subs->interface); snd_iprintf(buffer, " Altset = %d\n", subs->altset_idx);
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"); }proc_dump_ep_status(subs, subs->data_endpoint, subs->sync_endpoint, buffer);
-- 1.8.3.rc1.377.g7010c6b