New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No 32-bit playback with OSS on intel soundcard + forced resampling #257
Comments
But does your driver and the userspace API support it? |
HI. Yes my driver supports 32bit playback (16bit and 32bit) under OSS. I find no matter what I set the format to it always downsamples to 16bit 44,100 even though I set it explicitly to 96000:32:2. I would like to disable any and all resampling done in mpd if possible. I tried compiling without lsr and soxr but it still performs its own resampling. |
You didn't really answer my question, because you misunderstood how MPD works and what your problem is. MPD already behaves like you want it to behave: MPD will never resample unless necessary or explicitly configured. If MPD always switches back to 44.1/16, it means that your OSS driver refuses to play the given original format. |
mpd --version `Music Player Daemon 0.20.18 Copyright (C) 2003-2007 Warren Dukes warren.dukes@gmail.com Database plugins: Storage plugins: Neighbor plugins: Decoders plugins: Filters: Tag plugins: Output plugins: Encoder plugins: Archive plugins: Input plugins: Playlist plugins: Protocols: Other features: mpd.conf `# An example configuration file for MPD. Read the user manual for documentation: http://www.musicpd.org/doc/user/Files and directoriesThis setting controls the top directory which MPD will search to discover theavailable audio files and add them to the daemon's online database. Thissetting defaults to the XDG directory, otherwise the music directory will bebe disabled and audio files will only be accepted over ipc socket (usingfile:// protocol) or streaming files over an accepted protocol.music_directory "/mnt/D/Music" This setting sets the MPD internal playlist directory. The purpose of thisdirectory is storage for playlists created by MPD. The server will useplaylist files not created by the server but only if they are in the MPDformat. This setting defaults to playlist saving being disabled.playlist_directory "~/.config/mpd/playlists" This setting sets the location of the MPD database. This file is used toload the database at server start up and store the database while theserver is not up. This setting defaults to disabled which will allowMPD to accept files over ipc socket (using file:// protocol) or streamingfiles over an accepted protocol.db_file "~/.config/mpd/database" These settings are the locations for the daemon log files for the daemon.These logs are great for troubleshooting, depending on your log_levelsettings.The special value "syslog" makes MPD use the local syslog daemon. Thissetting defaults to logging to syslog, otherwise logging is disabled.log_file "~/.config/mpd/log" This setting sets the location of the file which stores the process IDfor use of mpd --kill and some init scripts. This setting is disabled bydefault and the pid file will not be stored.pid_file "~/.config/mpd/pid" This setting sets the location of the file which contains information aboutmost variables to get MPD back into the same general shape it was in beforeit was brought down. This setting is disabled by default and the serverstate will be reset on server start up.state_file "~/.config/mpd/state" The location of the sticker database. This is a database whichmanages dynamic information attached to songs.sticker_file "~/.config/mpd/sticker.sql" ############################################################################### General music daemon optionsThis setting specifies the user that MPD will run as. MPD should never run asroot and you may use this setting to make MPD change its user ID afterinitialization. This setting is disabled by default and MPD is run as thecurrent user.#user "nobody" This setting specifies the group that MPD will run as. If not specifiedprimary group of user specified with "user" setting will be used (if set).This is useful if MPD needs to be a member of group such as "audio" tohave permission to use sound card.#group "nogroup" This setting sets the address for the daemon to listen on. Careful attentionshould be paid if this is assigned to anything other then the default, any.This setting can deny access to control of the daemon. Not effective ifsystemd socket activiation is in use.For network#bind_to_address "any" And for Unix Socket#bind_to_address "~/.mpd/socket" This setting is the TCP port that is desired for the daemon to get assignedto.#port "6600" This setting controls the type of information which is logged. Availablesetting arguments are "default", "secure" or "verbose". The "verbose" settingargument is recommended for troubleshooting, though can quickly stretchavailable resources on limited hardware storage.log_level "verbose" If you have a problem with your MP3s ending abruptly it is recommended thatyou set this argument to "no" to attempt to fix the problem. If this solvesthe problem, it is highly recommended to fix the MP3 files with vbrfix(available from http://www.willwap.co.uk/Programs/vbrfix.php), at whichpoint gapless MP3 playback can be enabled.#gapless_mp3_playback "yes" Setting "restore_paused" to "yes" puts MPD into pause mode insteadof starting playback after startup.#restore_paused "no" This setting enables MPD to create playlists in a format usable by othermusic players.#save_absolute_paths_in_playlists "no" This setting defines a list of tag types that will be extracted during theaudio file discovery process. The complete list of possible values can befound in the user manual.#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" This setting enables automatic update of MPD's database when files inmusic_directory are changed.#auto_update "yes" Limit the depth of the directories being watched, 0 means only watchthe music directory itself. There is no limit by default.#auto_update_depth "3" ############################################################################### Symbolic link behaviorIf this setting is set to "yes", MPD will discover audio files by followingsymbolic links outside of the configured music_directory.#follow_outside_symlinks "yes" If this setting is set to "yes", MPD will discover audio files by followingsymbolic links inside of the configured music_directory.#follow_inside_symlinks "yes" ############################################################################### Zeroconf / Avahi Service DiscoveryIf this setting is set to "yes", service information will be published withZeroconf / Avahi.#zeroconf_enabled "yes" The argument to this setting will be the Zeroconf / Avahi unique name forthis MPD server on the network.#zeroconf_name "Music Player" ############################################################################### PermissionsIf this setting is set, MPD will require password authorization. The passwordsetting can be specified multiple times for different password profiles.#password "password@read,add,control,admin" This setting specifies the permissions a user has who has not yet logged in.#default_permissions "read,add,control,admin" ############################################################################### Database#database { plugin "proxy"host "other.mpd.host"port "6600"#} Inputinput { proxy "proxy.isp.com:8080"proxy_user "user"proxy_password "password"} ############################################################################### Audio OutputMPD supports various audio output types, as well as playing through multipleaudio outputs at the same time, through multiple audio_output settingsblocks. Setting this block is optional, though the server will only attemptautodetection for one sound card.An example of an ALSA output:#audio_output { type "alsa"name "My ALSA Device"device "hw:0,0" # optionalmixer_type "hardware" # optionalmixer_device "default" # optionalmixer_control "PCM" # optionalmixer_index "0" # optional#} An example of an OSS output:audio_output { mixer_type "disabled" # optionalmixer_device "/dev/oss/oss_hdaudio0/pcm0" # optionalmixer_control "/dev/oss/oss_hdaudio0/pcm0" # optional} #audio_output_format "96000:32:2" An example of a shout output (for streaming to Icecast):#audio_output { type "shout"encoder "vorbis" # optionalname "My Shout Stream"host "localhost"port "8000"mount "/mpd.ogg"password "hackme"quality "5.0"bitrate "128"format "44100:16:1"protocol "icecast2" # optionaluser "source" # optionaldescription "My Stream Description" # optionalurl "http://example.com" # optionalgenre "jazz" # optionalpublic "no" # optionaltimeout "2" # optionalmixer_type "software" # optional#} An example of a recorder output:#audio_output { type "recorder"name "My recorder"encoder "vorbis" # optional, vorbis or lamepath "/var/lib/mpd/recorder/mpd.ogg"quality "5.0" # do not define if bitrate is definedbitrate "128" # do not define if quality is definedformat "44100:16:1"#} An example of a httpd output (built-in HTTP streaming server):#audio_output { type "httpd"name "My HTTP Stream"encoder "vorbis" # optional, vorbis or lameport "8000"bind_to_address "0.0.0.0" # optional, IPv4 or IPv6quality "5.0" # do not define if bitrate is definedbitrate "128" # do not define if quality is definedformat "44100:16:1"max_clients "0" # optional 0=no limit#} An example of a pulseaudio output (streaming to a remote pulseaudio server)#audio_output { type "pulse"name "My Pulse Output"server "remote_server" # optionalsink "remote_server_sink" # optional#} An example of a winmm output (Windows multimedia API).#audio_output { type "winmm"name "My WinMM output"device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optionalordevice "0" # optionalmixer_type "hardware" # optional#} An example of an openal output.#audio_output { type "openal"name "My OpenAL output"device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional#} An example of an sndio output.#audio_output { type "sndio"name "sndio output"mixer_type "software"#} An example of an OS X output:#audio_output { type "osx"name "My OS X Device"device "Built-in Output" # optionalchannel_map "-1,-1,0,1" # optional#} Example "pipe" output:#audio_output { type "pipe"name "my pipe"command "aplay -f cd 2>/dev/null"Or if you're want to use AudioCompresscommand "AudioCompress -m | aplay -f cd 2>/dev/null"Or to send raw PCM stream through PCM:command "nc example.org 8765"format "44100:16:2"#} An example of a null output (for no audio output):#audio_output { type "null"name "My Null Output"mixer_type "none" # optional#} ############################################################################### Normalization automatic volume adjustmentsThis setting specifies the type of ReplayGain to use. This setting can havethe argument "off", "album", "track" or "auto". "auto" is a special mode thatchooses between "track" and "album" depending on the current state ofrandom playback. If random playback is enabled then "track" mode is used.See http://www.replaygain.org for more details about ReplayGain.This setting is off by default.#replaygain "album" This setting sets the pre-amp used for files that have ReplayGain tags. Bydefault this setting is disabled.#replaygain_preamp "0" This setting sets the pre-amp used for files that do NOT have ReplayGain tags.By default this setting is disabled.#replaygain_missing_preamp "0" This setting enables or disables ReplayGain limiting.MPD calculates actual amplification based on the ReplayGain tagsand replaygain_preamp / replaygain_missing_preamp setting.If replaygain_limit is enabled MPD will never amplify audio signalabove its original level. If replaygain_limit is disabled such amplificationmight occur. By default this setting is enabled.#replaygain_limit "yes" This setting enables on-the-fly normalization volume adjustment. This willresult in the volume of all playing audio to be adjusted so the output hasequal "loudness". This setting is disabled by default.#volume_normalization "no" ############################################################################### Character EncodingIf file or directory names do not display correctly for your locale then youmay need to modify this setting.#filesystem_charset "UTF-8" ############################################################################### audio_output { mpd log showing conversion from 96000:32:2 to 44100:16:2 ossinfo -v9 showing 16bit and 32bit capability for my intel HDA driver `Version info: OSS 4.2 (b 2017/201702031111) (0x00040100) Number of audio devices: 6 Device objects MIDI devices (/dev/midi*) Mixer devices Audio devices HD Audio play pcm2 /dev/oss/oss_hdaudio0/pcm1 (device index 1) HD Audio play spdifout1 /dev/oss/oss_hdaudio0/spdout0 (device index 2) HD Audio rec mix6 /dev/oss/oss_hdaudio0/pcmin0 (device index 3) HD Audio rec mix5 /dev/oss/oss_hdaudio0/pcmin1 (device index 4) HD Audio rec int-mic /dev/oss/oss_hdaudio0/pcmin2 (device index 5) Nodes terminal output of deadbeef player showing 32bit conversion using a custom oss resampler (petrovs resampler) just to show it is possible. `selected output plugin: OSS output plugin with fftrate oss: exclusive mode is activated! |
MPD does not resample. This is the part where you're wrong. |
I can't get mpd to output at 32bit with OSS although my soundcard supports it. It also resamples music even though I don't compile it with resamplers. Is there a way to disable the internal resampling once and for all?
The text was updated successfully, but these errors were encountered: