andrea.iob
Posts: 12
Joined: Wed Apr 02, 2014 6:23 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 6:10 am

andrea.iob wrote: I've tried to downgrade to the commit of March 19th but I get this error:
This was my fault. I was taking the commit id from the wrong repository. Using the correct id I was able to downgrade to the previous kernel (commit e8d2ad3c208f374f1df5b059a5cb15cfccd874e1 Apr 09, 2014).

With the 3.10.36+ #665 kernel I'm back to the "normal" situation where almost all mp3 files play well and only some files are distorted. Therefore, at least for my setup, it seems that the new kernel has some problems when playing audio through a USB DAC.

GrayShade
Posts: 39
Joined: Fri Jul 05, 2013 6:13 am

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 6:20 am

For the record, unbinding the HID endpoint can be automated by sticking somewhere in /etc/udev/rules.d a line similar to:

Code: Select all

SUBSYSTEM=="usb", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2902", RUN+="/bin/sh -c 'echo -n $id:1.3 > /sys/bus/usb/drivers/usbhid/unbind'"
You can find the vendor and product id in dmesg:

Code: Select all

[    3.749217] usb 1-1.3: New USB device found, idVendor=08bb, idProduct=2902
The endpoint (?) -- the 1.3 part -- should be in dmesg or /sys/bus/hid/drivers/hid-generic. But please make sure you don't disable your keyboard :).

EDIT: It's RUN+= :).

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 11:31 am

FLYFISH TECHNOLOGIES wrote:Hi,

I'd also need to report a problem.

Results when using this beta USB driver are very different and depend on dwc_otg.fiq_fsm_mask parameter value.
In the file /boot/cmdline.txt I added: dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=<0xn>

When dwc_otg.fiq_fsm_mask=0x3 or 0x7, the communication fails immediately, after one query-response transaction.

Best wishes, Ivan Zilic.
I have your device and can replicate the issue.

It appears that while the first transaction goes through the system OK, something is amiss with the second. I never get an enqueue for a subsequent transfer.

I suspect that all interrupt OUT transfers are broken in the same fashion.
Rockets are loud.
https://astro-pi.org

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 11:53 am

GrayShade wrote:FWIW, I just got this on 3.10.36+ #665 PREEMPT Wed Apr 9 15:01:53 BST 2014 armv6l GNU/Linux:

Code: Select all

