• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Topping D10 with RaspberryPi4 - display issue 48 Khz

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
Hello,

I've recently switched to DAC10 with RaspberryPi4 combo, to listen Apple Music via Airplay.
The problem is, the DAC10's display is showing a constant 48.0 PCM no matter what quality (ALAC 256 or 24 bits/48 Khz) I listen to on Apple Music:
IMG_7340.jpeg


Do you think it's normal and correct? I know that via Airplay1 it's not possible to reach to 192 KHz but it seems like the Rpi4 is resampling the 44 KHz sound to 48 KHz which does not sound quite good actually... Or am I being silly here? I'm kind a noob actually.

note: If I use the DAC connected to an iPhone or an iPad via an USB cable the DAC shows from 44.1 KHz (yet again for ALAC 256 or 24 bits/48 Khz) to 192 KHz

Please advise.
Thanks!
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,745
Likes
3,032
Nothing actually, I've installed a Raspian-Lite on the device and followed the instructions here:
The software would be raspbian lite and shairport-sync then. I didn't see anything in the instructions about setting the audio device to use. I don't know what the default audio device is in Raspbian lite, but I think it used to use dmix so that multiple applications could play at the same time, and that would resample everything so that it could mix the different streams. You can list the available audio devices using the command
Code:
aplay -L
The ones beginning hw: or plughw: use direct access to the device rather than going through mixing.
Look for the config file shairport-sync.conf with is probably in /etc/ or /usr/local/etc/ - it should have a section starting with 'alsa =' containing a setting for output_device where you can tell it to use one that isn't mixed. The mixer_device and mixer_control_name are to tell it what to use for volume control.

