* Capture from 3+ cards connected to a USB hub - distorted samples
@ 2011-12-09 23:23 Pavel Hofman
2011-12-14 12:19 ` Pavel Hofman
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Hofman @ 2011-12-09 23:23 UTC (permalink / raw)
To: alsa-devel
Hi,
I have been informed about the following problem which I was able to
reproduce afterwards:
* Latest git.alsa-project.org drivers
* USB 2.0 hub, 3 or more USB soundcards (inexpensive USB sticks, USB
audio v.1 types, async capture, adaptive playback) hooked to the hub,
identified A, B, C, D.
* NONE of these soundcards is playing back
Now:
* Card A begins microphone capturing (mono 48/16), result OK
* Card B begins capturing (mono 48/16), both results still OK
* As soon as the third card C begins capturing, the signal captured from
cards A and B gets distorted. Audacity shows some samples are
incorrect, distorting the expected sine waveform of the testing signal.
I can provide screenshots as well as recorded samples, if needed.
* The signal recorded from card C is OK.
BUT
* If any card hooked to the HUB is playing back (even a fourth one D),
the distortion does not occur. It happens only when there is no playback
stream going through the hub. Traffic on another USB port has no effect,
in fact the test signal for the three cards was provided by a
multichannel USB card hooked to another USB port.
It seems to me as if blocks of samples for each card in the USB frame
sometimes overlap by a few bits, corrupting the neighbouring card
samples, or are recovered incorrectly.
I understand I have provided no real data, I am ready to do so plus any
tests you would consider useful.
Thanks a lot for suggestions of the next debugging steps I should do.
Regards,
Pavel.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Capture from 3+ cards connected to a USB hub - distorted samples
2011-12-09 23:23 Capture from 3+ cards connected to a USB hub - distorted samples Pavel Hofman
@ 2011-12-14 12:19 ` Pavel Hofman
2011-12-14 12:30 ` Jaroslav Kysela
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Hofman @ 2011-12-14 12:19 UTC (permalink / raw)
To: alsa-devel
Dne 10.12.2011 00:23, Pavel Hofman napsal(a):
> Hi,
>
> I have been informed about the following problem which I was able to
> reproduce afterwards:
>
> * Latest git.alsa-project.org drivers
>
> * USB 2.0 hub, 3 or more USB soundcards (inexpensive USB sticks, USB
> audio v.1 types, async capture, adaptive playback) hooked to the hub,
> identified A, B, C, D.
>
> * NONE of these soundcards is playing back
>
> Now:
>
> * Card A begins microphone capturing (mono 48/16), result OK
>
> * Card B begins capturing (mono 48/16), both results still OK
>
> * As soon as the third card C begins capturing, the signal captured from
> cards A and B gets distorted. Audacity shows some samples are
> incorrect, distorting the expected sine waveform of the testing signal.
> I can provide screenshots as well as recorded samples, if needed.
>
> * The signal recorded from card C is OK.
>
> BUT
>
> * If any card hooked to the HUB is playing back (even a fourth one D),
> the distortion does not occur. It happens only when there is no playback
> stream going through the hub. Traffic on another USB port has no effect,
> in fact the test signal for the three cards was provided by a
> multichannel USB card hooked to another USB port.
>
> It seems to me as if blocks of samples for each card in the USB frame
> sometimes overlap by a few bits, corrupting the neighbouring card
> samples, or are recovered incorrectly.
>
> I understand I have provided no real data, I am ready to do so plus any
> tests you would consider useful.
>
> Thanks a lot for suggestions of the next debugging steps I should do.
>
Hi, please may I ask for help? I think we could fix this likely bug.
Thanks a lot,
Pavel.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Capture from 3+ cards connected to a USB hub - distorted samples
2011-12-14 12:19 ` Pavel Hofman
@ 2011-12-14 12:30 ` Jaroslav Kysela
2011-12-18 20:17 ` Pavel Hofman
0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Kysela @ 2011-12-14 12:30 UTC (permalink / raw)
To: Pavel Hofman; +Cc: alsa-devel
Date 14.12.2011 13:19, Pavel Hofman wrote:
>
> Dne 10.12.2011 00:23, Pavel Hofman napsal(a):
>> Hi,
>>
>> I have been informed about the following problem which I was able to
>> reproduce afterwards:
>>
>> * Latest git.alsa-project.org drivers
>>
>> * USB 2.0 hub, 3 or more USB soundcards (inexpensive USB sticks, USB
>> audio v.1 types, async capture, adaptive playback) hooked to the hub,
>> identified A, B, C, D.
>>
>> * NONE of these soundcards is playing back
>>
>> Now:
>>
>> * Card A begins microphone capturing (mono 48/16), result OK
>>
>> * Card B begins capturing (mono 48/16), both results still OK
>>
>> * As soon as the third card C begins capturing, the signal captured from
>> cards A and B gets distorted. Audacity shows some samples are
>> incorrect, distorting the expected sine waveform of the testing signal.
>> I can provide screenshots as well as recorded samples, if needed.
>>
>> * The signal recorded from card C is OK.
>>
>> BUT
>>
>> * If any card hooked to the HUB is playing back (even a fourth one D),
>> the distortion does not occur. It happens only when there is no playback
>> stream going through the hub. Traffic on another USB port has no effect,
>> in fact the test signal for the three cards was provided by a
>> multichannel USB card hooked to another USB port.
>>
>> It seems to me as if blocks of samples for each card in the USB frame
>> sometimes overlap by a few bits, corrupting the neighbouring card
>> samples, or are recovered incorrectly.
>>
>> I understand I have provided no real data, I am ready to do so plus any
>> tests you would consider useful.
>>
>> Thanks a lot for suggestions of the next debugging steps I should do.
>>
>
> Hi, please may I ask for help? I think we could fix this likely bug.
This looks like a USB core issue (lost / unsynced URBs from isochronous
transfers). I would try recent linux kernels and/or ask on the USB
development list for a help.
Jaroslav
--
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Capture from 3+ cards connected to a USB hub - distorted samples
2011-12-14 12:30 ` Jaroslav Kysela
@ 2011-12-18 20:17 ` Pavel Hofman
2011-12-26 19:48 ` Pavel Hofman
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Hofman @ 2011-12-18 20:17 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
Dne 14.12.2011 13:30, Jaroslav Kysela napsal(a):
> Date 14.12.2011 13:19, Pavel Hofman wrote:
>>
>> Dne 10.12.2011 00:23, Pavel Hofman napsal(a):
>>> Hi,
>>>
>>> I have been informed about the following problem which I was able to
>>> reproduce afterwards:
>>>
>>> * Latest git.alsa-project.org drivers
>>>
>>> * USB 2.0 hub, 3 or more USB soundcards (inexpensive USB sticks, USB
>>> audio v.1 types, async capture, adaptive playback) hooked to the hub,
>>> identified A, B, C, D.
>>>
>>> * NONE of these soundcards is playing back
>>>
>>> Now:
>>>
>>> * Card A begins microphone capturing (mono 48/16), result OK
>>>
>>> * Card B begins capturing (mono 48/16), both results still OK
>>>
>>> * As soon as the third card C begins capturing, the signal captured from
>>> cards A and B gets distorted. Audacity shows some samples are
>>> incorrect, distorting the expected sine waveform of the testing signal.
>>> I can provide screenshots as well as recorded samples, if needed.
>>>
>>> * The signal recorded from card C is OK.
>>>
>>> BUT
>>>
>>> * If any card hooked to the HUB is playing back (even a fourth one D),
>>> the distortion does not occur. It happens only when there is no playback
>>> stream going through the hub. Traffic on another USB port has no effect,
>>> in fact the test signal for the three cards was provided by a
>>> multichannel USB card hooked to another USB port.
>>>
>>> It seems to me as if blocks of samples for each card in the USB frame
>>> sometimes overlap by a few bits, corrupting the neighbouring card
>>> samples, or are recovered incorrectly.
>>>
>>> I understand I have provided no real data, I am ready to do so plus any
>>> tests you would consider useful.
>>>
>>> Thanks a lot for suggestions of the next debugging steps I should do.
>>>
>>
>> Hi, please may I ask for help? I think we could fix this likely bug.
>
> This looks like a USB core issue (lost / unsynced URBs from isochronous
> transfers). I would try recent linux kernels and/or ask on the USB
> development list for a help.
Hi Jaroslav,
Thanks a lot for your suggestion. I tested latest stable kernel 3.1.5.
The behaviour has somewhat improved (3 cards OK), but still IMO
incorrect (the fourth card D distorts captured streams from C and D). I
will ask at the usb development list.
Regards,
Pavel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Capture from 3+ cards connected to a USB hub - distorted samples
2011-12-18 20:17 ` Pavel Hofman
@ 2011-12-26 19:48 ` Pavel Hofman
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Hofman @ 2011-12-26 19:48 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
Dne 18.12.2011 21:17, Pavel Hofman napsal(a):
> Dne 14.12.2011 13:30, Jaroslav Kysela napsal(a):
>> Date 14.12.2011 13:19, Pavel Hofman wrote:
>>>
>>> Dne 10.12.2011 00:23, Pavel Hofman napsal(a):
>>>> Hi,
>>>>
>>>> I have been informed about the following problem which I was able to
>>>> reproduce afterwards:
>>>>
>>>> * Latest git.alsa-project.org drivers
>>>>
>>>> * USB 2.0 hub, 3 or more USB soundcards (inexpensive USB sticks, USB
>>>> audio v.1 types, async capture, adaptive playback) hooked to the hub,
>>>> identified A, B, C, D.
>>>>
>>>> * NONE of these soundcards is playing back
>>>>
>>>> Now:
>>>>
>>>> * Card A begins microphone capturing (mono 48/16), result OK
>>>>
>>>> * Card B begins capturing (mono 48/16), both results still OK
>>>>
>>>> * As soon as the third card C begins capturing, the signal captured from
>>>> cards A and B gets distorted. Audacity shows some samples are
>>>> incorrect, distorting the expected sine waveform of the testing signal.
>>>> I can provide screenshots as well as recorded samples, if needed.
>>>>
>>>> * The signal recorded from card C is OK.
>>>>
>>>> BUT
>>>>
>>>> * If any card hooked to the HUB is playing back (even a fourth one D),
>>>> the distortion does not occur. It happens only when there is no playback
>>>> stream going through the hub. Traffic on another USB port has no effect,
>>>> in fact the test signal for the three cards was provided by a
>>>> multichannel USB card hooked to another USB port.
>>>>
>>>> It seems to me as if blocks of samples for each card in the USB frame
>>>> sometimes overlap by a few bits, corrupting the neighbouring card
>>>> samples, or are recovered incorrectly.
>>>>
>>>> I understand I have provided no real data, I am ready to do so plus any
>>>> tests you would consider useful.
>>>>
>>>> Thanks a lot for suggestions of the next debugging steps I should do.
>>>>
>>>
>>> Hi, please may I ask for help? I think we could fix this likely bug.
>>
>> This looks like a USB core issue (lost / unsynced URBs from isochronous
>> transfers). I would try recent linux kernels and/or ask on the USB
>> development list for a help.
>
> Hi Jaroslav,
>
> Thanks a lot for your suggestion. I tested latest stable kernel 3.1.5.
> The behaviour has somewhat improved (3 cards OK), but still IMO
> incorrect (the fourth card D distorts captured streams from C and D). I
> will ask at the usb development list.
>
I checked USB communication with wireshark and the reduced data payload
in URBs for card C and D suggest I am already hitting ceiling of the hub
throughput. I think the hub support is already correct in the latest kernel.
Best regards,
Pavel.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-26 19:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 23:23 Capture from 3+ cards connected to a USB hub - distorted samples Pavel Hofman
2011-12-14 12:19 ` Pavel Hofman
2011-12-14 12:30 ` Jaroslav Kysela
2011-12-18 20:17 ` Pavel Hofman
2011-12-26 19:48 ` Pavel Hofman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).