[23608.771517] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23608.780869] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23608.796173] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23613.801549] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23613.810902] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23613.821644] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23619.831525] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23619.840817] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23619.853175] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23624.861499] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23624.870923] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23624.882582] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23626.060791] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23631.101502] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23634.211489] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23635.211492] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23636.211516] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23637.111517] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23637.211499] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23638.211495] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23638.218888] hub 1-1.2:1.0: Cannot enable port 3.  Maybe the USB cable is bad?
[23639.231495] hub 1-1.2:1.0: cannot disable port 3 (err = -110)
[23640.231494] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23641.231582] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[23641.914202] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23642.141656] usb 1-1.2.3: reset high-speed USB device number 6 using dwc_otg
[23643.500172] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[23669.851521] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23669.860434] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23669.870598] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23674.871527] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23674.880589] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23674.890411] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23680.901509] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23680.910417] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23680.923180] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23685.931517] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23685.940604] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23685.950941] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23687.069257] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23692.101522] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23698.111513] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23701.954804] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23703.486228] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[23735.921521] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23735.930430] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23735.942091] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23740.941513] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23740.950433] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23740.960854] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23746.971515] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23746.980417] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23746.991039] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23752.001516] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23752.010378] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23752.025039] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23753.153534] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23758.191512] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23761.984728] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23762.021687] usb 1-1.2.3: reset high-speed USB device number 6 using dwc_otg
[23763.569529] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[23908.062967] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23908.072176] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23908.083913] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23913.092972] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23913.102158] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23913.112723] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23919.122973] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23919.132257] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23919.143159] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23924.152994] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23924.162324] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23924.174065] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23925.230922] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23930.272973] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23936.282987] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[23942.105877] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23943.694683] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[23976.758666] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23976.767605] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23976.779673] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23981.778655] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23981.787608] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23981.797836] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23987.798659] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23987.807562] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23987.818840] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23992.828659] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[23992.837517] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[23992.854535] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[23993.976922] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[23999.018654] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24002.131378] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[24003.724667] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[24080.392939] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[24080.407120] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[24080.417196] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[24085.423145] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[24085.432052] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[24085.449330] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[24091.452732] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[24091.461820] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[24091.478747] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[24096.482736] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
[24096.499748] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
[24096.509812] smsc95xx 1-1.1:1.0 eth0: MII is busy in smsc95xx_mdio_read
[24097.641664] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[24102.682715] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24107.242713] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24108.242720] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24108.692718] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24109.242704] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24110.242714] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24111.242715] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24111.249923] hub 1-1.2:1.0: Cannot enable port 3.  Maybe the USB cable is bad?
[24112.262712] hub 1-1.2:1.0: cannot disable port 3 (err = -110)
[24113.262716] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24114.262714] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24114.702730] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24115.262715] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24116.262715] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24117.262725] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24117.269860] hub 1-1.2:1.0: Cannot enable port 3.  Maybe the USB cable is bad?
[24118.282720] hub 1-1.2:1.0: cannot disable port 3 (err = -110)
[24119.282714] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24120.282716] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24120.712729] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24121.282716] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24122.282714] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24123.282716] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24123.289943] hub 1-1.2:1.0: Cannot enable port 3.  Maybe the USB cable is bad?
[24124.292714] hub 1-1.2:1.0: cannot disable port 3 (err = -110)
[24125.292721] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24126.292721] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24126.722727] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24127.292723] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24128.292721] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24129.292721] hub 1-1.2:1.0: cannot reset port 3 (err = -110)
[24129.299702] hub 1-1.2:1.0: Cannot enable port 3.  Maybe the USB cable is bad?
[24130.312717] hub 1-1.2:1.0: cannot disable port 3 (err = -110)
[24131.312723] hub 1-1.2:1.0: cannot disable port 3 (err = -110)
[24131.320106] sd 0:0:0:0: Device offlined - not ready after error recovery
[24131.333247] sd 0:0:0:0: [sda] Unhandled error code
[24131.339509] sd 0:0:0:0: [sda]
[24131.348190] Result: hostbyte=0x05 driverbyte=0x00
[24131.355506] sd 0:0:0:0: [sda] CDB:
[24131.360392] cdb[0]=0x28: 28 00 00 91 48 20 00 00 20 00
[24131.369626] end_request: I/O error, dev sda, sector 9521184
[24131.378702] sd 0:0:0:0: rejecting I/O to offline device
[24131.385398] sd 0:0:0:0: [sda] killing request
[24131.391111] sd 0:0:0:0: rejecting I/O to offline device
[24131.397736] Buffer I/O error on device sda1, logical block 88113260
[24131.405411] EXT4-fs warning (device sda1): ext4_end_bio:286: I/O error writing to inode 22020153 (offset 0 size 4096 starting block 88113517)
[24131.420919] sd 0:0:0:0: rejecting I/O to offline device
[24131.427822] sd 0:0:0:0: [sda] Unhandled error code
[24131.434193] sd 0:0:0:0: [sda]
[24131.438785] Result: hostbyte=0x01 driverbyte=0x00
[24131.445000] sd 0:0:0:0: [sda] CDB:
[24131.450036] cdb[0]=0x2a: 2a 00 2a 04 0b 58 00 00 08 00
[24131.457067] end_request: I/O error, dev sda, sector 704908120
[24131.464350] Buffer I/O error on device sda1, logical block 88113259
[24131.472204] EXT4-fs warning (device sda1): ext4_end_bio:286: I/O error writing to inode 22020132 (offset 0 size 4096 starting block 88113516)
[24132.732733] smsc95xx 1-1.1:1.0 eth0: Failed to write reg index 0x00000014: -110
[24136.312717] hub 1-1.2:1.0: hub_port_status failed (err = -110)
[24136.565453] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[24137.183039] sd 0:0:0:0: rejecting I/O to offline device
[24137.190260] Aborting journal on device sda1-8.
[24137.199595] sd 0:0:0:0: rejecting I/O to offline device
[24137.208804] JBD2: Error -5 detected when updating journal superblock for sda1-8.
[24138.153912] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
It's a bit funny because playing sound over my USB DAC makes it hang for a while.
My Pi just did exactly this.