Another possibility is that you enabled shairport-sync's DSP
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
501
Likes
323
Raspbian lite uses pulseaudio, like all other debians/raspbians (pulseaudio being mentioned many times in https://downloads.raspberrypi.org/raspios_lite_armhf/release_notes.txt ). IMO the audio runs through PA which runs at a fixed frequency. I do not see any discussion of pulseaudio in the linked tutorial https://www.jeffreythompson.org/blog/2020/04/29/build-an-airplay-receiver-using-raspberry-pi/ , meaning all players are most likely set to "default" alsa device which typically routes to pulseaudio through the alsa pulse plugin.
 

kchap

Addicted to Fun and Learning
Forum Donor
Joined
Jun 10, 2021
Messages
585
Likes
572
Location
Melbourne, Oz
Hello,

I've recently switched to DAC10 with RaspberryPi4 combo, to listen Apple Music via Airplay.
The problem is, the DAC10's display is showing a constant 48.0 PCM no matter what quality (ALAC 256 or 24 bits/48 Khz) I listen to on Apple Music:
View attachment 201424

Do you think it's normal and correct? I know that via Airplay1 it's not possible to reach to 192 KHz but it seems like the Rpi4 is resampling the 44 KHz sound to 48 KHz which does not sound quite good actually... Or am I being silly here? I'm kind a noob actually.

note: If I use the DAC connected to an iPhone or an iPad via an USB cable the DAC shows from 44.1 KHz (yet again for ALAC 256 or 24 bits/48 Khz) to 192 KHz

Please advise.
Thanks!
What software are you using? I know MOode and Volumio have fixed Bit Rate options but by default they usually output the at the source Bit Rate.
 

kchap

Addicted to Fun and Learning
Forum Donor
Joined
Jun 10, 2021
Messages
585
Likes
572
Location
Melbourne, Oz
I missed the previous replies :facepalm: I think you would have a better chance with MOode or Volumio; they both support Airplay. I use Volumio but whatever you like. Your On/Off script would need changing to work in the MOode/Volumio environment, but you have a reasonable chance of making work.

I suggest your download the SW, write to a fresh flash (so you can keep your current OS and config) and give it a go. Worry about the On/Off script later.
 

sq225917

Major Contributor
Joined
Jun 23, 2019
Messages
1,369
Likes
1,641
Don't confuse bit rate with sampling rate. Your dac displays the sampling rate, not the bit rate. Software players often display both.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,745
Likes
3,032
Raspbian lite uses pulseaudio, like all other debians/raspbians (pulseaudio being mentioned many times in https://downloads.raspberrypi.org/raspios_lite_armhf/release_notes.txt ). IMO the audio runs through PA which runs at a fixed frequency. I do not see any discussion of pulseaudio in the linked tutorial https://www.jeffreythompson.org/blog/2020/04/29/build-an-airplay-receiver-using-raspberry-pi/ , meaning all players are most likely set to "default" alsa device which typically routes to pulseaudio through the alsa pulse plugin.
I think the changelog is shared with the non-lite version - it also mentions all sorts of other GUI things that the lite version shouldn't contain, like chromium. https://downloads.raspberrypi.org/r...7/2022-04-04-raspios-bullseye-armhf-lite.info doesn't show PA being present and the tutorial doesn't mention installing it, though I suppose it could be pulled in as a dependency. Usually if you want it available system wide for use by daemons like this you need to change the config too. I may be wrong though - I haven't used Lite in a while.
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
501
Likes
323
Good catch. That means dmix is configured on the default device, with the same result. Since that airplay tutorial never mentions any alsa device configuration, IMO it's reasonable to assume the default is used.
 

mattanderson

Member
Joined
Dec 17, 2019
Messages
20
Likes
16
I missed the previous replies :facepalm: I think you would have a better chance with MOode or Volumio; they both support Airplay. I use Volumio but whatever you like. Your On/Off script would need changing to work in the MOode/Volumio environment, but you have a reasonable chance of making work.

I suggest your download the SW, write to a fresh flash (so you can keep your current OS and config) and give it a go. Worry about the On/Off script later.

I'd recommend piCorePlayer, as well. It runs in memory and has an option to install an Airplay plugin.
 
OP
Ceku

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
The software would be raspbian lite and shairport-sync then. I didn't see anything in the instructions about setting the audio device to use. I don't know what the default audio device is in Raspbian lite, but I think it used to use dmix so that multiple applications could play at the same time, and that would resample everything so that it could mix the different streams. You can list the available audio devices using the command
Code:
aplay -L
The ones beginning hw: or plughw: use direct access to the device rather than going through mixing.
Look for the config file shairport-sync.conf with is probably in /etc/ or /usr/local/etc/ - it should have a section starting with 'alsa =' containing a setting for output_device where you can tell it to use one that isn't mixed. The mixer_device and mixer_control_name are to tell it what to use for volume control.

Another possibility is that you enabled shairport-sync's DSP
I see the following when I check on Pi:
"""
output
hw:CARD=D10s,DEV=0
D10s, USB Audio
Direct hardware device without any conversions
plughw:CARD=D10s,DEV=0
D10s, USB Audio
Hardware device with all software conversions

"""
It seems that D10 is already a direct hardware.

And I don't recall any Shairport DSP; how to check if its enabled or not?
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
501
Likes
323
I do not understand your log - it mentions two devices - which one is actually being used? Most players use the "default" device if the device is not specified explicitly.

The alsa-base.conf config just changes cards' numeric IDs, not important if you use the card name (D10s).
 
OP
Ceku

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
I do not understand your log - it mentions two devices - which one is actually being used? Most players use the "default" device if the device is not specified explicitly.

The alsa-base.conf config just changes cards' numeric IDs, not important if you use the card name (D10s).

Here under what I get full when I check via aplay -L
(I'm currently getting the sound via Topping D10s)

Code:
sysdefault
    Default Audio Device
default
output
hw:CARD=D10s,DEV=0
    D10s, USB Audio
    Direct hardware device without any conversions
plughw:CARD=D10s,DEV=0
    D10s, USB Audio
    Hardware device with all software conversions
sysdefault:CARD=D10s
    D10s, USB Audio
    Default Audio Device
front:CARD=D10s,DEV=0
    D10s, USB Audio
    Front output / input
surround21:CARD=D10s,DEV=0
    D10s, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=D10s,DEV=0
    D10s, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=D10s,DEV=0
    D10s, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=D10s,DEV=0
    D10s, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=D10s,DEV=0
    D10s, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=D10s,DEV=0
    D10s, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=D10s,DEV=0
    D10s, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=D10s,DEV=0
    D10s, USB Audio
    Direct sample mixing device
hw:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Hardware device with all software conversions
sysdefault:CARD=Headphones
    bcm2835 Headphones, bcm2835 Headphones
    Default Audio Device
dmix:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct sample mixing device
hw:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=vc4hdmi0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Default Audio Device
hdmi:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    HDMI Audio Output
dmix:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Direct sample mixing device
hw:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=vc4hdmi1
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    HDMI Audio Output
dmix:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Direct sample mixing device
 
OP
Ceku

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
Just recently found and applied the following solution:

sudo nano /usr/share/alsa/alsa.conf defaults.pcm.dmix.rate 44100 [I](default was 48000)[/I]

Now the DAC shows 44,1 KHz but the sound is not there.
What I do here could be 44 Khz resampled to 48 KHz and then back to 44,1 Khz?
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
501
Likes
323
That just changes the common samplerate for your "default" device. IMO you want to configure your playback app to use "hw:XX" (or plughw:XX) instead of "default".
 
OP
Ceku

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
That just changes the common samplerate for your "default" device. IMO you want to configure your playback app to use "hw:XX" (or plughw:XX) instead of "default".

I'm lost...
I already have the following; there I understand that D10 is already the default output device, am I wrong?

output hw:CARD=D10s,DEV=0 D10s, USB Audio Direct hardware device without any conversions

1650709645988.png
 

phofman

Addicted to Fun and Learning
Joined
Apr 13, 2021
Messages
501
Likes
323
Command aplay -L just lists all available output PCM devices. The menu in alsamixer just selects which card the running instance of alsamixer will control, it has nothing which choosing a device for your player. You need to tell your player software which device to use. You can tell what software has opened your audio device with

sudo lsof /dev/snd/*
 
OP
Ceku

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
Command aplay -L just lists all available output PCM devices. The menu in alsamixer just selects which card the running instance of alsamixer will control, it has nothing which choosing a device for your player. You need to tell your player software which device to use. You can tell what software has opened your audio device with


sudo lsof /dev/snd/*
Yet again, it seems that it's D10:
1650717700604.png


By considering the following line-up:
1650717722261.png
 
OP
Ceku

Ceku

Member
Joined
Apr 2, 2022
Messages
11
Likes
0
Installed Volumio, and its back to normal: 44,1 KHz.
Problem solved... I guess.
 
Top Bottom