Skip to content
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

Amanero card now supporting DSD native #12

Open
olm52 opened this issue Mar 3, 2016 · 567 comments
Open

Amanero card now supporting DSD native #12

olm52 opened this issue Mar 3, 2016 · 567 comments

Comments

@olm52
Copy link

olm52 commented Mar 3, 2016

ref.: http://www.amanero.com/drivers/nativeDSD.txt
It seems that with new firmware Amanero Card is supporting DSD native in linux. These are the data given by Amanero:

OEM Combo384 default VID=0x16d0 PID=0x71A

To enable/disable native DSD on Combo384 an USB Control request must be sent to endpoint 0. This procedure is supported on all firmware versions.
On firmware_1099rc1 an USB alternate settings "2" with a native DSD endpoint is supported.

The control request is of type Vendor to the Device.

bmRequestType=0x40,
bRequest=0xB1,
wLength=sizeof( struct VAD_DATA ),
Data is a variable of type struct VAD_DATA

struct VAD_DATA {

unsigned int command;
unsigned int length;
unsigned int buffer[64];

};

To enable native DSD
command=0x8000
length=0
buffer=undefined values

To disable native DSD
command=0x10000
length=0
buffer=undefined values

@lintweaker
Copy link
Owner

I have looked into this before. It seems the newer firmware version is not available through their website (yet).
The new firmware supporting an additional alt setting sounds promising.

@bibo01
Copy link

bibo01 commented Mar 3, 2016

Pardon me, I am just interested in this issue and try to understand. Is there a problem with Amanero's code? It applies to all firmwares. Would you like Amanero to make firmware 1099rc1 public? How relevant is that to you? If that is an issue, I can ask Amanero directly to make it public.

@lintweaker
Copy link
Owner

The method used in firmware 1099rc1 is preferable as it means only a very small patch to add support for it in Linux. So yes, public availability of the (final) version of that firmware would be great.

@bibo01
Copy link

bibo01 commented Mar 4, 2016

I spoke to "Amanero" and that firmware is already public by using the tool to update the firmware. However, he will make it visible on the web site too today.

@lintweaker
Copy link
Owner

Thanks, 1099rc1 is now available through oemtool117. I flashed my Amanero Combo384 with it. Alt setting 2 is available:
`Amanero Technologies Combo384 Amanero at usb-0000:00:14.0-14.1, high speed : USB
Audio

Playback:
Status: Stop
Interface 2
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 5 OUT (ASYNC)
Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us
Interface 2
Altset 2
Format: S32_LE
Channels: 2
Endpoint: 5 OUT (ASYNC)
Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us`

I can now create a patch for it. Can you test? I have nothing connected to my Combo384 atm.

@bibo01
Copy link

bibo01 commented Mar 4, 2016

Sure - either me or hifi25nl can test it

@lintweaker
Copy link
Owner

Patch is up (against current alsa-sound git). Uses default USB VID/PID. Firmware 1099rc1 required.

@olm52
Copy link
Author

olm52 commented Mar 4, 2016

When I have time I will test (maybe tomorrow)

@norrest
Copy link

norrest commented Mar 5, 2016

Are need add at quirks.c and rebuilt kernel?

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

I have made a new realtime kernel with this patch for Archlinux (and audiolinux) here:
http://www.tophifi.it/ftp/packages/Amanero/

@norrest
Copy link

norrest commented Mar 5, 2016

command lsusb show 0x16d0, 0x071a ?

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

My audio status script is showing this:
card1 USB Audio card usb3 --> 16d0:071a Amanero Technologies Combo384

@norrest
Copy link

norrest commented Mar 5, 2016

its ok!

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

I have made a first test. I am sure that now I have the new firmware, since HQplayer is showing SMD option when not set to DoP

  1. with old not patched kernel --> distorted sound (I can hear the song playing) on only one channel. the other is muted.
  2. with new patched kernel --> distorted sound with both channels
  3. with DoP option all is OK

P. S. I checked also with MPD, same result

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