USB dies and leaves behind an interrupt storm:

Code: Select all

[email protected]:~$ vmstat 2
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      0 270860  15352 111644    0    0    96    42 4286  996 24  6 68  1
 0  0      0 270860  15352 111644    0    0     0     0 28149   25  2  1 97  0
 0  0      0 270860  15352 111644    0    0     0     0 28125   18  1  0 99  0
Most peculiar.
Rockets are loud.
https://astro-pi.org

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 1:06 pm

Jonathan,
jdb wrote:
FLYFISH TECHNOLOGIES wrote:When dwc_otg.fiq_fsm_mask=0x3 or 0x7, the communication fails immediately, after one query-response transaction.
It appears that while the first transaction goes through the system OK, something is amiss with the second. I never get an enqueue for a subsequent transfer.

I suspect that all interrupt OUT transfers are broken in the same fashion.
Thanks for the quick response.

To be honest, this one doesn't worry me very much since it is predictable and reproducible each time equally. Of course, this does not mean that it will get fixed by itself, but the second one (dwc_otg.fiq_fsm_mask=0x1 + high load) seems to me very challenging due to its occasional random appearance.

If I can be of any help here, do not hesitate to let me know.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 5:31 pm

Update:

Audio playback should now be much more reliable.

There is a known defect with adaptive Isochronous endpoints: for some reason ALSA will play back samples too fast. In addition, heavy use of USB may cause frame skips which will manifest as glitches in audio.
Rockets are loud.
https://astro-pi.org

tuxx
Posts: 7
Joined: Thu Mar 06, 2014 10:42 am

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 6:28 pm

I just updated to latest and it still doesn't boot. DIstro is Archlinux ARM.

This time i managed to get a photo with the error:

Image

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 6:29 pm

Does it boot if you unplug all USB devices?
Rockets are loud.
https://astro-pi.org

tuxx
Posts: 7
Joined: Thu Mar 06, 2014 10:42 am

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 6:30 pm

The behavior is not stable. I managed to boot it once without any usb device plugged in, but I can't always reproduce it.

FYI the only usb decvice plugged is an adaptive usb dac.

andrea.iob
Posts: 12
Joined: Wed Apr 02, 2014 6:23 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 7:31 pm

jdb wrote:Update:

Audio playback should now be much more reliable.
With the new update I get noise on all the files I play, but there are no more "FIQ Reported NYET" errors.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Thu Apr 17, 2014 7:53 pm

andrea.iob wrote:
jdb wrote:Update:

Audio playback should now be much more reliable.
With the new update I get noise on all the files I play, but there are no more "FIQ Reported NYET" errors.
Progress, of a sort. At least now these things are deterministic.

Can you try with all other USB devices bar the DAC unplugged?
Rockets are loud.
https://astro-pi.org

gwlevans
Posts: 6
Joined: Sat Jun 01, 2013 12:22 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 11:42 am

Hi,

I am also hearing noise on all streams I play since the new update. Rolled back to 9th April update and all is good. I am not seeing any error messages.

WIFI Dongle and HRT Media Streamer II are the only USB devices attached.

Thanks,

Gareth

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 3:10 pm

