oandrew / ipod-gadget

iPod usb gadget for audio playback. Client app: https://github.com/oandrew/ipod
MIT License
191 stars 33 forks source link

CRC error with Sony STR-DH550 #10

Open zanppa opened 5 years ago

zanppa commented 5 years ago

Hi.

I got the driver and the userspace application to work and tested the driver with my Sony STR-DH550 amplifier. The amplifier tries to read the "iPod" but I see that the process (the "ipod" userspace program) shows a CRC error: ERRO[0025.020803] << PACKET error=packet decode: crc mismatch: recv 53 != calc 8c len=0 ERRO[0025.021055] << PACKET error=packet decode: crc mismatch: recv 70 != calc 94 len=0

I uploaded the trace file to https://pastebin.com/TUa5nt4U In the file, the process runs for a while, then stops to the CRC error. After a while it runs ok for some time and then another CRC error appers. That's when I stopped the trace.

Any ideas what might be wrong?

oandrew commented 5 years ago

Looks like a USB/HID packet is lost. Could be hardware or software bug/problem.

zanppa commented 5 years ago

I use Raspberry PI Zero W with custom kernel 4.14.37+. Are there some specific things you'd need to know?

You can find the relevant part of dmesg log (kern.log) from https://pastebin.com/RTvyqTdt The log starts when I loaded the first (audio) module. I then let it run so that the CRC error came 3 times, then I stopped the ipod userspace program.

zanppa commented 4 years ago

I tried this again with the latest version of the driver and the "ipod" userspace program, and now there is no CRC errors anymore and the gadget is detected by the amplifier.

However, I cannot get the speaker-test to work, running

speaker-test -D hw:CARD=iPodUSB,DEV=0 -c 2 -r 44100

seems to run for about 10 seconds but no sound is heard. After that, it dies with last messages:

0 - Front Left Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error

Any hints on what might be the issue?

EDIT2: Realized I can attach the trace file instead of using pastebin, here it is: ipod.trace.log

Also I noticed that using any the amplifier's OSD to navigate the contents (with the default "ipod" userspace app) the amplifier hangs when selecting anything (like artists). I assume this is a limitation of the userspace app?