Page 1 of 1

FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Fri Jun 28, 2019 12:49 pm
by energyi
Any reason a FLAC file plays with gaps on a 4 GB RAM Rpi4, but works fine on 1 GB RAM version? Same microSD card, VLC player.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Fri Jun 28, 2019 12:54 pm
by jamesh
Hmnm, I suspect the bounce buffer code for handling PCI memory over 3GB. Do you have anything plugged in to the USB?

If you limit the amount of memory available to linux, does the problem go away?

Add "total_mem=1024" or "total_mem=2048" or "total_mem=3072" to /boot/config.txt. If they all work OK, it does look like the bounce buffer code.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Fri Jun 28, 2019 6:48 pm
by energyi
Yes, had a USB 3.0 thumbdrive and USB 3.0 Hard drive connected. Put the FLACs onto the desktop, shutdown, removed t he USB 3.0 devices. Still, FLAC over VLC doesn't work properly, gaps, jumps.

Again, worked on 1 GB RAM with USB 3.0 devices, not working on 4 GB RAM. Thanks.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Sat Jun 29, 2019 10:31 pm
by energyi
Anyone else having audio challenges on a 4 GB RAM rpi4 running FLACs with VLC?

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Sun Jun 30, 2019 8:38 am
by jamesh
Did you test with the memory settings described above?

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Mon Jul 01, 2019 9:54 am
by Aardappeltaart
jamesh wrote:
Fri Jun 28, 2019 12:54 pm
Hmnm, I suspect the bounce buffer code for handling PCI memory over 3GB. Do you have anything plugged in to the USB?

If you limit the amount of memory available to linux, does the problem go away?

Add "total_mem=1024" or "total_mem=2048" or "total_mem=3072" to /boot/config.txt. If they all work OK, it does look like the bounce buffer code.

Does this sound like a cry for a 64-bit Raspbian?

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Mon Jul 01, 2019 10:11 am
by jamesh
Aardappeltaart wrote:
Mon Jul 01, 2019 9:54 am
jamesh wrote:
Fri Jun 28, 2019 12:54 pm
Hmnm, I suspect the bounce buffer code for handling PCI memory over 3GB. Do you have anything plugged in to the USB?

If you limit the amount of memory available to linux, does the problem go away?

Add "total_mem=1024" or "total_mem=2048" or "total_mem=3072" to /boot/config.txt. If they all work OK, it does look like the bounce buffer code.

Does this sound like a cry for a 64-bit Raspbian?
Absolutely wrong takeaway. This is nothing to do with 32 vs 64 bit.

Has anyone seeing the issue tried lowering available memory on the 4GB to see if the problem goes away?

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Mon Jul 01, 2019 5:31 pm
by binaryhermit
Assuming this is a bug with the "bounce buffer code" it can be fixed in software, right?

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Mon Jul 01, 2019 9:51 pm
by energyi
jamesh wrote:
Sun Jun 30, 2019 8:38 am
Did you test with the memory settings described above?
Sorry, didn't see that suggestion. Yes, changed to total_mem=1024, still gaps in playback on pi4 4 GB RAM.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Mon Jul 01, 2019 10:09 pm
by jamesh
energyi wrote:
Mon Jul 01, 2019 9:51 pm
jamesh wrote:
Sun Jun 30, 2019 8:38 am
Did you test with the memory settings described above?
Sorry, didn't see that suggestion. Yes, changed to total_mem=1024, still gaps in playback on pi4 4 GB RAM.
Hmm, not what I thought it was then. Did you confirm that the memory available was limited (cat /proc/meminfo or something like that) just to make sure the total_mem did activate.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Mon Jul 01, 2019 11:06 pm
by drgeoff
energyi wrote:
Mon Jul 01, 2019 9:51 pm
jamesh wrote:
Sun Jun 30, 2019 8:38 am
Did you test with the memory settings described above?
Sorry, didn't see that suggestion. Yes, changed to total_mem=1024, still gaps in playback on pi4 4 GB RAM.
You did reboot after editing /boot/config.txt?

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Tue Jul 02, 2019 3:05 am
by energyi
drgeoff wrote:
Mon Jul 01, 2019 11:06 pm
You did reboot after editing /boot/config.txt?
[/quote]

Yes

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Tue Jul 02, 2019 11:11 am
by itsonlyme
I found this problem to be solved after installing the new USB firmware.

Copied from temperature thread
Re: Raspberry Pi 4 temperature

02 Jul 2019 09:09
Hi all,

Following a successful trial with our alpha testers, we are releasing a new firmware build for the USB3 host adapter that should save about 300mW and help the Pi4 to run cooler, which in turn improves performance in compute-intensive tasks.

Download the archive from here: https://drive.google.com/file/d/1PXwrnh ... sp=sharing
With the zip file on the Pi:

Code: Select all

$ unzip vl805_update_0137a8.zip
$ chmod a+x vl805
$ sudo ./vl805 -w vl805_fw_0137a8.bin
$ sudo reboot

The zip file includes the current shipping firmware (013701) in case you want to revert:

Code: Select all

$ sudo ./vl805 -w vl805_fw_013701.bin
$ sudo reboot

By the way, if you run "sudo ./vl805" with no parameters it displays the version of the currently running firmware. Note that this may differ from what's in the EEPROM if you've just reprogrammed it but not rebooted.
[/quote

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Tue Jul 02, 2019 11:21 am
by jamesh
itsonlyme wrote:
Tue Jul 02, 2019 11:11 am
I found this problem to be solved after installing the new USB firmware.

Copied from temperature thread
Re: Raspberry Pi 4 temperature

02 Jul 2019 09:09
Hi all,

Following a successful trial with our alpha testers, we are releasing a new firmware build for the USB3 host adapter that should save about 300mW and help the Pi4 to run cooler, which in turn improves performance in compute-intensive tasks.

Download the archive from here: https://drive.google.com/file/d/1PXwrnh ... sp=sharing
With the zip file on the Pi:

Code: Select all

$ unzip vl805_update_0137a8.zip
$ chmod a+x vl805
$ sudo ./vl805 -w vl805_fw_0137a8.bin
$ sudo reboot

The zip file includes the current shipping firmware (013701) in case you want to revert:

Code: Select all

$ sudo ./vl805 -w vl805_fw_013701.bin
$ sudo reboot

By the way, if you run "sudo ./vl805" with no parameters it displays the version of the currently running firmware. Note that this may differ from what's in the EEPROM if you've just reprogrammed it but not rebooted.
[/quote
Hmmmm. We have had one report so far of a serious performance regression with that firmware, so there is still work to do.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Tue Jul 02, 2019 12:22 pm
by itsonlyme
Had not noticed this but all I did was to play a few flac off a USB stick without problem, and then close down.

Re: FLAC working on Rpi4 1 GB, not working on 4 GB

Posted: Sat Jul 06, 2019 2:29 am
by energyi
Today reflashed Raspbian Buster desktop. FLAC files from original source are now playing fine in VLC with Pi4 4 GB RAM. Files that were transferred previously still do not work. Something was wrong with the file transfer which corrupted the FLACs, don't know what it was. Go figure.