gwlevans wrote:Hi,

I am also hearing noise on all streams I play since the new update. Rolled back to 9th April update and all is good. I am not seeing any error messages.

WIFI Dongle and HRT Media Streamer II are the only USB devices attached.

Thanks,

Gareth
Can you record the output in the failing case and post it somewhere (dropbox)?
Rockets are loud.
https://astro-pi.org

gwlevans
Posts: 6
Joined: Sat Jun 01, 2013 12:22 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 4:58 pm

Sure, what is the best way of recording it to a file?

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 5:15 pm

Best is a PC: connect the output from the DAC into line-in on a PC/laptop and run an audio record program (e.g. Audacity).
Rockets are loud.
https://astro-pi.org

gwlevans
Posts: 6
Joined: Sat Jun 01, 2013 12:22 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 5:28 pm

Tricky with the positioning of my set up. The noise just sounds like static over the music no pops or clicks. It sounds like an FM radio that is not tuned in correctly.

andrea.iob
Posts: 12
Joined: Wed Apr 02, 2014 6:23 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 5:29 pm

jdb wrote:Best is a PC: connect the output from the DAC into line-in on a PC/laptop and run an audio record program (e.g. Audacity).
Just to give you an idea of what noise we are talking about I've done a recording with my phone. The quality is far from good but it still might help you. I've more or less the same DAC of gwlevans so the problem should be the same (my version is the II+).

https://www.dropbox.com/s/n4h2av2h2pwk4 ... d%20Pi.m4a

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 6:38 pm

It smells a lot like dropped samples.

Your device is asynchronous, i.e. has a fixed internal clock on which samples are output at a fixed, independent frequency. Feedback reporting is used to maintain the source sample rate close to the rate at which the device is playing samples back.

There's something wonky with how ALSA interprets the timings on dwc_otg: you either get
a) the log filled with "delay: estimated 0, actual xxx" messages
b) sample rates that wander off to maximal or minimal values
c) dropped samples.

In your case, it appears that ALSA is feeding data too fast and your device drops samples.

I have a Soundblaster Extigy (courtesy of tvjon) that is also asynchronous but does something different: instead of dropping samples, it increases its own internal sample rate and thus everything plays back fast.

For the record, I've been testing today using a C-media CM108 device (7.1 channel, 16-bit 48khz or 96khz/16-bit 2-channel) which is adaptive: despite the spam due to (a) above, I can do duplex stereo record at the same time as 96k/16bit stereo playback.
Rockets are loud.
https://astro-pi.org

kursus
Posts: 25
Joined: Thu Oct 31, 2013 2:36 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 7:20 pm

Since last update I also have this weird sound with a Hifimediy Sabre ES9023.

Also believe it or not, but network is not brought up as long as there is no hdmi cable plugged (Arch).
- ethernet : no network
- ethernet, usb : no network
- ethernet, hdmi : network
- ethernet, usb, hdmi : network

GrayShade
Posts: 39
Joined: Fri Jul 05, 2013 6:13 am

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Fri Apr 18, 2014 7:25 pm

jdb wrote:For the record, I've been testing today using a C-media CM108 device (7.1 channel, 16-bit 48khz or 96khz/16-bit 2-channel) which is adaptive: despite the spam due to (a) above, I can do duplex stereo record at the same time as 96k/16bit stereo playback.
I didn't notice drop-outs or other problems because of those warnings, however I'm using nrpacks=1 as an option for snd-usb-audio, which makes them go away.

arless
Posts: 1
Joined: Sun Apr 20, 2014 11:38 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Sun Apr 20, 2014 11:54 pm

Hi everyone,

I have this configuration: Raspberry Pi -> USB DAC(Coaxial) -> Logitech Z5500, before I update, when I tried Passthrough digital sound, the screen of my Z5500 was switching between Detecting... and dts Digital or DD like the speakers were receiving wrong data, now after the update Passthrough is working, the only problems are some glitches in audio. The USB DAC is this http://www.ebay.com/itm/PCM2704-USB-DAC ... 43c897e854. Any idea to reduce glitches?

