MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.15k stars 347 forks source link

ALSA OUTPUT TO My DAC 32 BIT WHEN PLAYING 16 OR 24 BIT FILES #2086

Closed chips023 closed 1 month ago

chips023 commented 1 month ago

Bug report

Describe the bug

ALSA OUTPUT TO My DAC 32 BIT WHEN PLAYING 16 OR 24 BIT FILES mpd always show format: S32_LE

Expected Behavior

Actual Behavior

Version

root@DietPi:~# mpd -V
Music Player Daemon 0.23.12 (0.23.12)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [sidplay] sid mus str prg P00
 [wildmidi] mid
 [fluidsynth] mid
 [adplug] amd d00 hsc laa rad raw sa2
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps://
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo sndio pipe alsa ao oss openal pipewire pulse jack httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file io_uring archive alsa curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

Configuration

root@DietPi:~# cat /etc/mpd.conf

#
music_directory "/mnt/music"
#

#
playlist_directory "/mnt/music"
#

#
db_file "/mnt/dietpi_userdata/.mpd_cache/db_file"

#
state_file "/mnt/dietpi_userdata/.mpd_cache/state"
#

#
sticker_file "/mnt/dietpi_userdata/.mpd_cache/sticker.sql"
#

#
# For network
bind_to_address         "localhost"
#
# And for Unix Socket
bind_to_address "/run/mpd/socket"
#

# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

# Decoder #####################################################################
#

decoder {
        plugin                  "hybrid_dsd"
        enabled                 "no"
#       gapless                 "no"
}
decoder {
        plugin        "wildmidi"
        enabled       "no"
        #config_file "/etc/timidity/timidity.cfg"
}

#
filesystem_charset      "UTF-8"
#
###############################################################################
# Simple ALSA output
audio_output {
    type "alsa"
    name "DietPi ALSA"
        device "hw:0,0"
}
root@DietPi:~#

Log

chips023 commented 1 month ago

Play 44.1KHZ 16-bit wav file

root@DietPi:~# cat /proc/asound/card*/pcm*p/sub*/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22050
chips023 commented 1 month ago

Play 44.1KHZ 24-bit wav file

root@DietPi:~# cat /proc/asound/card*/pcm*p/sub*/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22050
chips023 commented 1 month ago

Play 96KHZ 24-bit wav file

root@DietPi:~# cat /proc/asound/card*/pcm*p/sub*/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 12000
buffer_size: 48000
chips023 commented 1 month ago

MPD always show format: S32_LE

Why?

MaxKellermann commented 1 month ago

How am I supposed to know if you refuse to provide the information asked from you?

borine commented 1 month ago

MPD always show format: S32_LE Why?

Just a wild guess: perhaps S32_LE is the only format supported by your "DAC 32 bit" ?

MaxKellermann commented 1 month ago

Closing because submitter did not reply with more information, and I'm tired of people who ignore the instructions that were given to them. I'm not writing these for fun - it's a necessity.