From c7bd8c663d587a18852796d288b18a6e00a1c417 Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Fri, 6 Nov 2020 16:14:23 +0100 Subject: [PATCH 1/9] increment version number to 0.22.4 --- NEWS | 2 ++ doc/conf.py | 2 +- meson.build | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 10b5e1883..ea8a34feb 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.22.4 (not yet released) + ver 0.22.3 (2020/11/06) * playlist - add option "as_directory", making CUE file expansion optional diff --git a/doc/conf.py b/doc/conf.py index 2df29d071..9b163b6cb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,7 @@ author = 'Max Kellermann' # built documents. # # The short X.Y version. -version = '0.22.3' +version = '0.22.4' # The full version, including alpha/beta/rc tags. release = version diff --git a/meson.build b/meson.build index e0df9d4d2..eead7888f 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'mpd', ['c', 'cpp'], - version: '0.22.3', + version: '0.22.4', meson_version: '>= 0.49.0', default_options: [ 'c_std=c11', From 8a7986c3bf13415790932cf1f27c3a1f8144a01a Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Tue, 10 Nov 2020 15:48:47 +0100 Subject: [PATCH 2/9] doc/plugins.rst: add DSD spec links --- doc/plugins.rst | 12 ++++++++++-- doc/user.rst | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/plugins.rst b/doc/plugins.rst index 06fe714c1..96ce259b7 100644 --- a/doc/plugins.rst +++ b/doc/plugins.rst @@ -378,10 +378,14 @@ flac Decodes FLAC files using libFLAC. +.. _decoder_dsdiff: + dsdiff ------ -Decodes DFF files containing DSDIFF data (e.g. SACD rips). +Decodes DSDIFF (`Direct Stream Digital Interchange File Format +<http://www.sonicstudio.com/pdf/dsd/DSDIFF_1.5_Spec.pdf>`_) files +(:file:`*.dff`). These contain :ref:`DSD <dsd>` instead of PCM. .. list-table:: :widths: 20 80 @@ -392,10 +396,14 @@ Decodes DFF files containing DSDIFF data (e.g. SACD rips). * - **lsbitfirst yes|no** - Decode the least significant bit first. Default is no. +.. _decoder_dsf: + dsf --- -Decodes DSF files containing DSDIFF data (e.g. SACD rips). +Decodes DSF +(<https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf>) +files (:file:`*.dsf`). These contain :ref:`DSD <dsd>` instead of PCM. fluidsynth ---------- diff --git a/doc/user.rst b/doc/user.rst index abd7c7b1f..694ce0cc5 100644 --- a/doc/user.rst +++ b/doc/user.rst @@ -1032,12 +1032,20 @@ Check list for bit-perfect playback: :code:`format`, :ref:`audio_output_format <audio_output_format>`). * Verify that you are really doing bit-perfect playback using :program:`MPD`'s verbose log and :file:`/proc/asound/card*/pcm*p/sub*/hw_params`. Some DACs can also indicate the audio format. +.. _dsd: + Direct Stream Digital (DSD) --------------------------- -DSD (`Direct Stream Digital <https://en.wikipedia.org/wiki/Direct_Stream_Digital>`_) is a digital format that stores audio as a sequence of single-bit values at a very high sampling rate. +DSD (`Direct Stream Digital +<https://en.wikipedia.org/wiki/Direct_Stream_Digital>`_) is a digital +format that stores audio as a sequence of single-bit values at a very +high sampling rate. It is the sample format used on `Super Audio CDs +<https://en.wikipedia.org/wiki/Super_Audio_CD>`_. -:program:`MPD` understands the file formats dff and dsf. There are three ways to play back DSD: +:program:`MPD` understands the file formats :ref:`DSDIFF +<decoder_dsdiff>` and :ref:`DSF <decoder_dsf>`. There are three ways +to play back DSD: * Native DSD playback. Requires ALSA 1.0.27.1 or later, a sound driver/chip that supports DSD and of course a DAC that supports DSD. From 1092882f382d51c4199bfe2251da12e1b46607de Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Tue, 10 Nov 2020 15:39:18 +0100 Subject: [PATCH 3/9] decoder/dsdiff: apply padding to odd-sized chunks Closes https://github.com/MusicPlayerDaemon/MPD/issues/1001 --- NEWS | 2 ++ src/decoder/plugins/DsdiffDecoderPlugin.cxx | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ea8a34feb..200998de7 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.22.4 (not yet released) +* decoder + - dsdiff: apply padding to odd-sized chunks ver 0.22.3 (2020/11/06) * playlist diff --git a/src/decoder/plugins/DsdiffDecoderPlugin.cxx b/src/decoder/plugins/DsdiffDecoderPlugin.cxx index 1fb88da16..5b483514b 100644 --- a/src/decoder/plugins/DsdiffDecoderPlugin.cxx +++ b/src/decoder/plugins/DsdiffDecoderPlugin.cxx @@ -55,6 +55,17 @@ struct DsdiffChunkHeader { uint64_t GetSize() const { return size.Read(); } + + /** + * Applies padding to GetSize(), according to the DSDIFF + * specification + * (http://www.sonicstudio.com/pdf/dsd/DSDIFF_1.5_Spec.pdf) + * section 2.3. + */ + [[nodiscard]] constexpr + uint64_t GetPaddedSize() const noexcept { + return (GetSize() + 1) & ~uint64_t(1); + } }; /** struct for DSDIFF native Artist and Title tags */ @@ -117,7 +128,7 @@ dsdiff_read_prop_snd(DecoderClient *client, InputStream &is, return false; offset_type chunk_end_offset = is.GetOffset() - + header.GetSize(); + + header.GetPaddedSize(); if (chunk_end_offset > end_offset) return false; From 51ca775a1c3fe749b82e33fd1ae2d34be1ee5106 Mon Sep 17 00:00:00 2001 From: kaliko <kaliko@azylum.org> Date: Sat, 7 Nov 2020 11:20:04 +0100 Subject: [PATCH 4/9] doc/mpdconf.example: Strip trailing space, fixed typo. --- doc/mpdconf.example | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/mpdconf.example b/doc/mpdconf.example index ec1f9ffaa..6de10e419 100644 --- a/doc/mpdconf.example +++ b/doc/mpdconf.example @@ -5,7 +5,7 @@ # Files and directories ####################################################### # # This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This +# available audio files and add them to the daemon's online database. This # setting defaults to the XDG directory, otherwise the music directory will be # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. @@ -13,20 +13,20 @@ #music_directory "~/music" # # This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use +# directory is storage for playlists created by MPD. The server will use # playlist files not created by the server but only if they are in the MPD # format. This setting defaults to playlist saving being disabled. # #playlist_directory "~/.mpd/playlists" # # This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the +# load the database at server start up and store the database while the # server is not up. This setting defaults to disabled which will allow # MPD to accept files over ipc socket (using file:// protocol) or streaming # files over an accepted protocol. # #db_file "~/.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_level # settings. @@ -44,7 +44,7 @@ # # This setting sets the location of the file which contains information about # most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server +# it was brought down. This setting is disabled by default and the server # state will be reset on server start up. # #state_file "~/.mpd/state" @@ -74,7 +74,7 @@ #group "nogroup" # # This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other then the default, any. +# should be paid if this is assigned to anything other than the default, any. # This setting can deny access to control of the daemon. Not effective if # systemd socket activiation is in use. # @@ -113,7 +113,7 @@ # the other supported tags: #metadata_to_use "+comment" # -# This setting enables automatic update of MPD's database when files in +# This setting enables automatic update of MPD's database when files in # music_directory are changed. # #auto_update "yes" @@ -128,7 +128,7 @@ # Symbolic link behavior ###################################################### # -# If this setting is set to "yes", MPD will discover audio files by following +# If this setting is set to "yes", MPD will discover audio files by following # symbolic links outside of the configured music_directory. # #follow_outside_symlinks "yes" @@ -163,7 +163,7 @@ # #password "password@read,add,control,admin" # -# This setting specifies the permissions a user has who has not yet logged in. +# This setting specifies the permissions a user has who has not yet logged in. # #default_permissions "read,add,control,admin" # @@ -194,8 +194,8 @@ input { # Audio Output ################################################################ # -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings +# MPD supports various audio output types, as well as playing through multiple +# audio outputs at the same time, through multiple audio_output settings # blocks. Setting this block is optional, though the server will only attempt # autodetection for one sound card. # @@ -386,7 +386,7 @@ input { #replaygain_limit "yes" # # This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has +# result in the volume of all playing audio to be adjusted so the output has # equal "loudness". This setting is disabled by default. # #volume_normalization "no" @@ -395,7 +395,7 @@ input { # Character Encoding ########################################################## # -# If file or directory names do not display correctly for your locale then you +# If file or directory names do not display correctly for your locale then you # may need to modify this setting. # #filesystem_charset "UTF-8" From 6b50b673395fe2a286c17eaf12fa40de07fc511e Mon Sep 17 00:00:00 2001 From: kaliko <kaliko@azylum.org> Date: Sat, 7 Nov 2020 16:17:54 +0100 Subject: [PATCH 5/9] doc/mpdconf.example: add available log levels --- doc/mpdconf.example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/mpdconf.example b/doc/mpdconf.example index 6de10e419..b636b4ce1 100644 --- a/doc/mpdconf.example +++ b/doc/mpdconf.example @@ -90,7 +90,8 @@ #port "6600" # # Suppress all messages below the given threshold. Use "verbose" for -# troubleshooting. +# troubleshooting. Available setting arguments are "notice", "info", "verbose", +# "warning" and "error". # #log_level "notice" # From 27b69330f4641d692eff8320b6dfd440ad8aaca8 Mon Sep 17 00:00:00 2001 From: kaliko <kaliko@azylum.org> Date: Sat, 7 Nov 2020 16:18:46 +0100 Subject: [PATCH 6/9] doc/mpdconf.example: add database exemples --- doc/mpdconf.example | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/mpdconf.example b/doc/mpdconf.example index b636b4ce1..a097fc652 100644 --- a/doc/mpdconf.example +++ b/doc/mpdconf.example @@ -173,7 +173,18 @@ # Database ####################################################################### # - +# An example of a database section instead of the old 'db_file' setting. +# It enables mounting other storages into the music directory. +# +#database { +# plugin "simple" +# path "~/.local/share/mpd/db +# cache_directory "~/.local/share/mpd/cache" +#} +# +# An example of database config for a sattelite setup +# +#music_directory "nfs://fileserver.local/srv/mp3" #database { # plugin "proxy" # host "other.mpd.host" @@ -182,7 +193,6 @@ # Input ####################################################################### # - input { plugin "curl" # proxy "proxy.isp.com:8080" From 3e79e62c17bd3b7b1445b3b5753e2d708735c02e Mon Sep 17 00:00:00 2001 From: kaliko <kaliko@azylum.org> Date: Sat, 7 Nov 2020 16:50:16 +0100 Subject: [PATCH 7/9] doc/mpd.conf.5.rst: Update mpd.conf manual Update description with content from user manual [0]. Remove obsolete information regarding "required parameters" and log_level [0] https://www.musicpd.org/doc/html/user.html#the-configuration-file --- doc/mpd.conf.5.rst | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/doc/mpd.conf.5.rst b/doc/mpd.conf.5.rst index 03ab90d4e..6b364c513 100644 --- a/doc/mpd.conf.5.rst +++ b/doc/mpd.conf.5.rst @@ -11,24 +11,34 @@ not specified on the command line, MPD first searches for it at :file:`$XDG_CONFIG_HOME/mpd/mpd.conf` then at :file:`~/.mpdconf` then at :file:`~/.mpd/mpd.conf` and then in :file:`/etc/mpd.conf`. -Lines beginning with a :samp:`#` character are comments. All other -non-empty lines specify parameters and their values. These lines -contain the parameter name and parameter value (surrounded by double -quotes) separated by whitespace (either tabs or spaces). For -example:: +Each line in the configuration file contains a setting name and its value, e.g.: - parameter "value" +:code:`connection_timeout "5"` -The exception to this rule is the audio_output parameter, which is of -the form:: +For settings which specify a filesystem path, the tilde is expanded: + +:code:`music_directory "~/Music"` + +Some of the settings are grouped in blocks with curly braces, e.g. per-plugin settings: + +.. code-block:: none audio_output { - parameter1 "value" - parameter2 "value" + type "alsa" + name "My ALSA output" + device "iec958:CARD=Intel,DEV=0" + mixer_control "PCM" } +The :code:`include` directive can be used to include settings from +another file; the given file name is relative to the current file: -Parameters that take a file or directory as an argument should use absolute paths. +:code:`include "other.conf"` + +You can use include_optional instead if you want the included file to be +optional; the directive will be ignored if the file does not exist: + +:code:`include_optional "may_not_exist.conf"` See :file:`docs/mpdconf.example` in the source tarball for an example configuration file. @@ -38,7 +48,7 @@ Please read the MPD user manual for a complete configuration guide: http://www.musicpd.org/doc/user/ -REQUIRED PARAMETERS +OPTIONAL PARAMETERS ------------------- db_file <file> @@ -47,9 +57,6 @@ db_file <file> log_file <file> This specifies where the log file should be located. The special value "syslog" makes MPD use the local syslog daemon. -OPTIONAL PARAMETERS -------------------- - sticker_file <file> The location of the sticker database. This is a database which manages dynamic information attached to songs. @@ -83,7 +90,7 @@ user <username> port <port> This specifies the port that mpd listens on. The default is 6600. -log_level <default, secure, or verbose> +log_level <level> Suppress all messages below the given threshold. The following log levels are available: @@ -190,8 +197,8 @@ mixer_type <hardware, software or none> FILES ----- -:file:`~/.mpdconf` - User configuration file. +:file:`$XDG_CONFIG_HOME/mpd/mpd.conf` + User configuration file (usually :file:`~/.config/mpd/mpd.conf`). :file:`/etc/mpd.conf` Global configuration file. From 004d6a3b6605cbe0c555daad9690806f31d8caa9 Mon Sep 17 00:00:00 2001 From: kaliko <kaliko@azylum.org> Date: Sat, 7 Nov 2020 16:53:10 +0100 Subject: [PATCH 8/9] doc/mpd.1.rst: Update config file documentation. Have similar information about config file in both mpd.1 ans mpd.conf.5 --- doc/mpd.1.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/mpd.1.rst b/doc/mpd.1.rst index 7dbbb1344..5a1d47288 100644 --- a/doc/mpd.1.rst +++ b/doc/mpd.1.rst @@ -13,7 +13,7 @@ DESCRIPTION MPD is a daemon for playing music. Music is played through the configured audio output(s) (which are generally local, but can be remote). The daemon stores info about all available music, and this info can be easily searched and retrieved. Player control, info retrieval, and playlist management can all be managed remotely. MPD searches for a config file in ``$XDG_CONFIG_HOME/mpd/mpd.conf`` -then ``~/.mpdconf`` then ``/etc/mpd.conf`` or uses ``CONF_FILE``. +then ``~/.mpdconf`` then ``~/.mpd/mpd.conf`` then ``/etc/mpd.conf`` or uses ``CONF_FILE``. Read more about MPD at http://www.musicpd.org/ @@ -53,8 +53,8 @@ OPTIONS FILES ----- -:file:`~/.mpdconf` - User configuration file. +:file:`$XDG_CONFIG_HOME/mpd/mpd.conf` + User configuration file (usually :file:`~/.config/mpd/mpd.conf`). :file:`/etc/mpd.conf` Global configuration file. From 60d19b23803d33c99bed644976387b78c17a470a Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Wed, 11 Nov 2020 12:28:14 +0100 Subject: [PATCH 9/9] doc/plugins.rst: add missing list-table declaration --- doc/plugins.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/plugins.rst b/doc/plugins.rst index 96ce259b7..571654df6 100644 --- a/doc/plugins.rst +++ b/doc/plugins.rst @@ -763,6 +763,10 @@ Valid quality values for libsoxr: If the quality is set to custom also the following settings are available: +.. list-table:: + :widths: 20 80 + :header-rows: 1 + * - Name - Description * - **precision**