WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: USB sound card fails on long playback  (Read 6394 times)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11282
Re: USB sound card fails on long playback
« Reply #15 on: February 24, 2016, 08:35:11 AM »
Hi patrikg
Closing the old process and starting a new one seems to restart this 6 hour time, as well as keeping the process open but stopping writes to the ALSA PCM device for several seconds and then resuming them.
I think that rules out a memory leak. Pausing the audio would not fix that.
Quote
Maybe some temp files build up ?
Out of swap ?
I don't think that's likely either for the same reason listed above.
The script wont work since it starts a new process after the previous one ends.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11282
Re: USB sound card fails on long playback
« Reply #16 on: February 24, 2016, 08:41:35 AM »
Hi vatte
Have you tried using the  --reopen  option?
From:
http://linux.die.net/man/1/mpg123
Quote
--reopen
       Forces reopen of the audiodevice after ever song

Offline vatte

  • Newbie
  • *
  • Posts: 9
Re: USB sound card fails on long playback
« Reply #17 on: February 26, 2016, 01:54:57 AM »
Hi Rich,
Have you tried using the  --reopen  option?
I tried it (with the full command mpg123 --reopen --loop -1 file.mp3 but the bug still happened as usual. I haven't had time to test yet with a 6h+ playlist, but I'll try to get that done soon.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 680
Re: USB sound card fails on long playback
« Reply #18 on: February 26, 2016, 03:31:44 AM »
Is the mp3 file in ram ??
Or do you store the file in mmcblk0 and play the file.
Try to copy the file to ram first and then play.

Offline vatte

  • Newbie
  • *
  • Posts: 9
Re: USB sound card fails on long playback
« Reply #19 on: February 26, 2016, 04:01:22 AM »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 680
Re: USB sound card fails on long playback
« Reply #20 on: February 26, 2016, 04:52:41 AM »
What i can see in my cmdline.txt there are some misspelling.
And have you tested to passed the parameter to the usb device to say that just doing usb 1.1.

Added the dwc_otg.speed=1 parameter to force USB to work only in full speed mode (speed of USB 1.1).

What i can se in my cmdline.txt there are picore 7.0.
c_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/ram0 elevator=d
eadline rootwait quiet nortc loglevel=3 noembed

There sould be dwc_otg.lpm_enable...not just c_otg.

Just google of this parameters, get lots of performance/hanging problems with usb devices with raspberry pi.

Take a look at all this parameters
cd /sys/module/dwc_otg/parameters
ls
for i in $(ls);do echo $i----$(cat $i);done
« Last Edit: February 26, 2016, 05:24:38 AM by patrikg »