Re: I2S: Anyone got it running? (answer is yes!)
Bugs are known and reported. Should be corrected someday.
Re: I2S: Anyone got it running? (answer is yes!)
I have finally managed to update the driver to 3.10 and to integrate a lot of style enhancements.
Furthermore, it is now possible to set up the bit clock ratio via machine driver.
https://github.com/koalo/linux/tree/rpi-3.10.y
What still does not work is 24 bit support - has anyone a 24 bit file that uses 4 bytes per sample for testing?
I have only 24 bit files with 3 bytes and aplay does not want to switch to 4 bytes per sample format.
The only board that is currently supported is the HifiBerry Mini:
http://www.crazy-audio.com/projects/hifiberry-mini/
The other boards (mbed, proto, tda1541a, cirrus board by Wojciech M. Zabolotn) should be easily supported by copying the old files from 3.8, but I currently have no chance to test them.
Furthermore, it is now possible to set up the bit clock ratio via machine driver.
https://github.com/koalo/linux/tree/rpi-3.10.y
What still does not work is 24 bit support - has anyone a 24 bit file that uses 4 bytes per sample for testing?
I have only 24 bit files with 3 bytes and aplay does not want to switch to 4 bytes per sample format.
The only board that is currently supported is the HifiBerry Mini:
http://www.crazy-audio.com/projects/hifiberry-mini/
The other boards (mbed, proto, tda1541a, cirrus board by Wojciech M. Zabolotn) should be easily supported by copying the old files from 3.8, but I currently have no chance to test them.
Re: I2S: Anyone got it running? (answer is yes!)
How to check bytes count per sample for file?
If mplayer says: AO: [alsa] 48000Hz 2ch s32le (4 bytes per sample), thats ok ?
If mplayer says: AO: [alsa] 48000Hz 2ch s32le (4 bytes per sample), thats ok ?
Re: I2S: Anyone got it running? (answer is yes!)
That should be fine.0xFF wrote:How to check bytes count per sample for file?
If mplayer says: AO: [alsa] 48000Hz 2ch s32le (4 bytes per sample), thats ok ?
Re: I2S: Anyone got it running? (answer is yes!)
Yay! Will test it this weekend.
Why 4 bytes and not SNDRV_PCM_FMTBIT_S24_3LE?
Why 4 bytes and not SNDRV_PCM_FMTBIT_S24_3LE?
Re: I2S: Anyone got it running? (answer is yes!)
Because packed transmission is apparently not supported by the DMA controller.vadim wrote:Yay! Will test it this weekend.
Why 4 bytes and not SNDRV_PCM_FMTBIT_S24_3LE?
Re: I2S: Anyone got it running? (answer is yes!)
I finally managed to implement 24 bit transfer even with S24_3LE files 
I don't need the test file anymore and will upload the required patch soon, but before I would like to know if anyone has tested the 3.10 branch so far or if there are stupid bugs induced by the update so that I can fix them at one go.
Greetings,
Florian

I don't need the test file anymore and will upload the required patch soon, but before I would like to know if anyone has tested the 3.10 branch so far or if there are stupid bugs induced by the update so that I can fix them at one go.
Greetings,
Florian
Re: I2S: Anyone got it running? (answer is yes!)
I believed in you!
Sorry, I haven't tested yet and will have to postpone testing to next week. I'm still struggling to see the point of forcing different frame lengths for different sampling rates. I don't think that there are many DAC/ADC that would accommodate that (NOS in slave mode, perhaps), so people will just override it more often then not. And if they don't they won't get working 8,16,32,48KHz. The driver still does some assumptions and calculations and only then checks if they were necessary.