Thanks for this, great job!

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Mon Apr 21, 2014 10:54 am

Please post the full output of sudo lsusb -v and dmesg since boot.
Rockets are loud.
https://astro-pi.org

gwlevans
Posts: 6
Joined: Sat Jun 01, 2013 12:22 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Mon Apr 21, 2014 3:15 pm

jdb wrote:It smells a lot like dropped samples.

Your device is asynchronous, i.e. has a fixed internal clock on which samples are output at a fixed, independent frequency. Feedback reporting is used to maintain the source sample rate close to the rate at which the device is playing samples back.

There's something wonky with how ALSA interprets the timings on dwc_otg: you either get
a) the log filled with "delay: estimated 0, actual xxx" messages
b) sample rates that wander off to maximal or minimal values
c) dropped samples.

In your case, it appears that ALSA is feeding data too fast and your device drops samples.

I have a Soundblaster Extigy (courtesy of tvjon) that is also asynchronous but does something different: instead of dropping samples, it increases its own internal sample rate and thus everything plays back fast.

For the record, I've been testing today using a C-media CM108 device (7.1 channel, 16-bit 48khz or 96khz/16-bit 2-channel) which is adaptive: despite the spam due to (a) above, I can do duplex stereo record at the same time as 96k/16bit stereo playback.

Hi,

My HRT Music Streamer II seems to play fine with:

dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x7

On the 9th April update e8d2ad3c208f374f1df5b059a5cb15cfccd874e1

It is one of the later updates that appears to cause the sound distortion (dropped samples).

Is the kernel update 3.12.17 the cause?

Any data I can supply to help troubleshoot?

Great work so far.

Thanks,

Gareth

andrea.iob
Posts: 12
Joined: Wed Apr 02, 2014 6:23 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Tue Apr 22, 2014 8:24 am

jdb wrote: There's something wonky with how ALSA interprets the timings on dwc_otg: you either get
a) the log filled with "delay: estimated 0, actual xxx" messages
There is a recent kernel patch to rate-limit these messages:

ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb() [a5065eb6da55b226661456e6a7435f605df98111]

It doesn't solve the problem, but at least it avoids to have the log flooded by those debug messages.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2152
Joined: Thu Jul 11, 2013 2:37 pm

Re: Call for beta testers: FIQ_FSM USB driver rewrite

Tue Apr 22, 2014 3:01 pm

jdb wrote:
FLYFISH TECHNOLOGIES wrote:Hi,

I'd also need to report a problem.

Results when using this beta USB driver are very different and depend on dwc_otg.fiq_fsm_mask parameter value.
In the file /boot/cmdline.txt I added: dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=<0xn>

When dwc_otg.fiq_fsm_mask=0x3 or 0x7, the communication fails immediately, after one query-response transaction.

Best wishes, Ivan Zilic.
I have your device and can replicate the issue.

It appears that while the first transaction goes through the system OK, something is amiss with the second. I never get an enqueue for a subsequent transfer.

I suspect that all interrupt OUT transfers are broken in the same fashion.
Found the cause of this: Interrupt OUT packets were always sent with a DATA0 PID, instead of alternating DATA0/DATA1. The odd thing is that the PIC's USB engine always responds with ACK, i.e. accepted the packet, despite the evidence being that it discards it if it's wrong. This meant that the OUT transfer never reported an error so the IN transfer just sat there forever, waiting for data.

Without fiq_fsm_mask=0bxx1x, there are occasional erroneous packets sent if the last transaction failed due to interrupt latency. You would potentially miss sent commands in this case.

Patch inbound should fix this and the Concept rowing machine monitor, which uses the same transport.
Rockets are loud.
https://astro-pi.org

Return to “Troubleshooting”