Re: [Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
On Mon, 2012-04-23 at 21:56 +0200, Max Kellermann wrote: On 2012/04/06 12:52, Jurgen Kramer gtmkra...@xs4all.nl wrote: The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). Maybe this is not the proper/complete solution but will at least allow users to test the current DSD-over-USB code and hopefully provides some clues for the actual fixes (if needed). Below some more background info. I have pushed a better solution for this problem to git master. I don't have DSD hardware yet, please verify if this works. Yep, works fine. Thanks! Jurgen -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
On 2012/04/06 12:52, Jurgen Kramer gtmkra...@xs4all.nl wrote: The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). Maybe this is not the proper/complete solution but will at least allow users to test the current DSD-over-USB code and hopefully provides some clues for the actual fixes (if needed). Below some more background info. I have pushed a better solution for this problem to git master. I don't have DSD hardware yet, please verify if this works. Max -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
On 23/4/2012 10:56 μμ, Max Kellermann wrote: On 2012/04/06 12:52, Jurgen Kramergtmkra...@xs4all.nl wrote: The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). Maybe this is not the proper/complete solution but will at least allow users to test the current DSD-over-USB code and hopefully provides some clues for the actual fixes (if needed). Below some more background info. I have pushed a better solution for this problem to git master. I don't have DSD hardware yet, please verify if this works. Max It works fine here. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
On 2012/04/06 12:52, Jurgen Kramer gtmkra...@xs4all.nl wrote: The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). No, 8 is the wrong value for in_frame_size. The problem is not a wrong value for in_frame_size, but that in_frame_size is used where this variable is not appropriate. Your patch trades one breakage for another. The right approach would be to realize that two different in_frame_size variables are needed: one for the buffer passed to play(), and another one for the pcm_export result. This checks shift8 twice: + if (ad-export.shift8) { + g_warning(Adjusting in_frame_size for DSD-over-USB output\n); + ad-in_frame_size = ad-export.shift8 ? 8 : ad-in_frame_size; Why this warning message? Does the user care? -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
On 6/4/2012 3:02 μμ, adel...@freemail.gr wrote: On 6/4/2012 1:52 μμ, Jurgen Kramer wrote: The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). Maybe this is not the proper/complete solution but will at least allow users to test the current DSD-over-USB code and hopefully provides some clues for the actual fixes (if needed). Below some more background info. --- src/output/alsa_output_plugin.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) Jurgen Background: For SAMPLE_FORMAT_DSD in- and out frame sizes are 2 (stereo files). When using DSD2PCM the sample format is set to SAMPLE_FORMAT_FLOAT which has a frame sizes of 8. For DSD-over-USB the sample format remains on SAMPLE_FORMAT_DSD with a frame size of 2 which results in too little data (4x) being sent to the receiving audio device. I just ran a quick test and DSD over USB playback is working fine with this patch on my XMOS board. Thanks. There seems to be an issue with 24bit wav files though. Lots of noise during playback. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). Maybe this is not the proper/complete solution but will at least allow users to test the current DSD-over-USB code and hopefully provides some clues for the actual fixes (if needed). Below some more background info. --- src/output/alsa_output_plugin.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) Jurgen Background: For SAMPLE_FORMAT_DSD in- and out frame sizes are 2 (stereo files). When using DSD2PCM the sample format is set to SAMPLE_FORMAT_FLOAT which has a frame sizes of 8. For DSD-over-USB the sample format remains on SAMPLE_FORMAT_DSD with a frame size of 2 which results in too little data (4x) being sent to the receiving audio device. diff --git a/src/output/alsa_output_plugin.c b/src/output/alsa_output_plugin.c index a6dc92f..2a82861 100644 --- a/src/output/alsa_output_plugin.c +++ b/src/output/alsa_output_plugin.c @@ -673,7 +673,12 @@ alsa_open(struct audio_output *ao, struct audio_format *audio_format, GError **e return false; } - ad-in_frame_size = audio_format_frame_size(audio_format); + if (ad-export.shift8) { + g_warning(Adjusting in_frame_size for DSD-over-USB output\n); + ad-in_frame_size = ad-export.shift8 ? 8 : ad-in_frame_size; + } else { + ad-in_frame_size = audio_format_frame_size(audio_format); + } ad-out_frame_size = ad-export.pack24 ? 3 : ad-in_frame_size; return true; -- 1.7.6.5 -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH/RFC] Fix DSD-over-USB playback
On 6/4/2012 1:52 μμ, Jurgen Kramer wrote: The attached patch fixes playback for DSD-over-USB. Without this patch MPD uses a frame size of 2 (stereo files) while the actual needed frame size for the used output sample format is 8 (sample formats S24_P32 and S32). Maybe this is not the proper/complete solution but will at least allow users to test the current DSD-over-USB code and hopefully provides some clues for the actual fixes (if needed). Below some more background info. --- src/output/alsa_output_plugin.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) Jurgen Background: For SAMPLE_FORMAT_DSD in- and out frame sizes are 2 (stereo files). When using DSD2PCM the sample format is set to SAMPLE_FORMAT_FLOAT which has a frame sizes of 8. For DSD-over-USB the sample format remains on SAMPLE_FORMAT_DSD with a frame size of 2 which results in too little data (4x) being sent to the receiving audio device. I just ran a quick test and DSD over USB playback is working fine with this patch on my XMOS board. Thanks. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team