Sorry, I haven't tested yet and will have to postpone testing to next week. I'm still struggling to see the point of forcing different frame lengths for different sampling rates. I don't think that there are many DAC/ADC that would accommodate that (NOS in slave mode, perhaps), so people will just override it more often then not. And if they don't they won't get working 8,16,32,48KHz. The driver still does some assumptions and calculations and only then checks if they were necessary.
Re: I2S: Anyone got it running? (answer is yes!)
Question, probably to florian:
I do have a Curryman miniDSP dac for i2s. Is this dac supported (or can be made supported
)? It uses the Sabre 9023 chip.
http://www.minidsp.com/products/minidsp ... an-i2s-dac
The dac was developed by Daniel, one of the best developers for digital stuff. Joachim Gerhard (Audio Physics) developed the output buffer. As this is a very good dac and inexpensive, it would be really nice if it would be supported by the i2s Raspberry driver.
Thanks!
I do have a Curryman miniDSP dac for i2s. Is this dac supported (or can be made supported

http://www.minidsp.com/products/minidsp ... an-i2s-dac
The dac was developed by Daniel, one of the best developers for digital stuff. Joachim Gerhard (Audio Physics) developed the output buffer. As this is a very good dac and inexpensive, it would be really nice if it would be supported by the i2s Raspberry driver.
Thanks!
Re: I2S: Anyone got it running? (answer is yes!)
Morpheus, you should understand that Florian doesn't write drivers for DACs he doesn't have. Simply because they can't be tested.
Having said that, most simple connections (not involving i2c or SPI) should work with a driver that already exists. A change of slave-master configuration and the set of allowed sample rates is all that should be done. In rare cases frame length setting might require some adjustment.
Having said that, most simple connections (not involving i2c or SPI) should work with a driver that already exists. A change of slave-master configuration and the set of allowed sample rates is all that should be done. In rare cases frame length setting might require some adjustment.
Re: I2S: Anyone got it running? (answer is yes!)
Florian, thank you for the upgrading the sources!
I managed to merge mbed audio board from 3.8 – here's the pull request https://github.com/koalo/linux/pull/27
Small hint for anyone who will be porting other drivers: in `snd_soc_dai_link` structure of the driver `platform_name` changed from "bcm2708-pcm-audio.0" to "bcm2708-i2s.0". As I'm not linux kernel dev it took me a while to find the problem
I managed to merge mbed audio board from 3.8 – here's the pull request https://github.com/koalo/linux/pull/27
Small hint for anyone who will be porting other drivers: in `snd_soc_dai_link` structure of the driver `platform_name` changed from "bcm2708-pcm-audio.0" to "bcm2708-i2s.0". As I'm not linux kernel dev it took me a while to find the problem

Re: I2S: Anyone got it running? (answer is yes!)
I've installed the I2S drivers using pasdesignal's blog instructions.
The driver seems to work quite well, but I have a side issue with my raspberry.
After installing the driver, I can no longer halt the system. With "sudo shutdown -h now", or "sudo halt", or "sudo init 0", the system reboots. It used shut down everything, then blink ACT led 10 times, then halt, and stay there. Now it just reboots after stopping all the services, no ACT blinking either.
First time when I've noticed this behaviour, I've tried an "rpi-update" and then the system would halt properly, but of course, the I2S drivers were lost in the process.
Then I've followed the instructions from the blog again (to the letter) and install I2S kernel again, and the reboot behaviour is back.
What information should I provide for a proper troubleshooting?
The driver seems to work quite well, but I have a side issue with my raspberry.
After installing the driver, I can no longer halt the system. With "sudo shutdown -h now", or "sudo halt", or "sudo init 0", the system reboots. It used shut down everything, then blink ACT led 10 times, then halt, and stay there. Now it just reboots after stopping all the services, no ACT blinking either.
First time when I've noticed this behaviour, I've tried an "rpi-update" and then the system would halt properly, but of course, the I2S drivers were lost in the process.
Then I've followed the instructions from the blog again (to the letter) and install I2S kernel again, and the reboot behaviour is back.
What information should I provide for a proper troubleshooting?
Re: I2S: Anyone got it running? (answer is yes!)
Thanks, but that doesn't help. It's about Gertduino there.
My issue is only related to the kernel, as far as I understand.
My issue is only related to the kernel, as far as I understand.
Re: I2S: Anyone got it running? (answer is yes!)
build kernel version 3.10. you might have some issues after upgrading Pi to 3.10 and then running experimental 3.8 kernel.
just use rpi-3.10.y-asoc branch in git
just use rpi-3.10.y-asoc branch in git
Re: I2S: Anyone got it running? (answer is yes!)
I will try that.
Koalo says "The other boards (mbed, proto, tda1541a, cirrus board by Wojciech M. Zabolotn) should be easily supported by copying the old files from 3.8, but I currently have no chance to test them."
I use tda1541 driver, so I hope I don't screw up by copying the wrong files, wish me luck!
Koalo says "The other boards (mbed, proto, tda1541a, cirrus board by Wojciech M. Zabolotn) should be easily supported by copying the old files from 3.8, but I currently have no chance to test them."
I use tda1541 driver, so I hope I don't screw up by copying the wrong files, wish me luck!
Re: I2S: Anyone got it running? (answer is yes!)
not really a copy-paste as the name of platform device was changed. you will need to change it in card dai definition in card driver. don't forget to add platform devices for card and codec in bcm2708.c (same as for hifiberry that is already defined there)
Re: I2S: Anyone got it running? (answer is yes!)
Rpi DAC works now without a kernel hack.
an updated Raspbian or new Volumio http://volumio.org/ can play audio now with Rpi DAC.
If you like high quality audio - here it is:
http://www.tjaekel.com/T-DAC/raspi.html
an updated Raspbian or new Volumio http://volumio.org/ can play audio now with Rpi DAC.
If you like high quality audio - here it is:
http://www.tjaekel.com/T-DAC/raspi.html
silopolis wrote:WOW :-Otjaekel wrote:Yes, I have created audiophile DAC PCB, with PCM1794, works nice on Raspberry Pi:
http://www.tjaekel.com/T-DAC
This is so nice, well done man !!!
My plan was to use TPA's DAC but this is an interesting alternative...
Keep it on, hope it will be available prebuilt sometime.
Bests
Re: I2S: Anyone got it running? (answer is yes!)
With the following settings in /etc/modules, I have the pcm1794a driver working:
Now, the interesting part is, the same TDA1387 DAC (16bit 44.1k) works with this driver.
Mplayer:
So, TDA1541 DACs should work too.
Thanks for the update, tjaekel, without your post I wouldn't have noticed the great news!
Code: Select all
snd-bcm2835
snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd-soc-pcm1794a
snd_soc_rpi_dac
Mplayer:
Code: Select all
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Thanks for the update, tjaekel, without your post I wouldn't have noticed the great news!
Re: I2S: Anyone got it running? (answer is yes!)
rpi-dac is a generic driver that will provide output with many non-configurable NOS DACs in slave mode. i think we also need a generic in/out driver and one for RPi as slave. that should cover about 80% of use cases.
Re: I2S: Anyone got it running? (answer is yes!)
Hi Koalo/all.
I previously had 3.8 working but the 3.10.y version (although it seems to compile correctly) plays what seems to be double speed sound using the WM8731 (proto board) driver. I have not undertaken much investigation but will report back with what I find. Just a heads up at the moment.
BBUK
I previously had 3.8 working but the 3.10.y version (although it seems to compile correctly) plays what seems to be double speed sound using the WM8731 (proto board) driver. I have not undertaken much investigation but will report back with what I find. Just a heads up at the moment.
BBUK
Re: I2S: Anyone got it running? (answer is yes!)
BBUK, I think you need to set bitclock (frame length) in the card driver. There's a new function in 3.10.
Re: I2S: Anyone got it running? (answer is yes!)
Bingo! Thanks vadim. AddingBBUK, I think you need to set bitclock (frame length) in the card driver. There's a new function in 3.10.
Code: Select all
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
int retcode = snd_soc_dai_set_bclk_ratio(cpu_dai,32*2);
if (retcode < 0){
dev_err(substream->pcm->dev, "Failed to set BCLK ratio \n");
return retcode;
}
So I can now confirm that the proto board driver is working in the new 3.10 asocdev kernel.
BBUK
Re: I2S: Anyone got it running? (answer is yes!)
Hi guys,
Would it be possible to connect the Pi to this Rohm digital amplifier via I2S ?
This IC has one input systems of digital audio interface. (No needs of Master Clock)
- I2S / LJ / RJ format
- LRCLK: 32k/44.1k/48KHz
- BCLK: 32fs / 48fs / 64fs
- SDATA: 16 / 20 / 24bit
Thanks in advance.
Cheers.
Would it be possible to connect the Pi to this Rohm digital amplifier via I2S ?
This IC has one input systems of digital audio interface. (No needs of Master Clock)
- I2S / LJ / RJ format
- LRCLK: 32k/44.1k/48KHz
- BCLK: 32fs / 48fs / 64fs
- SDATA: 16 / 20 / 24bit
Thanks in advance.
Cheers.
Re: I2S: Anyone got it running? (answer is yes!)
Should be possible, but you have to write a i2c driver for controlling the IC.