bullen
Posts: 218
Joined: Sun Apr 28, 2013 2:52 pm

Re: Analogue audio redux

Mon Jan 01, 2018 6:55 pm

Hi, is this patch in the latest raspbian release?
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

User avatar
algorithm
Posts: 154
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: Analogue audio redux

Thu Jan 11, 2018 10:21 am

bullen wrote:
Mon Jan 01, 2018 6:55 pm
Hi, is this patch in the latest raspbian release?
I don't know about the latest Raspbian release but here's how to try it, from the first post: "add audio_pwm_mode=2 to /boot/config.txt and reboot." I imagine this works if your firmware is at least as new as that first post which was from Wed 11 Oct 2017. Check with "uname -v". If it's older, first do "sudo apt-get update && sudo apt-get -y dist-upgrade" and try again. If it's still too old, you might or might not try "sudo rpi-update" which goes well 99% of the time. If you do and it does go well, then it will definitely work.

bullen
Posts: 218
Joined: Sun Apr 28, 2013 2:52 pm

Re: Analogue audio redux

Thu Jan 11, 2018 5:19 pm

Works!

Thx jdb and algorithm!

Now my 3D Space Shooter works 99%!

The only tiny bug is that "text to voice" doesn't seem to work.

java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 48000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian is supported.

viewtopic.php?f=78&t=151544
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Ionic
Posts: 8
Joined: Sun Jun 04, 2017 4:56 pm

Re: Analogue audio redux

Fri Jan 19, 2018 6:52 am

jdb wrote:
Wed Oct 11, 2017 11:07 pm
Available in latest rpi-update firmware is a PWM audio driver that significantly increases the audio quality available from the 3.5mm TRRS jack.

To enable the advanced audio driver, add audio_pwm_mode=2 to /boot/config.txt and reboot.
Hi all, many thanks to jdb for this driver. Is there a way to use ONLY this driver without using rpi-update? I don't want to break my system in the case that something has a regression.

Thanks

bullen
Posts: 218
Joined: Sun Apr 28, 2013 2:52 pm

Re: Analogue audio redux

Fri Jan 19, 2018 11:14 am

I tried to, but the update only gets you to this summer I'm afraid... so either install a fresh sd card or (I didn't get a reply if the new driver was in there actually) go bananas with firmware update. I think...

@jdb can you try aeonalpha an see why the text to speech doesn't work with the new driver? I think it might reproduce the ALSA problem, atleast I know it's reproducible! viewtopic.php?f=78&t=151544
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

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

Re: Analogue audio redux

Fri Jan 19, 2018 1:00 pm

Odd. The ALSA driver should happily accept mono streams.

Code: Select all

pi@raspberrypi:~$ speaker-test -c 1 -t sine

speaker-test 1.1.3

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Sine wave rate is 440.0000Hz
Does the behaviour definitely change from working -> not working on the same firmware version, just by adding audio_pwm_mode=2?
Rockets are loud.
https://astro-pi.org

bullen
Posts: 218
Joined: Sun Apr 28, 2013 2:52 pm

Re: Analogue audio redux

Fri Jan 19, 2018 1:22 pm

Yes, just tried.

No, now it worked... so it's probably the unreproducible thing?!

Now I tried it on a RPi 2 just to see the framerate and there was a segmentationfault and raspian became unresponsive when I closed the game... can be completely unrelated... Now I lost the connection to xserver when exiting fullscreen... stable it seems...

Oh well it might work good in a couple of years maybe. ;)

Off topic: any1 else intrested in this: https://www.youtube.com/watch?v=Mp6znwaZ5xo
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Ionic
Posts: 8
Joined: Sun Jun 04, 2017 4:56 pm

Re: Analogue audio redux

Fri Jan 19, 2018 2:11 pm

Thanks jdb for bypass my question.

Regards

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

Re: Analogue audio redux

Fri Jan 19, 2018 2:42 pm

Ionic wrote:
Fri Jan 19, 2018 6:52 am
jdb wrote:
Wed Oct 11, 2017 11:07 pm
Available in latest rpi-update firmware is a PWM audio driver that significantly increases the audio quality available from the 3.5mm TRRS jack.

To enable the advanced audio driver, add audio_pwm_mode=2 to /boot/config.txt and reboot.
Hi all, many thanks to jdb for this driver. Is there a way to use ONLY this driver without using rpi-update? I don't want to break my system in the case that something has a regression.

Thanks
You can upgrade only the firmware by doing sudo SKIP_KERNEL=1 rpi-update, but this will leave you in an even more unsupported configuration. The current branch of rpi-update firmware is quite stable and in fact is nearly ready to be pushed to Raspbian.
Rockets are loud.
https://astro-pi.org

Ionic
Posts: 8
Joined: Sun Jun 04, 2017 4:56 pm

Re: Analogue audio redux

Fri Jan 19, 2018 3:09 pm

jdb wrote:
Fri Jan 19, 2018 2:42 pm
You can upgrade only the firmware by doing sudo SKIP_KERNEL=1 rpi-update, but this will leave you in an even more unsupported configuration. The current branch of rpi-update firmware is quite stable and in fact is nearly ready to be pushed to Raspbian.
Thanks, is there an official way to know when a dev branch is merged to Raspbian?

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

Re: Analogue audio redux

Fri Jan 19, 2018 5:41 pm

Not officially, no. It's normally the case that an updated apt-get firmware is made available at the same time as a Raspbian distribution release.
Rockets are loud.
https://astro-pi.org

bullen
Posts: 218
Joined: Sun Apr 28, 2013 2:52 pm

Re: Analogue audio redux

Sat Jan 20, 2018 7:48 pm

AL lib: (EE) oss_open_playback: Could not open /dev/dsp: No such file or directory
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"

Sad panda... seems related to low power: does the GPU disable audio if it detects low power?

The 3D works fine?!

Edit: ok now the pi is toast... I get alot of output I can't copy and paste here when I try to boot it...

Great firmware!

Is this audio fix in the latest raspbian release or not?
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

Ionic
Posts: 8
Joined: Sun Jun 04, 2017 4:56 pm

Re: Analogue audio redux

Sat Jan 20, 2018 9:31 pm

jdb wrote:
Fri Jan 19, 2018 5:41 pm
Not officially, no. It's normally the case that an updated apt-get firmware is made available at the same time as a Raspbian distribution release.
Ok, so I can't know if the latest 4.9.35-v7+ kernel has this new driver or not. If I use audio_pwm_mode=2 option I still hear "HISS" from speaker, so, maybe not ;-)

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 30 guests