Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


What I2S DAC uses left justified format?
#1
Hi,

I want to play with a specific I2S DAC that uses left justified format in 32 bit frame and is not in the I2S DAC list.
What preconfigured DAC uses this format? I could reuse it to have the needed format output.

Where are the DAC format files at the moode file system? I'm pretty comfortable with linux and could make a copy for my own DAC and tweak it as needed.

Thanks,
xaled
Reply
#2
Which DAC are u using?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Left justified format is a trouble for PI's I2S bus.

https://www.raspberrypi.org/forums/viewt...9#p1389739

Two options then: to use Pi as master, which is terrible for sound quality, or to switch your DAC to I2S format.
Reply
#4
It is not actually a DAC, but a discrete logic format converter from left justified to TDA1541 simultaneous mode discussed at diyaudio. Input has to be left justified for this converter to work:

https://www.diyaudio.com/forums/digital-...45812.html

@mactolinux Thanks for the link! It gave me the hint about SND_SOC_DAIFMT_LEFT_J and it might be possible:

https://lb.raspberrypi.org/forums/viewto...8#p1301109
Reply
#5
Thank you xaled for the link, it is really interested to get into overlays and so on.

Not really get if it is possible to set Pi be slave... so that codec became master.
Reply
#6
@Tim Curtis - I got it almost working with the generic-lj device tree as desribed in the link.

I choose Generic 1 I2S(hifiberry-dac) in moode web interface and then added compiled generic-lj dtbo in to config.txt after hifiberry dtbo.

I aslo choose 32bit/* upsampling in mpd setting as I need this format but the logic analyzer shows that rpi put out 24 bits frame.

Could you take a look at the mpd settings, or recommend another dac that natively puts out 32bit frames?  

   
Reply
#7
What is output of the command below when sending 32/* ?

Code:
cat /proc/asound/card0/pcm0p/sub0/hw_params

The cmd shows what ALSA is sending to the device.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
pi@moode:~ $ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S24_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 4410
buffer_size: 22050
Reply
#9
Very odd.

The hifiberry-dac overlay specifies pcm5102a codec
https://github.com/raspberrypi/linux/blo...verlay.dts
https://github.com/raspberrypi/linux/blo...erry_dac.c

According to pcm5102a sources S32_LE is a supported format
https://github.com/raspberrypi/linux/blo...pcm5102a.c

But obviously ALSA believes that the device only supports up to S24_LE. i don't recall exactly how to get ALSA to probe the device and report its capabilities but possible running the cmd below will show something.

Code:
speaker-test -h

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
There is something wrong with the drivers. I set speakertest to 32 bits but see only 24 at the Logic analyzer:

pi@moode:~ $ speaker-test -c2 -F S32_LE

speaker-test 1.1.3

Playback device is default
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 65536
Period size range from 32 to 32768
Using max buffer size 65536
Periods = 4
was set period_size = 16384
was set buffer_size = 65536
0 - Front Left
1 - Front Right
Time per period = 4.102830
0 - Front Left
1 - Front Right
Reply


Forum Jump: