Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Issues #19

Closed
yoriaantje-dev opened this issue Mar 26, 2020 · 10 comments
Closed

Audio Issues #19

yoriaantje-dev opened this issue Mar 26, 2020 · 10 comments

Comments

@yoriaantje-dev
Copy link

yoriaantje-dev commented Mar 26, 2020

Audio Issues

When using USB to connect, everything seems to work just fine. However, upon starting to play any form of audio, AndroidAuto seems to either freeze or crash and shortly after that it says I need to connect my device to get started.

Playing with settings such as RtAudio and selecting or deselecting Audio Channels doesn't seem to make much of a difference for this issue, regardless of what combination I try to use, regardless for if I restart intelligent-auto all together.

All the above listed testing was done on the development version cloned on 25-3-20.

Will be running the same set of tests on the master version, which I will clone today (26-3-20).

Hardware Used:

  • LGG7 Thinq running Android 8.0.0
    • No developer options regarding USB settings have been changed.
    • USB is set to always connect as "Charging"
  • Raspberry Pi 3B+, with original Raspberry Pi Touch Screen
    • Currently on a slightly slower SD Card, with the Raspbarian Desktop Image from the official site.
  • Other:
    • I'm using SSH and VNC Server/Viewer to connect to the Pi when I'm copying/Installing stuff
    • I'm using a High-Quality USB3.0 Cable (Yes, RPi is just USB2.0..) from Anker
@yoriaantje-dev
Copy link
Author

If you can, try to play around with the OpenAuto settings, maybe you'll get better results with a different audio backend? Another thing you might want to look into is the PulseAudio/Alsa configuration, I remember reading somewhere that the packets are small or something and it causes audio to glitch up.
Then when you open the new issue, we'll have alot more to talk about :p
Originally posted by @rsjudka in #6 (comment)

Thanks, I'll get on that this afternoon. Gonna let you know what I run into with Googling.

For now, using BT to play audio seems to work, apart from the fact that the BT Audio is very choppy at best. I'm first going to look into why that happens, as it may be the explanation for both the issues.

I will also be reimaging my RPi 3B+ and using a faster and bigger SD Card.

@icecube45
Copy link

What version of openauto / aasdk are you running?

@robert5974
Copy link

@rsjudka I rebuilt your dash application using @icecube45 aasdk. It seems to be working fine now. I let it play for a while last night without issue.

@yoriaantje-dev
Copy link
Author

yoriaantje-dev commented Mar 29, 2020

What version of openauto / aasdk are you running?

Im running the one that @rsjudka has included as a submodule (and then the dev branches, i just select them if they aren't yet selected)

I managed to get BT Audio working with external adapter, so that's that. Turns out that the RPi just has shitty BT Audio...

@rsjudka I rebuilt your dash application using @icecube45 aasdk. It seems to be working fine now. I let it play for a while last night without issue.

I'll give this a shot aswell.

@rsjudka
Copy link
Owner

rsjudka commented Mar 30, 2020

@yoriaantje-dev you might want to try this too (pulled this from the old OpenAuto Wiki)

AndroidAuto's audio packets are delivered in very small chunks. Due this adjustments of PulseAudio configuration might be needed to avoid audio glitches.

Add/override below lines in /etc/pulse/daemon.conf

resample-method = ffmpeg

In /etc/pulse/default.pa add tsched=0 on the line of 'load-module module-udev-detect'

load-module module-udev-detect tsched=0

After config changes you must restart your pulseaudio instance. You can do it by execution of pulseaudio -k command.

@yoriaantje-dev
Copy link
Author

@yoriaantje-dev you might want to try this too (pulled this from the old OpenAuto Wiki)

AndroidAuto's audio packets are delivered in very small chunks. Due this adjustments of PulseAudio configuration might be needed to avoid audio glitches.
Add/override below lines in /etc/pulse/daemon.conf
resample-method = ffmpeg
In /etc/pulse/default.pa add tsched=0 on the line of 'load-module module-udev-detect'
load-module module-udev-detect tsched=0
After config changes you must restart your pulseaudio instance. You can do it by execution of pulseaudio -k command.

Thanks for the help, I'll try this one out.

For now, building with @icecube45 aasdk has solved the issue.

@rsjudka I rebuilt your dash application using @icecube45 aasdk. It seems to be working fine now. I let it play for a while last night without issue.

I need to rebuild with the new development features/branch anyways, so that's fine. I'll try the new method and let you know.
I'm closing this issue and I'll open a new one to let you know!

@robert5974
Copy link

I've built with the develop branch and it's great! I can without a doubt say that the wifi connection for AA works great and I really like the double tap to fullscreen. The audio slider doesn't seem to affect the volume level though. It only mutes the audio when all the way down the slider. @rsjudka did you say you used amixer commands for the slider?

@rsjudka
Copy link
Owner

rsjudka commented Apr 5, 2020

Yeah I've actually been working on that now, its been a lot learning all about alsa/pulseaudio and their various APIs so its taking a bit longer than I would have hoped lol

In the meantime, if you were to look here you can change that command to match the audio setup you're using. If you're using pulseaudio, you might be able to do amixer -D pulse set Master ... but it really depends on how you set things up.

@robert5974
Copy link

I'll experiment. I use the AudioInjector sound card for Rpi 3b+. I'm pretty sure it uses alsa mixer but I'll investigate that a bit. Thanks.

@robert5974
Copy link

I actually found out that my sound card doesn't allow for software control of Line out Audio. I found a differing opinion but they were wrong. The card has a headphone jack as well and if I use that then the commands work fine which meant the volume slider works as it should. At first I thought using "sset" instead of "set" was the key but no, it accepts both and there's really no difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants