Is it possible to use an SBC as a standalone DAC?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I just found this today. Looks like the NanoPi H5 line of SBCs can output in 786Khz?! Support I2S 768kHz * blue777/NanoPi-NEO2-I2S_MCLK@6ca18e9 * GitHub

NanoPi-NEO2 の I2SでMCLK出力 & 384kHz, 768kHz, 1536kHz, 8kHz対応 - Qiita (you need to use google translate for this one if you don't speak Japanese :)

Might be worth it to give this one a shot. The Neo2 is $20 so it would be a cheap experiment.


I will also add that the reason I am asking this question is because the only source for these USB -> I2S cards seems to be diyinhk.com. Don't get me wrong, its reasonably priced, but there has to be another way...

I own both an Orange Pi PC and a NanoPi A25. They are in a drawer somewhere. Both have the codec that Sunxi incororated into the SOC - it's supposedly 24bit and at least up to 192k. The problem is that these very small SBCs use the board's ground as the analog reference for the audio output. It's pretty noisy, and kind of takes away from the high sample rates and 24 bits and it not useful for anything but headphones.

I have attached a 1kHz spectrum for the A64 based NanoPi SBC from FriendlyElec. This was taken with the SBCs output at mac. S/N is worse than 70dB!
 

Attachments

  • NanoPi A64 1kHz spectrum and THD-N.PNG
    NanoPi A64 1kHz spectrum and THD-N.PNG
    84.2 KB · Views: 153
Last edited:
There are countless ways for the sound output. But the input path - the audio gadget driver - is the missing part. Part of the code was provided by samsung, probably planned for their android phones - that would explain the fixed samplerates for capture and playback. But the question is - can you finish the driver? Or are you willing to hire someone? E.g. through the alsa-devel mailing list subscribed by SoC specialists.

You bring up a good point. The output is only half the battle, the usb gadget needs to function also. What are you referring to with the samsung thing?
 
Why do I think it was replaced? Because I read the commit where it was added (Which is entitled: "usb: gadget: f_uac2: convert to new function interface with backward compatibility"): usb: gadget: f_uac2: convert to new function interface with backward … * torvalds/linux@f8f93d2 * GitHub

From the commit:

Converting uac2 to the new function interface requires converting
the USB uac2's function code and its users.

This patch converts the f_uac2.c to the new function interface.

The file is now compiled into a separate usb_f_uac2.ko module.

The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Notice is the search results you posted for u_uac2.h that the 3 results are:
1. The actual file
2. A driver in the legacy directory
3. The actual function (f_uac2.c) where u_audio.h is also included
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.