2

I have a Raspberry Pi 4 and have been messing around with Pulseaudio and Alsa a lot lately. I wrote an asoundrc file which I want the system to run every time it's on. However, Pulseaudio keeps deleting it and I haven't been able to find a workaround online. My initial idea was to write a python script to manually enter my code into the asoundrc file every time the Pi boots up. But I'm unsure how to go about this and maybe there is a better solution that I missed. So any suggestions would be really appreciated :)

Here is my current asoundrc file...

pcm.bth-1 { type plug slave.pcm { type bluealsa device "FA:D8:78:FB:57:36" profile "a2dp" } } pcm.bth-2 { type plug slave.pcm { type bluealsa device "5C:44:3E:54:E0:01" profile "a2dp" } } pcm.bth-multi { type plug; slave.pcm { type multi; slaves.a.pcm "bth-1"; slaves.a.channels 2; slaves.b.pcm "bth-2"; slaves.b.channels 2; bindings.0 { slave a; channel 0; } bindings.1 { slave a; channel 1; } bindings.2 { slave b; channel 0; } bindings.3 { slave b; channel 1; } master 1 } ttable.0.0 1 ttable.1.1 1 ttable.0.2 1 ttable.1.3 1 } 
1

1 Answer 1

0

There is a workaround.

Keep a second copy of your file, somewhere where it won't get deleted.
Have a Cron entry that copies that file to replace the deleted one.

You could work out the best time to run the replacement command.

This may be crude but it'll keep you going until you find out how to stop the deletions from happening.

1
  • I would upvote it, but apparently, I need 15 reputation for that sorry. Do you know what command I would need to enter in Cron? I entered it using the command: sudo crontab -e and then inside it I punched in the command: @reboot cp /home/pi/Desktop/Acon /home/pi/.asoundrc. But nothing is in the .asoundrc file everytime I check it after rebooting my Pi. Commented Aug 10, 2021 at 1:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.