Re: Problem with TEAC USB UD-H01 and ALSA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/04/2014 02:02 AM, Daniel Mack wrote:
>> Yesterday I got my hands on more diverse 24/192 content to make more
>> experiments. I've come to the conclusion that the crackles that were
>> very noticeable with the patch mentioned upper in the thread are not
>> 100% absent without the patch, they are just very less frequent and
>> harder to notice, but are still there. The experiments I made yesterday
>> were using aplay, without specifying any buffer size, here's what aplay
>> -vD[..] gives playing some of this new content without specifying the
>> buffer size:
>
> Ok, so what would really help if you dumped the sizes for each prepared
> URB from data_ep_set_params() with and without the patch and see where
> the differences are, while keeping your userspace setup the same.

Ok, not too sure this is what you had in mind but I've added this:

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 21dc642..a6c9ec4 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -687,6 +687,10 @@ static int data_ep_set_params(struct 
snd_usb_endpoint *ep,

                 if (fmt->fmt_type == UAC_FORMAT_TYPE_II)
                         u->packets++; /* for transfer delimiter */
+
+               printk(KERN_DEBUG "urb:%u/%u u->packets:%u 
u->buffer_size:%u",
+                          i, ep->nurbs, u->packets, u->buffer_size);
+
                 u->urb = usb_alloc_urb(u->packets, GFP_KERNEL);
                 if (!u->urb)
                         goto out_of_memory;

1) With the patch (linux-stable/976b6c064a957445eb0573b270f2d0282630e9b9)

- 16/192 wav (your sample), aplay, not specifying any buffer size (sound 
ok):
[  642.910928] urb:0/12 u->packets:8 u->buffer_size:832
[  642.910933] urb:1/12 u->packets:8 u->buffer_size:832
[  642.910936] urb:2/12 u->packets:8 u->buffer_size:832
[  642.910937] urb:3/12 u->packets:8 u->buffer_size:832
[  642.910939] urb:4/12 u->packets:8 u->buffer_size:832
[  642.910940] urb:5/12 u->packets:8 u->buffer_size:832
[  642.910941] urb:6/12 u->packets:8 u->buffer_size:832
[  642.910942] urb:7/12 u->packets:8 u->buffer_size:832
[  642.910943] urb:8/12 u->packets:8 u->buffer_size:832
[  642.910945] urb:9/12 u->packets:8 u->buffer_size:832
[  642.910946] urb:10/12 u->packets:8 u->buffer_size:832
[  642.910947] urb:11/12 u->packets:8 u->buffer_size:832

- 24/192 wav, aplay, not specifying any buffer size (sound with lots of 
crackles):
[   52.080173] urb:0/12 u->packets:8 u->buffer_size:1248
[   52.080177] urb:1/12 u->packets:8 u->buffer_size:1248
[   52.080181] urb:2/12 u->packets:8 u->buffer_size:1248
[   52.080182] urb:3/12 u->packets:8 u->buffer_size:1248
[   52.080183] urb:4/12 u->packets:8 u->buffer_size:1248
[   52.080184] urb:5/12 u->packets:8 u->buffer_size:1248
[   52.080185] urb:6/12 u->packets:8 u->buffer_size:1248
[   52.080187] urb:7/12 u->packets:8 u->buffer_size:1248
[   52.080188] urb:8/12 u->packets:8 u->buffer_size:1248
[   52.080189] urb:9/12 u->packets:8 u->buffer_size:1248
[   52.080191] urb:10/12 u->packets:8 u->buffer_size:1248
[   52.080192] urb:11/12 u->packets:8 u->buffer_size:1248

- 24/192 wav, aplay --buffer-size=512 (sound ok):
[  801.149194] urb:0/4 u->packets:7 u->buffer_size:1092
[  801.149197] urb:1/4 u->packets:7 u->buffer_size:1092
[  801.149199] urb:2/4 u->packets:7 u->buffer_size:1092
[  801.149200] urb:3/4 u->packets:7 u->buffer_size:1092

2) Without the patch (linux-stable/e8bc99425e8159cd5f56bb76419158857bd358ed)
- 16/192 wav (your sample), aplay, not specifying any buffer size (sound 
ok):
[   27.424084] urb:0/8 u->packets:8 u->buffer_size:832
[   27.424088] urb:1/8 u->packets:8 u->buffer_size:832
[   27.424090] urb:2/8 u->packets:8 u->buffer_size:832
[   27.424092] urb:3/8 u->packets:8 u->buffer_size:832
[   27.424093] urb:4/8 u->packets:8 u->buffer_size:832
[   27.424094] urb:5/8 u->packets:8 u->buffer_size:832
[   27.424096] urb:6/8 u->packets:8 u->buffer_size:832
[   27.424096] urb:7/8 u->packets:8 u->buffer_size:832

- 24/192 wav, aplay, not specifying any buffer size (sound with rare 
crackles):
[   80.794497] urb:0/8 u->packets:8 u->buffer_size:1248
[   80.794501] urb:1/8 u->packets:8 u->buffer_size:1248
[   80.794504] urb:2/8 u->packets:8 u->buffer_size:1248
[   80.794506] urb:3/8 u->packets:8 u->buffer_size:1248
[   80.794507] urb:4/8 u->packets:8 u->buffer_size:1248
[   80.794509] urb:5/8 u->packets:8 u->buffer_size:1248
[   80.794510] urb:6/8 u->packets:8 u->buffer_size:1248
[   80.794511] urb:7/8 u->packets:8 u->buffer_size:1248

- 24/192 wav, aplay --buffer-size=512 (sound ok):
[  150.570855] urb:0/2 u->packets:3 u->buffer_size:468
[  150.570858] urb:1/2 u->packets:4 u->buffer_size:624


--
Julien Benoist

------------------------------------------------------------------------------
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux