1

So I have a not-so-modern audio system (no Bluetooth or something, but AUX entrance), a desktop computer running Linux on the other side of the room, and a Raspberry Pi which I never used lying around. I would really like to play my offline music which I have on my PC from the stereo system, controlled from my PC. Is this possible with a Raspberry Pi?

I'm thinking of having my Pi connected with the stereo system via the Aux cable and controlled from my PC “via the network” (I'm not precisely sure what this should mean). I don't mind having my music stored on the Raspberry Pi, but playing should be controlled from the PC.

Is this possible? If yes, can you give a rough description of what needs to be done for a noob like me? Bonus points if I can also control the music from my Android Phone.

2
  • 1
    It's possible but (just in case you do not know such things exist) it would be much easier (and more versatile, and more reliable) to get a $20 bluetooth adapter with an appropriate output jack (RCA or 3.5mm stereo depending on what the AUX port is). Of course your PC would also need bluetooth.
    – goldilocks
    Nov 14 '20 at 20:40
  • @goldilocks comment is the easiest, but here's a variation on andyroo's answer below: 1) install Samba (or set up a Windows share) on your PC (where you have the music stored) 2) mount the Samba or Windoze share from your RPi 3) connect RPi audio jack to AUX input on your audio system 4) SSH into RPi from Android & play music from the share.
    – Seamus
    Nov 14 '20 at 22:31
2

There are three things to consider:

  1. Storage of the music.

The music files have to be available to the Pi. This means setting up up a share on the Pc so the Pi can access the files and having them in the correct format.

  1. Connection to the stereo.

The Pi has very basic audio capabilities and I would look to one of the many many HATs that are available others are available). The majority of these use I2C to link to the Pi and provide a digital to analogue converter. You will need to find a HAT that outputs signals that are compatible with your stereo. Note Aux ports can be input (from an auxiliary device) or output (to an auxiliary amp and speaker set).

  1. Something to provide control

This piece of software has to reside on the Pi, link to the music, link to the HAT on the Pi and take control. Sounds a lot but it's a common need and a search for Pi music players will give you lots and lots. My personal choice is Volumio - I am not affiliated to them but a happy user but this takes over the Pi completely as it can:

  • Link to remote sources of music
  • Index the music (inc album art) without being concerned on the music format as long as the music meta data is present in the file
  • Let you control it from a web browser on your PC or an app running on Android or IOS devices. I think the Android app handles multi-room sync'd output where as my iOS version does not. The apps are chargeable - this is one way they fund the development BUT web browsing on my iPhone is fine as the page is reactive to device size and orientation.
  • Output via the HAT or to Bluetooth devices (inc cheap portable Bluetooth headphones and speakers)

Lots of alternatives are available (see here for some examples) but I would also think about:

  1. Is you output (i.e. amp and speakers) capable of decent music playback?
  2. Does your collection have the correct data esp album links?
  3. Would you be better just to get a small portable set-up that takes a SD card?

You can find a few videos about this by John Darko on YouTube He is an audio nut so some solutions are the cost of a small house but there are a few Pi based ones as well.

1

There is a standard UPnP/DLNA that makes it easy to setup what you want, including bonus points for controlling it with your Android smartphone.

You can install a media server on your PC and a media renderer on the Raspberry Pi. Before doing it you must have the audio working on the RasPi, means you should be able to play local stored test songs with simple programs like aplay.

How to do all of this you can look at Howto install UPnP/DLNA multiroom media environment. Of course we are an Raspberry Pi, so the example given there is to install a media server on a RasPi. But because you are running Linux on your PC it should not be a big problem to also install minidlna on it. At least with Debian or Ubuntu you will find it in its repositories and on other distributions it should also be available as installable version.

1

Yet another option is to use Pulseaudio (especially if you already have it on your PC), configuring the Pi as a network sink. In the simplest case, you set up module-native-protocol-tcp on the Pulse server on your Pi, and set the $PULSE_SERVER variable on your PC to the IP address of the Pi.

If everything is set up correctly, you'll have another output device in pavucontrol dialog which you can set as default or send the output of specific applications to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy