Re: [Musicpd-dev-team] DSD over USB
Max, Sorry I've been on a holiday and totally missed out on anything digital. Although I didn't finish my implementation, I see you picked up the DSD development yourself which I'm happy about. You probably don't care, and probably too late.. but I do not agree with the addition of the added DSD sample type. I've attached my patch to give you an idea where I was heading to with the added FRAME_TYPE which in my opinion is the cleanest. Cheers mpd_dsd.patch Description: Binary data -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB - possible clue
On Wed, 2012-03-28 at 17:13 +0200, Jurgen Kramer wrote: My guess this is either a timing issue (hopefully not) or somehow/somewhere the DAC gets non-DSD-over-USB frames every few frames. Max, I've added tons of debug prints to the code trying to find the cause of the problem (DAC rapid switching between DSD and normal mode, no sound). So far nothing solid. But I've noticed that when playing DSD files in fallback mode (24-32bit conversion) every second takes about 4 seconds (i.e. the second counter in GMPC shows each second for four seconds) I think that is a clue what the problem might be. More investigating tomorrow. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Tue, 2012-03-27 at 21:52 +0200, Max Kellermann wrote: On 2012/03/27 19:44, Jurgen Kramer gtmkra...@xs4all.nl wrote: Hmm something odd is going on when using the new code. My dac switches rapidly between DSD and 176.4 mode not producing any sound. I don't see rapid switches in that log. Please explain. Unfortunately the problem is not visible in the logs. I did some more testing yesterday adding debug messages in pcm_export.c. It seems the shift works as designed but somehow the DAC goes in- and out of DSD mode, switching rapidly. My guess this is either a timing issue (hopefully not) or somehow/somewhere the DAC gets non-DSD-over-USB frames every few frames. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On 2012/03/26 19:37, Jurgen Kramer gtmkra...@xs4all.nl wrote: In code it looks like this :-) The lower 8-bits are not used so basically it's still a 24-bit sample (that sort of details you would want to find in a standard). I've added a fallback, the ALSA output will now attempt to use S32 playback, and left-shift all 24-bit samples by 8 bit in that case. It's still the old standard. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Tue, 2012-03-27 at 08:19 +0200, Max Kellermann wrote: I've added a fallback, the ALSA output will now attempt to use S32 playback, and left-shift all 24-bit samples by 8 bit in that case. It's still the old standard. Hmm something odd is going on when using the new code. My dac switches rapidly between DSD and 176.4 mode not producing any sound. The log shows: Mar 27 19:38 : decoder: audio_format=352800:dsd:2, seekable=false Mar 27 19:38 : alsa: opened hw:1,0 type=HW Mar 27 19:38 : alsa: format=S32_LE (Signed 32 bit Little Endian) Mar 27 19:38 : alsa: buffer: size=896..2097152 time=5079..11888617 Mar 27 19:38 : alsa: period: size=896..2097152 time=5079..11888617 Mar 27 19:38 : alsa: default period_time = buffer_time/4 = 499954/4 = 124988 Mar 27 19:38 : alsa: buffer_size=88192 period_size=22048 Mar 27 19:38 : output: opened plugin=alsa name=DAC audio_format=352800:dsd:2 When using my SOtM USB-to-SPDIF converter I can also no longer use device iec958:CARD=S20,DEV=0, I get output: sotm [alsa] failed to play: Bad address I have to use device hw;2,0 but that also result in rapid switching between DSD and none DSD mode. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On 2012/03/27 19:44, Jurgen Kramer gtmkra...@xs4all.nl wrote: Hmm something odd is going on when using the new code. My dac switches rapidly between DSD and 176.4 mode not producing any sound. I don't see rapid switches in that log. Please explain. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On 2012/03/22 17:23, Jurgen Kramer gtmkra...@xs4all.nl wrote: I took a quick look at the code, it seems it supports the pre-1.0 version of the standard (0xAA markers). I'll give it a test tomorow. My DAC supports both version 1.0 and pre-1.0. It implements the newest spec I found, dated September 2011, announced on the dCS web site in October 2011. Where can I find a more recent specification? Max -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On 2012/03/26 19:28, Jurgen Kramer gtmkra...@xs4all.nl wrote: The closest I got is link which a sent to the list a while ago: http://www.audiostream.com/content/usb-link-dsd-audio-pcm-frames-andres-koch It isn't as clear as a 'real' standard but it contains the needed info. Hm, this doesn't state that this document is the successor of the one published by dCS. Not even the revision history mentions it. BTW Max, it seems that the current 24-bit format for DSD-over-USB causes problems with modern audio I/F (e.g USB 2.0 devices using UAC 2.0 and some other FW devices) only supporting 32-bit samples (and sometimes 16-bit as well). So we could either switch to 32-bit sample format for DSD-over-USB or let MPD convert on the fly. Personally I vote for the 32-bit sample format as most, if not all, devices supporting DSD-over-USB will accept that format. How does packing DSD-over-USB into 32 bit samples work? -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Mon, 2012-03-26 at 19:36 +0200, Max Kellermann wrote: On 2012/03/26 19:28, Jurgen Kramer gtmkra...@xs4all.nl wrote: The closest I got is link which a sent to the list a while ago: http://www.audiostream.com/content/usb-link-dsd-audio-pcm-frames-andres-koch It isn't as clear as a 'real' standard but it contains the needed info. Hm, this doesn't state that this document is the successor of the one published by dCS. Not even the revision history mentions it. OK, I'll ask around to see if there is something more resembling a standard. BTW Max, it seems that the current 24-bit format for DSD-over-USB causes problems with modern audio I/F (e.g USB 2.0 devices using UAC 2.0 and some other FW devices) only supporting 32-bit samples (and sometimes 16-bit as well). So we could either switch to 32-bit sample format for DSD-over-USB or let MPD convert on the fly. Personally I vote for the 32-bit sample format as most, if not all, devices supporting DSD-over-USB will accept that format. How does packing DSD-over-USB into 32 bit samples work? In code it looks like this :-) The lower 8-bits are not used so basically it's still a 24-bit sample (that sort of details you would want to find in a standard). G_GNUC_CONST static inline uint32_t pcm_two_dsd_to_usb_32b(uint8_t a, uint8_t b) { return 0xaa00 | (a 16) | ( a 8 ); } /* JK: DSD-over-USB v1 */ G_GNUC_CONST static inline uint32_t pcm_two_dsd_to_usb_marker1_32b(uint8_t a, uint8_t b) { return 0x0500 | (a 16) | (b 8); } G_GNUC_CONST static inline uint32_t pcm_two_dsd_to_usb_marker2_32b(uint8_t a, uint8_t b) { return 0xfa00 | (a 16) | (b 8); } Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On 2012/03/26 19:37, Jurgen Kramer gtmkra...@xs4all.nl wrote: In code it looks like this :-) The lower 8-bits are not used so basically it's still a 24-bit sample (that sort of details you would want to find in a standard). So I can just left-shift the 24 bit sample by 8 bit? Neither document says anything about this, so I assumed it was not a legal transformation. (I have no DSD hardware) -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Mon, 2012-03-26 at 19:43 +0200, Max Kellermann wrote: On 2012/03/26 19:37, Jurgen Kramer gtmkra...@xs4all.nl wrote: In code it looks like this :-) The lower 8-bits are not used so basically it's still a 24-bit sample (that sort of details you would want to find in a standard). So I can just left-shift the 24 bit sample by 8 bit? Neither document says anything about this, so I assumed it was not a legal transformation. (I have no DSD hardware) I can not vouch for that, I am neither the standard developer nor intimate with the UAC 2.0 spec this standard was originally meant for. All people who tested this are on Linux (AFAIK). My guess is, it will work on all little endian systems. Viewing a binary dump, data comes out as 0x00 L2 L1 MARKER etc. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Fri, 2012-03-23 at 14:24 +0200, adel...@freemail.gr wrote: I had to use plughw to get past that error. plughw only works if I use my SOtM USB-to-SPDIF converter. It does not work when I use the firewire interface. So using current mpg git DSD-over-usb output to my Mytek DAC works when using SPDIF from the SOtM. Hopefully using the firewire snd driver will be fixable. Mar 24 17:00 : decoder: audio_format=352800:dsd:2, seekable=false Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
Thanks for that tip! I have it working now with plughw as well... Best Jesus R On Fri, Mar 23, 2012 at 8:24 AM, adel...@freemail.gr adel...@freemail.grwrote: I had to use plughw to get past that error. On 23/3/2012 1:40 μμ, Jurgen Kramer wrote: On Thu, 2012-03-22 at 17:23 +0100, Jurgen Kramer wrote: I took a quick look at the code, it seems it supports the pre-1.0 version of the standard (0xAA markers). I'll give it a test tomorow. My DAC supports both version 1.0 and pre-1.0. Jurgen OK I just test the new code, unfortunately it does not work for me either. It fails to setup ALSA. I tried both through the firewire driver and through a SOtM usb-to-spdif converter. Mytek DAC through firewire snd driver: Mar 23 12:28 : output: Failed to open DAC [alsa]: Failed to configure DSD-over-USB on ALSA device hw:1,0 Through SOtM usb-to-spdif converter: Mar 23 12:32 : output: Failed to open sotm [alsa]: Failed to configure DSD-over-USB on ALSA device iec958:CARD=S20,DEV=0 @Max can you shed some light on this? Are there any configuration options I need to try/add? My mpd.conf enty for the SOtM is: # Entry for SOtM dX-USB HD - USB to SPDIF/Toslink/AES-EBU audio_output { typealsa namesotm device iec958:CARD=S20,DEV=0 use_mmapno mixer_type disabled dsd_usb yes } I have also tried with use_mmap yes. With my old code is opens the ALSA device with: Mar 23 12:38 : output: opened plugin=alsa name=sotm audio_format=176400:32:2 Mar 23 12:40 : output: opened plugin=alsa name=DAC audio_format=176400:32:2 These work for my installation. BTW would it be doable to enable dsd_usb for pipe output? That is really handy for debugging output of the decoder. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Sat, 2012-03-24 at 13:16 -0400, Jesus R wrote: Thanks for that tip! I have it working now with plughw as well... I just did a quick addition (proof-of-concept) to pcm_dsd_usb.c to let it support version 1 of the dsd-over-usb spec (0x05 and 0xFA markers) and it works :-). This means support for v1 will be a fairly easy addition. We only need a way to select between v1 en pre-v1. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On 24/3/2012 7:49 μμ, Jurgen Kramer wrote: On Sat, 2012-03-24 at 13:16 -0400, Jesus R wrote: Thanks for that tip! I have it working now with plughw as well... I just did a quick addition (proof-of-concept) to pcm_dsd_usb.c to let it support version 1 of the dsd-over-usb spec (0x05 and 0xFA markers) and it works :-). This means support for v1 will be a fairly easy addition. We only need a way to select between v1 en pre-v1. Jurgen As v1.0 supersedes previous versions, I fail to see a reason to support the old spec. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Thu, 2012-03-22 at 17:23 +0100, Jurgen Kramer wrote: I took a quick look at the code, it seems it supports the pre-1.0 version of the standard (0xAA markers). I'll give it a test tomorow. My DAC supports both version 1.0 and pre-1.0. Jurgen OK I just test the new code, unfortunately it does not work for me either. It fails to setup ALSA. I tried both through the firewire driver and through a SOtM usb-to-spdif converter. Mytek DAC through firewire snd driver: Mar 23 12:28 : output: Failed to open DAC [alsa]: Failed to configure DSD-over-USB on ALSA device hw:1,0 Through SOtM usb-to-spdif converter: Mar 23 12:32 : output: Failed to open sotm [alsa]: Failed to configure DSD-over-USB on ALSA device iec958:CARD=S20,DEV=0 @Max can you shed some light on this? Are there any configuration options I need to try/add? My mpd.conf enty for the SOtM is: # Entry for SOtM dX-USB HD - USB to SPDIF/Toslink/AES-EBU audio_output { typealsa namesotm device iec958:CARD=S20,DEV=0 use_mmapno mixer_type disabled dsd_usb yes } I have also tried with use_mmap yes. With my old code is opens the ALSA device with: Mar 23 12:38 : output: opened plugin=alsa name=sotm audio_format=176400:32:2 Mar 23 12:40 : output: opened plugin=alsa name=DAC audio_format=176400:32:2 These work for my installation. BTW would it be doable to enable dsd_usb for pipe output? That is really handy for debugging output of the decoder. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
I had to use plughw to get past that error. On 23/3/2012 1:40 μμ, Jurgen Kramer wrote: On Thu, 2012-03-22 at 17:23 +0100, Jurgen Kramer wrote: I took a quick look at the code, it seems it supports the pre-1.0 version of the standard (0xAA markers). I'll give it a test tomorow. My DAC supports both version 1.0 and pre-1.0. Jurgen OK I just test the new code, unfortunately it does not work for me either. It fails to setup ALSA. I tried both through the firewire driver and through a SOtM usb-to-spdif converter. Mytek DAC through firewire snd driver: Mar 23 12:28 : output: Failed to open DAC [alsa]: Failed to configure DSD-over-USB on ALSA device hw:1,0 Through SOtM usb-to-spdif converter: Mar 23 12:32 : output: Failed to open sotm [alsa]: Failed to configure DSD-over-USB on ALSA device iec958:CARD=S20,DEV=0 @Max can you shed some light on this? Are there any configuration options I need to try/add? My mpd.conf enty for the SOtM is: # Entry for SOtM dX-USB HD - USB to SPDIF/Toslink/AES-EBU audio_output { typealsa namesotm device iec958:CARD=S20,DEV=0 use_mmapno mixer_type disabled dsd_usb yes } I have also tried with use_mmap yes. With my old code is opens the ALSA device with: Mar 23 12:38 : output: opened plugin=alsa name=sotm audio_format=176400:32:2 Mar 23 12:40 : output: opened plugin=alsa name=DAC audio_format=176400:32:2 These work for my installation. BTW would it be doable to enable dsd_usb for pipe output? That is really handy for debugging output of the decoder. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] DSD over USB
Hi , I've been testing the latest git with DSD over USB support this morning. I'm using an XMOS UAC2 board with modified firmware supporting v1.0 of the dCS suggested standard. https://www.xcore.com/projects/dsd-audio-over-usb OS is ARM linux. So far I haven't gotten it to work. I noticed that you make mention of: http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf Have you applied the marker bytes as described in the PDF or the updated marker bytes refered to in the latest v1.0 spec below? http://www.audiostream.com/content/usb-link-dsd-audio-pcm-frames-andres-koch Thanks -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
You can enable it by adding to the ALSA section in mpd.conf: dsd_usb yes Obviously, it is important to have bit-perfect 24 bit playback on the wire. A conversion will be destructive in any case. dmix must be disabled. It's experimental so we don't now if it works or needs works. Please provide any feedback! Best Jesus R www.sonore.us On Thu, Mar 22, 2012 at 8:23 AM, adel...@freemail.gr adel...@freemail.grwrote: Hi , I've been testing the latest git with DSD over USB support this morning. I'm using an XMOS UAC2 board with modified firmware supporting v1.0 of the dCS suggested standard. https://www.xcore.com/projects/dsd-audio-over-usb OS is ARM linux. So far I haven't gotten it to work. I noticed that you make mention of: http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf Have you applied the marker bytes as described in the PDF or the updated marker bytes refered to in the latest v1.0 spec below? http://www.audiostream.com/content/usb-link-dsd-audio-pcm-frames-andres-koch Thanks -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] DSD over USB
On Thu, 2012-03-22 at 14:23 +0200, adel...@freemail.gr wrote: Hi , I've been testing the latest git with DSD over USB support this morning. I'm using an XMOS UAC2 board with modified firmware supporting v1.0 of the dCS suggested standard. https://www.xcore.com/projects/dsd-audio-over-usb OS is ARM linux. So far I haven't gotten it to work. I noticed that you make mention of: http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf Have you applied the marker bytes as described in the PDF or the updated marker bytes refered to in the latest v1.0 spec below? I took a quick look at the code, it seems it supports the pre-1.0 version of the standard (0xAA markers). I'll give it a test tomorow. My DAC supports both version 1.0 and pre-1.0. Jurgen -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team