How to reset audio device after speaker phat removed


#1

Hi

Last year I bought a number of phats and other accessories but was unable to make time to have a play so today was the first time I have had a chance to start assembling and playing with some of them, including the speaker phat and the Unicorn phat and also the zerocam and installing the necessary s/w on a RP3 V1.2. All worked straight away with no problems other than getting camera cable round right way :-).

However, as this was just playing and having a look-see at each accessory, I want to run my RP3 without having the phats plugged in and despite a quick review of this forum and a google search I have not found a way to reset my RP3 so that it plays audio back through the HDMI when the speaker phat is no longer connected. omxplayer seems to work just fine but VLC remains silent - can anyone point me at some documentation that explains what I have to do to get VLC playing back audio without the speaker phat connected ?

Finally are there any other phats which once installed cause RP3 functionality to become limited once they are unplugged ?

Cheers

John


#2

You must comment-out dtoverlay=hifiberry-dac in your /boot/config.txt file, and uncomment dtparam=audio=on. You can edit this file by opening Terminal and running sudo nano /boot/config.txt

You’ll also probably want to move /etc/asound.conf somewhere else; perhaps sudo mv /etc/asound.conf /etc/asound.conf.off

And probably stop Pulse Audio:

sudo systemctl disable pulseaudio
sudo systemctl stop pulseaudio

#3

Many thanks - I’ll try this over the weekend :-)

A little surprised that the system can’t detect that the speaker Phat is not connected and either switch back to a default automatically or that VLC doesn’t have an option to switch between different playback devices you can select if you remove the speaker Phat but heyho :-)

Cheers

John


#4

It’s somewhat of a nuisance, but it’s a balance of cost vs convenience. I’m wondering if I could author an uninstall script, or a “switcher” without it doing untoward things to non-standard systems.


#5

Possibly related issue is that I tried running my Astro_Pi.Sense.HAT on this Raspberry Pi (3) and the RP would not boot up, it would get part way through and then hang, seemingly at different parts of the boot process (although frequently it was at a line that mentioned the “RF Kill switch” (?). Initially I thought that during the long period I had not played with the Astro_Pi something had broken but I then tried on a second RP2B and the Astro_Pi sense HAT worked just fine.

As I have been experimenting with installing several recently acquired pHAT/HATs on the RP3 I suspect something installed is blocking the Boot when the Astro_Pi is connected, both RPs have been rebuilt using the latest NOOBS (and i have run the apt-get update and upgrade) but the RP2B is still pretty much vanilla with only the Astro_Pi package and setup.

Is this a common problem i.e. different installed packages being incompatible, and should I be using different SD cards with just the basic OS installed and just the single/minimum required packages for the pHAT/HAT I am trying out?

Regards

John


#6

It’s unusual that a particular combination of packages would cause a failure to boot. I’d suspect it’s more likely something specifically to do with the Astro_Pi. An inadequate power supply is a common cause of boot problems.

Do you have anything else plugged in?


#7

I have the WiFi, keyboard and mouse dongles but these were simply transferred to the second RP2, I used same power supply for both RPs which I thought was my most recent power supply with 2A but will confirm this over weekend, does the RP3 require more power than the RP2?

Thanks
John


#8

Hi

Apologies for slow response, the dreaded man-flu got me :-(. Anyway, did try the mods to /boot/config.txt and that indeed resolved the problem with no sound after Speaker pHAT disconnected form the RP - I did not need to do the other suggested changes in the asound.conf file.

I then tried using my RP3 and a new NOOBS installation (Stretch) and the Astro_Pi and it booted all the way and I was able to control the sense HAT (LEDs) without problem. I also happened to be playing with a recent purchase of the ZeroSeg LED display. When installed on the RP3 with the previous OS, after booting all the lights came on in the display but none of the example programs worked. I then rebooted using the new OS SD and then all the ZeroSeg example programs worked. I am compiling a list of the various HATs that I installed s/w for on the old RP3 OS SD and will report back in case anything obvious leaps out to explain why some HATs with LED components seem to misbehave.

Many thanks for all the help so far

Cheers

John