Alsa is giving this playing a DSD64 file without upsampling

access: RW_INTERLEAVED
format: DSD_U32_BE
subformat: STD
channels: 2
rate: 88200 (88200/1)
period_size: 22050
buffer_size: 44100

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

Some more information from /proc/asound/card1

Amanero Technologies Combo384 Amanero at usb-0000:00:1d.0-1.4.2, high speed : USB Audio

Playback:
Status: Running
Interface = 2
Altset = 2
Packet Size = 118
Momentary freq = 88195 Hz (0xb.0640)
Feedback Format = 16.16
Interface 2
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 5 OUT (ASYNC)
Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us
Interface 2
Altset 2
Format: S32_LE DSD_U32_BE
Channels: 2
Endpoint: 5 OUT (ASYNC)
Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us

@lintweaker
Copy link
Owner

Thanks for the report. The issue could with the sample format (not clear which format is supported by the Amanero) or a firmware issue.
When you play native DSD does the distorted sound resemble the music you are playing or complete noise?
You could try to swap out the sample format from DSD_U32_BE to DSD_U32_LE and change the player settings accordingly.

@norrest
Copy link

norrest commented Mar 5, 2016

do you try dsd mode =0 and 2 ?
what version alsa-lib/tools

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

When you play native DSD does the distorted sound resemble the music you are playing or complete noise?
You could try to swap out the sample format from DSD_U32_BE to DSD_U32_LE and change the player settings accordingly.

Yes, there is sound but distorted (some high frequency added maybe)

In mpd-dsd I have changed to dsd_native_type "3" (with 0 only one channel distorted, with 2...2 channels distorted)
but how "swap out the sample format from DSD_U32_BE to DSD_U32_LE"?

Note: alsa-lib is version 1.1.0

@norrest
Copy link

norrest commented Mar 5, 2016

May be ?

  /* XMOS based USB DACs */
    switch (chip->usb_id) {
    case USB_ID(0x20b1, 0x3008): /* iFi Audio micro/nano iDSD */
    case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */
    case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */
        if (fp->altsetting == 2)
            return SNDRV_PCM_FMTBIT_DSD_U32_BE;
        break;
    case USB_ID(0x16d0, 0x071a): /* Amanero Combo384 */
    case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
    case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
    case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
    case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */
    case USB_ID(0x2616, 0x0106): /* PS Audio NuWave DAC */
            if (fp->altsetting == 3)
            return SNDRV_PCM_FMTBIT_DSD_U32_BE;
        break;
    default:
        break;
    }

@olm52
Copy link
Author

olm52 commented Mar 5, 2016

I have tried dsd_native_type "2", "0" and "3" in mpd-dsd. Only setting 2 give me sound on both channels.

About altsetting, I think it must be 2, as said by manufacturer "On firmware_1099rc1 an USB alternate settings "2" with a native DSD endpoint is supported."

Maybe this is right?

 /* XMOS based USB DACs */
switch (chip->usb_id) {
case USB_ID(0x20b1, 0x3008): /* iFi Audio micro/nano iDSD */
case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */
case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */
    if (fp->altsetting == 2)
        return SNDRV_PCM_FMTBIT_DSD_U32_BE;
    break;
case USB_ID(0x16d0, 0x071a): /* Amanero Combo384 */
    if (fp->altsetting == 2)
        return SNDRV_PCM_FMTBIT_DSD_U32_LE;
    break;
case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */
case USB_ID(0x2616, 0x0106): /* PS Audio NuWave DAC */
        if (fp->altsetting == 3)
        return SNDRV_PCM_FMTBIT_DSD_U32_BE;
    break;
default:
    break;
}

@bibo01
Copy link

bibo01 commented Mar 6, 2016

I have used the patch compiled by hifi25nl as reported above.

Like him, with new patched kernel I get distorted sound on both channels. (like a tinny distorted sound)

