Skip to main content
Evert's website

Connecting a 1999 Pioneer CD player to a Bluetooth soundbar (1)

Recently I acquired a Pioneer PD-F1009 from family. This device is almost a kind of jukebox for CDs as it can hold up to 301 of them. Being a device from the year 1999, the PD-F1009 can unfortunately only output over RCA, optical SPDIF or 6.35mm phone, so I went looking for a way to connect it to a Bluetooth audio device.

Pioneer PD-F1009
Pioneer PD-F1009

Hardware #

For this project I used the following hardware:

Enabling and testing the HiFiBerry DAC #

Our starting point is a clean install of Raspberry Pi OS. I chose the 64-bit lite version (without GUI/Desktop environment) based on Debian 12 (Bookworm). First we need make some changes to /boot/config.txt in order to disable the onboard audio and enable our HiFiBerry DAC.

  1. Disable the onboard audio by commenting out or removing the line 'dtparam=audio=on'.

  2. Disable HDMI audio by changing the line 'dtoverlay=vc4-kms-v3d' to 'dtoverlay=vc4-kms-v3d,noaudio'.

  3. Enable the device tree overlay for the HiFiBerry board by adding the line 'dtoverlay=hifiberry-dacplusadc'. If you're not using the DAC+ ADC you need to change the overlay name to the right one for your particular board: all options are listed at the HiFiBerry website.

Reboot your Pi and issue the command 'aplay -l'. If everything went correctly you should see your board in the output:

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplusadc], device 0: HiFiBerry DAC+ADC HiFi multicodec-0 [HiFiBerry DAC+ADC HiFi multicodec-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Next, I connected the Pioneer to the DAC+ ADC using a stereo RCA to 3.5mm cable and let it play a CD. We can then test the recording capabilities of our Pi by issuing the command 'arecord -d 10 -f cd test.wav'. This will record 10 seconds of CD audio from the DAC to a WAV file. I transferred the WAV file to my pc using scp and played it there to verify that audio from the Pioneer was indeed recorded.

Redirecting the audio to a Bluetooth device #

Of course recording audio from the CD player is cool, but what we really want is to redirect that audio in real time to a Bluetooth sound device. Fortunately, the Pi comes with onboard Bluetooth capabilities. For testing I will use a pair of Sony earbuds, namely the WF-C500.

First we need to install the pulseaudio-module-bluetooth package, to enable PulseAudio interaction with Bluetooth devices:

sudo apt install pulseaudio-module-bluetooth

Next, place the Bluetooth earbuds or speaker in pairing mode and run the command 'bluetoothctl' to enter a Bluetooth shell:

# power on
Changing power on succeeded

# scan on
...
[NEW] Device 30:53:C1:85:45:05 WF-C500

# pair 30:53:C1:85:45:05
Attempting to pair with 30:53:C1:85:45:05
...
Pairing successful

# connect 30:53:C1:85:45:05
Attempting to connect to 30:53:C1:85:45:05
...
Connection successful

# trust 30:53:C1:85:45:05
Changing 30:53:C1:85:45:05 trust succeeded

# scan off
Discovery stopped

# exit

If we now list our audio devices using 'pactl list sources short', we can see our DAC output (ID 0/line 1) and input (ID 1/line 2), and our Bluetooth device (ID 2/line 3):

0	alsa_output.platform-soc_sound.stereo-fallback.monitor	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
1	alsa_input.platform-soc_sound.stereo-fallback	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
2	bluez_sink.30_53_C1_85_45_05.a2dp_sink.monitor	module-bluez5-device.c	s16le 2ch 44100Hz	SUSPENDED

Using 'pacat' we can then route the input to the Bluetooth output:

pacat -r --latency-msec=5 -d alsa_input.platform-soc_sound.stereo-fallback | pacat -p --latency-msec=5 -d bluez_sink.30_53_C1_85_45_05.a2dp_sink

Play the CD again and you should hear it loud and clear over your Bluetooth speaker or earbuds!

In the next part we will develop a simple application that allows the user to pair and connect Bluetooth devices through a touch screen interface.