energyi
Posts: 141
Joined: Tue Mar 24, 2015 9:39 pm

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

Fri Jun 28, 2019 12:49 pm

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.
energyi

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

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

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

energyi
Posts: 141
Joined: Tue Mar 24, 2015 9:39 pm

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

Fri Jun 28, 2019 6:48 pm

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.
energyi

energyi
Posts: 141
Joined: Tue Mar 24, 2015 9:39 pm

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

Sat Jun 29, 2019 10:31 pm

Anyone else having audio challenges on a 4 GB RAM rpi4 running FLACs with VLC?
energyi

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

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

Sun Jun 30, 2019 8:38 am

Did you test with the memory settings described above?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Aardappeltaart
Posts: 47
Joined: Wed Mar 02, 2016 11:32 am

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

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?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

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

Mon Jul 01, 2019 10:11 am

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?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

binaryhermit
Posts: 54
Joined: Sun Apr 13, 2014 1:26 am
Location: Lockport, Illinois
Contact: Website

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

Mon Jul 01, 2019 5:31 pm

Assuming this is a bug with the "bounce buffer code" it can be fixed in software, right?

energyi
Posts: 141
Joined: Tue Mar 24, 2015 9:39 pm

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

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.
energyi

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

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

Mon Jul 01, 2019 10:09 pm

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

drgeoff
Posts: 9825
Joined: Wed Jan 25, 2012 6:39 pm

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

Mon Jul 01, 2019 11:06 pm

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?

energyi
Posts: 141
Joined: Tue Mar 24, 2015 9:39 pm

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

Tue Jul 02, 2019 3:05 am

drgeoff wrote:
Mon Jul 01, 2019 11:06 pm
You did reboot after editing /boot/config.txt?
[/quote]

Yes
energyi

itsonlyme
Posts: 129
Joined: Sun Feb 12, 2012 12:43 pm

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

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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

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

Tue Jul 02, 2019 11:21 am

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

itsonlyme
Posts: 129
Joined: Sun Feb 12, 2012 12:43 pm

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

Tue Jul 02, 2019 12:22 pm

Had not noticed this but all I did was to play a few flac off a USB stick without problem, and then close down.

energyi
Posts: 141
Joined: Tue Mar 24, 2015 9:39 pm

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

Sat Jul 06, 2019 2:29 am

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.
energyi

Return to “General discussion”