Furthermore, I noticed that my DAC recognizes the incoming DSD signal always at a higher frequency. That is, if I am outputting DSD64 (with no resampling), the DAC sees it as DSD128; if I am sending DSD128, the DAC sees it as DSD256: and so on.

@lintweaker
Copy link
Owner

Managed to get a test setup going, the sound is indeed recognizable but tinny. Switching between BE and LE sample formats does not seem to matter/improve things.
BTW word of warning: my version of MPD 0.19 lost its ability to use the 32-bit LE DSD sampleformat (compared to the MPD 0.18 version).

@bibo01
Copy link

bibo01 commented Mar 6, 2016

@ Lintweaker,

hifi25nl was telling me about a discrepancy between how DSD itself specifies samples in bit, while DOP and ALSA handle them as bytes. Hence, a factor of 8 or 16 has to be applied for the sample
rate configuration, according to the following table:

configured hardware
352.8kHz 705.6KHz 1411.2KHz <---- sample rate

8-bit 2.8MHz 5.6MHz 11.2MHz
16-bit 5.6MHz 11.2MHz

`-----------------------------------'
actual DSD sample rates

This would match my results of playback at a higher family - DSD128 instead of DSD64 and so on. Did you get similar results?
Above all, is it possible to adjust for it in the patch itself?

@lintweaker
Copy link
Owner

@bibo01 the player side has to set the correct sample rate. Nothing new here.
For 32-bit DSD samples (contains 4x 8-bit DSD sample) the rate should be 88.2k for DSD64. That is half the rate using DoP (176.4k). For 8-bit DSD samples its 352.8k.

So far 32-bit DSD samples @ 88.2k (DSD64) works for XMOS based and other DACs.

We probably should ask Amanero what sample size, byte order etc they use. Maybe the use a different order for left right samples.

@olm52
Copy link
Author

olm52 commented Mar 6, 2016

Amanero is modifying the firmware just now.

@lintweaker
Copy link
Owner

Okay, thanks. I was about to sent them an e-mail. I'll wait for the updated firmware.

@bibo01
Copy link

bibo01 commented Mar 7, 2016

Great! It should be ready by tomorrow.

@norrest
Copy link

norrest commented Mar 11, 2016

bibo01 wake up!!!!!!!!

@bibo01
Copy link

bibo01 commented Mar 11, 2016

I spoke to Amanero a couple of days ago and I was expecting his firmware anytime, but it seems that it is not the case yet. Hopefully soon...

@menibi
Copy link

menibi commented Aug 24, 2020

#12 (comment)
After few weeks of listening,
There are bombs every 30-40 seconds on DSD 128 and higher,
More higher more bombs
System:
Auralic Aries streamer first edition
LKS 004 dac with upgraded USB

Dear Dom
Hope you are working on solution
If not I go back to previous version
Please adv
Thx

@amanero
Copy link

amanero commented Aug 24, 2020

Hi menibi, thank you for your report! Do you have installed a driver(based on ASIO) for your streamer?

@menibi
Copy link

menibi commented Aug 24, 2020 via email

@seatrope
Copy link

Merry Christmas and happy holiday everyone!

I’ve been on 2006be10 for a very long time and things have been perfect on Linux with my Lampi Pacific DAC. Now I’m moving to a windows server (Taiko Extreme) and would love to know if there’s a preferred firmware and driver combo for best sound, and best compatibility with DSD512 native.
I don’t need compatibility with Linux any more.

@amanero do you have a recommendation? It is a customized version of Win10.

Thank you and happy new year all!

@seatrope
Copy link

@amanero I found a whole bunch of different drivers in https://amanero.com/drivers/

Does anyone know the difference between the combo384 w10 1067 drivers and the setupuac2.exe drivers?

Thanks!

@amanero
Copy link

amanero commented Dec 27, 2020

@amanero I found a whole bunch of different drivers in https://amanero.com/drivers/

Does anyone know the difference between the combo384 w10 1067 drivers and the setupuac2.exe drivers?

Thanks!

Hi seatrope, setupuac2.exe is the driver for firmware_2006be1x that implements native DSD endpoints in Linux and Windows.

Driver_1067 is for default firmware CPLD_1080_DSDSWAPPED DSD512x48x44 that supports native DSD in Windows only.

Thank you!

@agorlenko
Copy link

agorlenko commented Feb 11, 2021

Hi!
I have Ubuntu 20.10 and mpd 0.22.4 on my desktop. Amanero is inside my usb DAC (diy dac). Now dsd is playing only via dop.
Do I understand correctly that, if I need the native dsd, I should install one of this patches: https://github.com/lintweaker/xmos-native-dsd/blob/master/SRPMS/patches/kernel/0001-usb-Add-native-DSD-support-for-Amanero-Combo384-BE.patch or https://github.com/lintweaker/xmos-native-dsd/blob/master/SRPMS/patches/kernel/0001-usb-Add-native-DSD-support-for-Amanero-Combo384-LE.patch?

@agorlenko
Copy link

Hm.. I looked into the kernel code. It looks like Amanero's support is already there. If I understand correctly, the problem may be here: https://github.com/torvalds/linux/blob/master/sound/usb/quirks.c#L1736
Do you have any idea what might be going wrong here?

@olm52
Copy link
Author

olm52 commented Feb 11, 2021

With last kernels you don't need a patch but only update Amanero firmware

@agorlenko
Copy link

@hifi25nl Sorry for my naive question, but I am looking for instructions here: https://amanero.com/combo384_firmware.htm and I'm seeing instructions for windows only. Am I looking for instructions in the wrong place?

@olm52
Copy link
Author

olm52 commented Feb 11, 2021

Yes you can do it only in Windows.
Maybe in linux with wine, but I would not risk it.

@agorlenko
Copy link

Ok, I see. Thanks!

@Lodovico61
Copy link

@amanero ciao Dom
Mr. Kingwa of Audio-gd wrote me yesterday that you are perfectioning a new Linux firmware that solve POP problems. Can you please explain and share it? Thanks!

@amanero
Copy link

amanero commented Mar 20, 2021

Hi Lodovico61, i remarked he's not using the MUTE line when there is a sample rate or a mode change.
So i looked for another way to signal the DAC to mute the output. In Windows it seems ok, in Linux i m trying with different players before to release the code.

@Lodovico61
Copy link

@amanero Many thanks.
He was really positive about your job on fw, saying that pops with last version you gave him disappeared. Just a marginal issue (not mentioned what...) to be fixed. For your info, my streamer is an Auralic Aries G1, Linux based. Lots of people, here and in China, are waiting for the last effort! Thank you again. Lodovico

@menibi
Copy link

menibi commented Apr 25, 2021

Dear Dom
Just have been see you release 2006be15r2ekv I’m using 2006be15r2 should I upgrade to the ekv?
Thanks

@amanero
Copy link

amanero commented Apr 25, 2021

Hello, the 2006be15r2ekv adds volume control via I2C. On the ConfigTool.exe you can configure I2C actions for OnVolume Event to control the volume register of the dac. if your DAC supports multiple volume registers the i2c command can update at same time sequential registers. (be sure that VID_16d0&PID_0a23 is on the edit box on top of the ConfigTool.exe)
I2C Actions: On Volume Event
, ,

Thank you!
Dom

@menibi
Copy link

menibi commented May 23, 2021

Hello, the 2006be15r2ekv adds volume control via I2C. On the ConfigTool.exe you can configure I2C actions for OnVolume Event to control the volume register of the dac. if your DAC supports multiple volume registers the i2c command can update at same time sequential registers. (be sure that VID_16d0&PID_0a23 is on the edit box on top of the ConfigTool.exe)
I2C Actions: On Volume Event
, ,

Thank you!
Dom

Dear Dom
If I’m using 2006be15r2 should I set to VID_16d0&PID_0a23 too?

@amanero
Copy link

amanero commented May 24, 2021

@menibi Dear menibi, 2006be15r2ekv needs to replace 2006be15r2 if you want to control the DAC registers with I2C.
The ConfigTool.exe by default sets VID_16d0&PID_071a so you need to replace 071a with 0a23.

PID=0a23 is for both 2006be15r2 and 2006be15r2ekv.

an example for the OnVolume i2c sequence: 0x42,0x00,02

it changes the volume at i2c address 0x42 register 00 and register 01

,,

@menibi
Copy link

menibi commented May 25, 2021

@menibi Dear menibi, 2006be15r2ekv needs to replace 2006be15r2 if you want to control the DAC registers with I2C.
The ConfigTool.exe by default sets VID_16d0&PID_071a so you need to replace 071a with 0a23.

PID=0a23 is for both 2006be15r2 and 2006be15r2ekv.

an example for the OnVolume i2c sequence: 0x42,0x00,02

it changes the volume at i2c address 0x42 register 00 and register 01

,,

Please explain what events in 0a23 is good for, and if I don’t need it should I leave it as 071a?,
BR and thanks
Meni

@amanero
Copy link

amanero commented May 25, 2021

@menibi
You need to replace 071a with 0a23 in the edit box at the left top of the ConfigTool.exe window.

The firmware 2006be15r2evk supports native DSD on Linux and it's preprogrammed with PID 0a23
In case you leave 071a in left top edit box, the ConfigTool is not able to detect the board to write the i2c commands.

  • On the I2C actions panel select the event OnVolume and add the I2C commands to be executed.

  • When done press Write Flash and in case of success you will get the message "Flash Updated" in Red.

  • Moving the volume slide the I2C sequences will be on pins TWD.C (SDA, SCL)

@menibi
Copy link

menibi commented May 25, 2021

@menibi
You need to replace 071a with 0a23 in the edit box at the left top of the ConfigTool.exe window.

The firmware 2006be15r2evk supports native DSD on Linux and it's preprogrammed with PID 0a23
In case you leave 071a in left top edit box, the ConfigTool is not able to detect the board to write the i2c commands.

  • On the I2C actions panel select the event OnVolume and add the I2C commands to be executed.
  • When done press Write Flash and in case of success you will get the message "Flash Updated" in Red.
  • Moving the volume slide the I2C sequences will be on pins TWD.C (SDA, SCL)

You didn’t understand me
I will try to clarify I’m not using i2c only USB with 2006be15r2, so which one should I use071a or 0a23?

@amanero
Copy link

amanero commented May 25, 2021

0a23 is to be used for native DSD on Linux, 071a is for the firmware without native DSD on Linux

@vadimf
Copy link

vadimf commented Jun 14, 2021

Hi.
Walked through all steps here and on Amanero website and successfully updated the firmware (both CPLD_1082 and CPU).

Still can't play DSD files (even 64).

The source is Aurelic Aries streamer (running linux) and able to play DSD 512.

Before the upgrade playing DSD resulted in noise, currently there is silence.

I changed to 0a23 and installed 2006be15r2. The DAC is Lampizator Golden Gate without volume, so I don't need the volume control.

Can you please point me in the correct direction to have DSD support? Thanks a lot

@amanero
Copy link

amanero commented Jun 14, 2021

Hi Vadim, 2006be15r2 is ok for native DSD. May you verify with another player Linux based?
Thank you!
Michael

@menibi
Copy link

menibi commented Dec 18, 2021

Dear Dom,
I saw new release,
2006be15r2 8804 txrx,
What’s new in this,

@amanero
Copy link

amanero commented Dec 20, 2021

Dear Dom,
I saw new release,
2006be15r2 8804 txrx,
What’s new in this,

Dear menibe, 2006be15r2_8804_txrx supports the board with S/PDIF in/out based on WM8804
Dom

@payonq
Copy link

payonq commented Feb 25, 2023

Hi,
Where did everyone go from here?

@amanero
Copy link

amanero commented Feb 27, 2023

Hi payonq, if you need help please write an email to [email protected]

@payonq
Copy link

payonq commented Mar 26, 2023

Hi,
Thank You for information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests