I've written up my success with getting a PCM1803A ADC to work on a B+.
http://www.peteronion.org.uk/I2S/
PeterO
I2S Success (at last) !
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: I2S Success (at last) !
I was now able to compile and load the Module my_loader.ko under linux 3.18.9-2
but it says bcm2708-i2s.0 not registered
Driver asoc-simple-card requests probe deferral .
What can I do ?
but it says bcm2708-i2s.0 not registered
Driver asoc-simple-card requests probe deferral .
What can I do ?
-
- Posts: 46
- Joined: Sun Apr 26, 2015 10:18 am
- Location: Melbourne, Australia
Re: I2S Success (at last) !
After a lot of effort, I'm at the same point:carla_sch wrote:I was now able to compile and load the Module my_loader.ko under linux 3.18.9-2
but it says bcm2708-i2s.0 not registered
Driver asoc-simple-card requests probe deferral .
What can I do ?
[ 128.353009] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI bcm2708-i2s.0 not registered
[ 128.353142] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
Re: I2S Success (at last) !
Here is a modified my_loader.c file that creates a sound device .
(arecord -l ) but I was
not able to record - maybe a hardware problem with the codec board.
Only some names were changed I found them in /sys/kernel/debug/asoc/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/platform_device.h>
#include <sound/simple_card.h>
void device_release_callback(struct device *dev) { /* do nothing */ };
static struct asoc_simple_card_info snd_rpi_simple_card_info = {
.card = "snd_rpi_simple_card", // -> snd_soc_card.name
.name = "simple-card_codec_link", // -> snd_soc_dai_link.name
.codec = "snd-soc-dummy", // "dmic-codec", // -> snd_soc_dai_link.codec_name
// .platform = "bcm2708-i2s.0", // -> snd_soc_dai_link.platform_name
.platform = "20203000.i2s",
.daifmt = 0,
.cpu_dai = {
// .name = "bcm2708-i2s.0", // -> snd_soc_dai_link.cpu_dai_name
.name = "20203000.i2s", // -> snd_soc_dai_link.cpu_dai_name
.fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|SND_SOC_DAIFMT_CBM_CFM,
.sysclk = 0 },
.codec_dai = {
.name = "snd-soc-dummy-dai", //"dmic-codec", // -> snd_soc_dai_link.codec_dai_name
.fmt = 0,
.sysclk = 0 },
};
static struct platform_device snd_rpi_simple_card_device = {
.name = "asoc-simple-card", //module alias
.id = 0,
.num_resources = 0,
.dev = { .release = &device_release_callback,
.platform_data = &snd_rpi_simple_card_info, // *HACK ALERT*
},
};
static struct platform_device snd_rpi_codec_device = {
.name = "snd-soc-dammy", // "dmic-codec", //module alias
.id = -1,
.num_resources = 0,
.dev = { .release = &device_release_callback,
},
};
int hello_init(void)
{
const char *dmaengine = "bcm2708-dmaengine"; //module name
int ret;
ret = request_module(dmaengine);
pr_alert("request module load '%s': %d\n",dmaengine, ret);
// ret = platform_device_register(&snd_rpi_codec_device);
// pr_alert("register platform device '%s': %d\n",snd_rpi_codec_device.name, ret);
ret = platform_device_register(&snd_rpi_simple_card_device);
pr_alert("register platform device '%s': %d\n",snd_rpi_simple_card_device.name, ret);
pr_alert("Hello World
\n");
return 0;
}
void hello_exit(void)
{// you'll have to sudo modprobe -r the card & codec drivers manually (first?)
platform_device_unregister(&snd_rpi_simple_card_device);
platform_device_unregister(&snd_rpi_codec_device);
pr_alert("Goodbye World!\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_DESCRIPTION("ASoC simple-card I2S setup");
MODULE_AUTHOR("Plugh Plover");
MODULE_LICENSE("GPL v2");
(arecord -l ) but I was
not able to record - maybe a hardware problem with the codec board.
Only some names were changed I found them in /sys/kernel/debug/asoc/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/platform_device.h>
#include <sound/simple_card.h>
void device_release_callback(struct device *dev) { /* do nothing */ };
static struct asoc_simple_card_info snd_rpi_simple_card_info = {
.card = "snd_rpi_simple_card", // -> snd_soc_card.name
.name = "simple-card_codec_link", // -> snd_soc_dai_link.name
.codec = "snd-soc-dummy", // "dmic-codec", // -> snd_soc_dai_link.codec_name
// .platform = "bcm2708-i2s.0", // -> snd_soc_dai_link.platform_name
.platform = "20203000.i2s",
.daifmt = 0,
.cpu_dai = {
// .name = "bcm2708-i2s.0", // -> snd_soc_dai_link.cpu_dai_name
.name = "20203000.i2s", // -> snd_soc_dai_link.cpu_dai_name
.fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|SND_SOC_DAIFMT_CBM_CFM,
.sysclk = 0 },
.codec_dai = {
.name = "snd-soc-dummy-dai", //"dmic-codec", // -> snd_soc_dai_link.codec_dai_name
.fmt = 0,
.sysclk = 0 },
};
static struct platform_device snd_rpi_simple_card_device = {
.name = "asoc-simple-card", //module alias
.id = 0,
.num_resources = 0,
.dev = { .release = &device_release_callback,
.platform_data = &snd_rpi_simple_card_info, // *HACK ALERT*
},
};
static struct platform_device snd_rpi_codec_device = {
.name = "snd-soc-dammy", // "dmic-codec", //module alias
.id = -1,
.num_resources = 0,
.dev = { .release = &device_release_callback,
},
};
int hello_init(void)
{
const char *dmaengine = "bcm2708-dmaengine"; //module name
int ret;
ret = request_module(dmaengine);
pr_alert("request module load '%s': %d\n",dmaengine, ret);
// ret = platform_device_register(&snd_rpi_codec_device);
// pr_alert("register platform device '%s': %d\n",snd_rpi_codec_device.name, ret);
ret = platform_device_register(&snd_rpi_simple_card_device);
pr_alert("register platform device '%s': %d\n",snd_rpi_simple_card_device.name, ret);
pr_alert("Hello World

return 0;
}
void hello_exit(void)
{// you'll have to sudo modprobe -r the card & codec drivers manually (first?)
platform_device_unregister(&snd_rpi_simple_card_device);
platform_device_unregister(&snd_rpi_codec_device);
pr_alert("Goodbye World!\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_DESCRIPTION("ASoC simple-card I2S setup");
MODULE_AUTHOR("Plugh Plover");
MODULE_LICENSE("GPL v2");
Re: I2S Success (at last) !
Recording works now - the powerdown pin of the pcm1803a
has to be high, although there is still noise and distortion,
maybe it needs a power supply separate from the raspberry.
The line
platform_device_unregister(&snd_rpi_codec_device);
has to be removed because it crashes when unloading the module.
It is not possible to unregister something that was not registered.
Note that I am using Arch-Linux and linux-headers for compiling
the kernel-module.
has to be high, although there is still noise and distortion,
maybe it needs a power supply separate from the raspberry.
The line
platform_device_unregister(&snd_rpi_codec_device);
has to be removed because it crashes when unloading the module.
It is not possible to unregister something that was not registered.
Note that I am using Arch-Linux and linux-headers for compiling
the kernel-module.
Re: I2S Success (at last) !
I'm also at the point getting:
[ 95.409720] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI bcm2708-i2s.0 not registered
[ 95.409845] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
I tried carla's code printed above, but although I don't get the not registered messages, it doesn't seem to work.
What it the step between my error and it working? Many people seem to have got it working, but I haven't found how they did yet, unless I am missing something!
[ 95.409720] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI bcm2708-i2s.0 not registered
[ 95.409845] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
I tried carla's code printed above, but although I don't get the not registered messages, it doesn't seem to work.
What it the step between my error and it working? Many people seem to have got it working, but I haven't found how they did yet, unless I am missing something!
Re: I2S Success (at last) !
bcm2708-i2s.0 does not work , registering the codec_device also does not work.
But using the obviously already registered
20203000.i2s and snd-soc-dummy-dai did work.
My code also expects that the PCM1803A is in master mode, I used it with 96000Hz
sample rate in i2s mode. Check if the PCM1803A is outputting some signal.
I read the Sparkfun PCM1803A Board is no longer available, so what
should we use instead ?
But using the obviously already registered
20203000.i2s and snd-soc-dummy-dai did work.
My code also expects that the PCM1803A is in master mode, I used it with 96000Hz
sample rate in i2s mode. Check if the PCM1803A is outputting some signal.
I read the Sparkfun PCM1803A Board is no longer available, so what
should we use instead ?
Re: I2S Success (at last) !
I've spun up the sparkfun pcm1803a on oshpark with a few improvements:carla_sch wrote:bcm2708-i2s.0 does not work , registering the codec_device also does not work.
But using the obviously already registered
20203000.i2s and snd-soc-dummy-dai did work.
My code also expects that the PCM1803A is in master mode, I used it with 96000Hz
sample rate in i2s mode. Check if the PCM1803A is outputting some signal.
I read the Sparkfun PCM1803A Board is no longer available, so what
should we use instead ?
- Removed the 3.3v regulator.
- Replaced all caps with 0603 ceramic. May be some additional noise, but it's what i have in my parts bin.
- Star topography for system ground, analog ground and digital ground. Much better noise suppression. The sparkfun layout induced digital ground currents within the analog domain. There's a ground pin at the bottom of the pcb. Use that to connect to the PI header.
- Exposed pad AGND so analog powerline noise measurements can be performed.
- Slightly smaller footprint to make it fit better on protoboard/breadboard.
To order: https://oshpark.com/shared_projects/HOqnPukE (3pcs, ~$5 shipped)
The crystal is the same used by sparkfun, but sourced on digikey: 631-1186-1-ND ... mpn : FXO-HC736R-24.576
I'll be following in everyone's footsteps here shortly to implement this on the rpi (currently finishing another project). If anyone would like assembled boards for the purpose of getting this to work with the pi, I may be able to assist. Eagle SCH/BRD files available per request. Just PM me.
Re: I2S Success (at last) !
Hi Carly_sch,
thanks for your reply. I have tried your code and the driver registers, and I can see a recording device.
However, when I try to record, I see no BCLK or LRCLK. After a few seconds I get an error:
arecord: pcm_read:1801: read error: Input/output error
When I do a dmesg after a few attempts, I see:
[ 517.169878] request module load 'bcm2708-dmaengine': 0
[ 517.182694] register platform device 'asoc-simple-card': 0
[ 517.189882] Hello World
[ 517.232018] asoc-simple-card asoc-simple-card.0: snd-soc-dummy-dai <-> 20203000.i2s mapping ok
[ 661.117490] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[ 671.123889] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[ 767.279680] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[ 777.284463] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10040.560910] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10050.565581] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10374.363007] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10384.368636] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10464.713298] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10474.719540] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10694.703794] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10704.711660] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
thanks for your reply. I have tried your code and the driver registers, and I can see a recording device.
However, when I try to record, I see no BCLK or LRCLK. After a few seconds I get an error:
arecord: pcm_read:1801: read error: Input/output error
When I do a dmesg after a few attempts, I see:
[ 517.169878] request module load 'bcm2708-dmaengine': 0
[ 517.182694] register platform device 'asoc-simple-card': 0
[ 517.189882] Hello World

[ 517.232018] asoc-simple-card asoc-simple-card.0: snd-soc-dummy-dai <-> 20203000.i2s mapping ok
[ 661.117490] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[ 671.123889] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[ 767.279680] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[ 777.284463] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10040.560910] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10050.565581] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10374.363007] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10384.368636] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10464.713298] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10474.719540] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
[10694.703794] bcm2708-i2s 20203000.i2s: I2S SYNC error!
[10704.711660] bcm2708-dmaengine bcm2708-dmaengine: DMA transfer could not be terminated
Re: I2S Success (at last) !
BTW, I have a Knowles I2S microphone. This can't be the problem as I get this whether it is connected or not.
As the driver is for master mode, I should see clocks whatever.
As the driver is for master mode, I should see clocks whatever.
Re: I2S Success (at last) !
Just to be clear, I am looking for BCLK and LRCLK with a scope on pins 12 and 35 respectively and see nothing. I have the latest RPi 2.
I am not expecting that anything needs to be plugged into the Pi to see these clocks.
The Knowles I2S microphone obviously requires these clocks to do anything, so until I see them I don't see any reason to try connecting it.
Any help would be gratefully received!
I am not expecting that anything needs to be plugged into the Pi to see these clocks.
The Knowles I2S microphone obviously requires these clocks to do anything, so until I see them I don't see any reason to try connecting it.
Any help would be gratefully received!
Re: I2S Success (at last) !
The driver is for master mode of the pcm1803a board, so the
this board has to supply the clocks not the raspberry pi.
"Master" refers to the i2s board not the raspberry pi.
To use the pcm1803a board as slave is not a good idea because
the clocks supplied by the computer have to be synchronized to
the system clock of the i2s board and that is not possible here,
so there will be loss of data repeatedly.
But you can change the mode of the driver to slave if your i2s device
only supports slave mode and wants clock signals from the raspberry pi.
Change SND_SOC_DAIFMT_CBM_CFM to SND_SOC_DAIFMT_CBS_CFS
this board has to supply the clocks not the raspberry pi.
"Master" refers to the i2s board not the raspberry pi.
To use the pcm1803a board as slave is not a good idea because
the clocks supplied by the computer have to be synchronized to
the system clock of the i2s board and that is not possible here,
so there will be loss of data repeatedly.
But you can change the mode of the driver to slave if your i2s device
only supports slave mode and wants clock signals from the raspberry pi.
Change SND_SOC_DAIFMT_CBM_CFM to SND_SOC_DAIFMT_CBS_CFS
Re: I2S Success (at last) !
Hi Carla,
fantastic, it worked, many thanks.
I had begun to think I'd be looking at real debugging, but it was such a simple thing.
BTW, I am not using that CODEC, I'm using a Knowles I2S mic and it works great now. It's tiny and has extremely good signal to noise and PSRR.
Many thanks again!
BTW, one of the applications I have requires using the Pi as a slave. If the master device is not running when arecord is run, I assume I'll get the I2S error as before. Any idea whether the error will cause subsequent attempts to record to fail?
fantastic, it worked, many thanks.
I had begun to think I'd be looking at real debugging, but it was such a simple thing.
BTW, I am not using that CODEC, I'm using a Knowles I2S mic and it works great now. It's tiny and has extremely good signal to noise and PSRR.
Many thanks again!
BTW, one of the applications I have requires using the Pi as a slave. If the master device is not running when arecord is run, I assume I'll get the I2S error as before. Any idea whether the error will cause subsequent attempts to record to fail?
Re: I2S Success (at last) !
Well, the driver is working great on Raspbian, but I'm having great fun on Arch Linux.
First we had a version problem when trying just insmod, updated everything to the latest kernels and headers and now I find that simple_card has changed in the latest 4.1.4 and 4.1.5 kernels.
fmt has been removed.
http://lists.infradead.org/pipermail/li ... 17560.html
Again, I could delve into the actual code, but having spent time just getting the driver going, I'm reluctant.
Anyone got any good suggestions?
First we had a version problem when trying just insmod, updated everything to the latest kernels and headers and now I find that simple_card has changed in the latest 4.1.4 and 4.1.5 kernels.
fmt has been removed.
http://lists.infradead.org/pipermail/li ... 17560.html
Again, I could delve into the actual code, but having spent time just getting the driver going, I'm reluctant.
Anyone got any good suggestions?
Re: I2S Success (at last) !
It compiles and recording works - but I did not yet check the result
Don't forget to change master to slave for your knowles mic :
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/platform_device.h>
#include <sound/simple_card.h>
#include <linux/delay.h>
/*
modified for linux 4.1.5
inspired by https://github.com/msperl/spi-config
with thanks for https://github.com/notro/rpi-source/wiki
as well as Florian Meier for the rpi i2s and dma drivers
to use a differant (simple-card compatible) codec
change the codec name string in two places and the
codec_dai name string. (see codec's source file)
fmt flags are set for vanilla i2s with rpi as clock slave
N.B. playback vs capture is determined by the codec choice
*/
void device_release_callback(struct device *dev) { /* do nothing */ };
static struct asoc_simple_card_info snd_rpi_simple_card_info = {
.card = "snd_rpi_simple_card", // -> snd_soc_card.name
.name = "simple-card_codec_link", // -> snd_soc_dai_link.name
.codec = "snd-soc-dummy", // "dmic-codec", // -> snd_soc_dai_link.codec_name
.platform = "20203000.i2s",
.daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = {
.name = "20203000.i2s", // -> snd_soc_dai_link.cpu_dai_name
.sysclk = 0 },
.codec_dai = {
.name = "snd-soc-dummy-dai", //"dmic-codec", // -> snd_soc_dai_link.codec_dai_name
.sysclk = 0 },
};
static struct platform_device snd_rpi_simple_card_device = {
.name = "asoc-simple-card", //module alias
.id = 0,
.num_resources = 0,
.dev = { .release = &device_release_callback,
.platform_data = &snd_rpi_simple_card_info, // *HACK ALERT*
},
};
int hello_init(void)
{
const char *dmaengine = "bcm2708-dmaengine"; //module name
int ret;
ret = request_module(dmaengine);
pr_alert("request module load '%s': %d\n",dmaengine, ret);
ret = platform_device_register(&snd_rpi_simple_card_device);
pr_alert("register platform device '%s': %d\n",snd_rpi_simple_card_device.name, ret);
pr_alert("Hello World
\n");
return 0;
}
void hello_exit(void)
{// you'll have to sudo modprobe -r the card & codec drivers manually (first?)
platform_device_unregister(&snd_rpi_simple_card_device);
pr_alert("Goodbye World!\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_DESCRIPTION("ASoC simple-card I2S setup");
MODULE_AUTHOR("Plugh Plover");
MODULE_LICENSE("GPL v2");
Don't forget to change master to slave for your knowles mic :
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/platform_device.h>
#include <sound/simple_card.h>
#include <linux/delay.h>
/*
modified for linux 4.1.5
inspired by https://github.com/msperl/spi-config
with thanks for https://github.com/notro/rpi-source/wiki
as well as Florian Meier for the rpi i2s and dma drivers
to use a differant (simple-card compatible) codec
change the codec name string in two places and the
codec_dai name string. (see codec's source file)
fmt flags are set for vanilla i2s with rpi as clock slave
N.B. playback vs capture is determined by the codec choice
*/
void device_release_callback(struct device *dev) { /* do nothing */ };
static struct asoc_simple_card_info snd_rpi_simple_card_info = {
.card = "snd_rpi_simple_card", // -> snd_soc_card.name
.name = "simple-card_codec_link", // -> snd_soc_dai_link.name
.codec = "snd-soc-dummy", // "dmic-codec", // -> snd_soc_dai_link.codec_name
.platform = "20203000.i2s",
.daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM,
.cpu_dai = {
.name = "20203000.i2s", // -> snd_soc_dai_link.cpu_dai_name
.sysclk = 0 },
.codec_dai = {
.name = "snd-soc-dummy-dai", //"dmic-codec", // -> snd_soc_dai_link.codec_dai_name
.sysclk = 0 },
};
static struct platform_device snd_rpi_simple_card_device = {
.name = "asoc-simple-card", //module alias
.id = 0,
.num_resources = 0,
.dev = { .release = &device_release_callback,
.platform_data = &snd_rpi_simple_card_info, // *HACK ALERT*
},
};
int hello_init(void)
{
const char *dmaengine = "bcm2708-dmaengine"; //module name
int ret;
ret = request_module(dmaengine);
pr_alert("request module load '%s': %d\n",dmaengine, ret);
ret = platform_device_register(&snd_rpi_simple_card_device);
pr_alert("register platform device '%s': %d\n",snd_rpi_simple_card_device.name, ret);
pr_alert("Hello World

return 0;
}
void hello_exit(void)
{// you'll have to sudo modprobe -r the card & codec drivers manually (first?)
platform_device_unregister(&snd_rpi_simple_card_device);
pr_alert("Goodbye World!\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_DESCRIPTION("ASoC simple-card I2S setup");
MODULE_AUTHOR("Plugh Plover");
MODULE_LICENSE("GPL v2");
Re: I2S Success (at last) !
Fantastic, I'll try it today!!!
Re: I2S Success (at last) !
Doh!
Now I get:
[ 72.372642] request module load 'bcm2708-dmaengine': 0
[ 72.373036] register platform device 'asoc-simple-card': 0
[ 72.373162] Hello World
[ 72.381936] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI 20203000.i2s not registered
[ 72.382227] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
[ 117.175197] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.
[ 117.175619] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI 20203000.i2s not registered
[ 117.175847] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
Contents of /etc/modules-load.d/raspberrypi.conf are:
bcm2708-rng
#snd-bcm2835
#i2c-dev
w1-gpio pullup=1
w1-therm
snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine

Now I get:
[ 72.372642] request module load 'bcm2708-dmaengine': 0
[ 72.373036] register platform device 'asoc-simple-card': 0
[ 72.373162] Hello World

[ 72.381936] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI 20203000.i2s not registered
[ 72.382227] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
[ 117.175197] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.
[ 117.175619] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI 20203000.i2s not registered
[ 117.175847] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
Contents of /etc/modules-load.d/raspberrypi.conf are:
bcm2708-rng
#snd-bcm2835
#i2c-dev
w1-gpio pullup=1
w1-therm
snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine

Re: I2S Success (at last) !
I upgraded arch-linux today (now 4.1.6 kernel) and the module
still works (even the one compiled for the 4.1.5 kernel loads).
My /etc/modules-load.d/raspberrypi.conf
is :
bcm2708-rng
snd-bcm2835
#snd_soc_pcm512x
i2c-dev
My archlinux is an older version that was upgraded via pacman -Syu ,
i did not try a fresh installation.
still works (even the one compiled for the 4.1.5 kernel loads).
My /etc/modules-load.d/raspberrypi.conf
is :
bcm2708-rng
snd-bcm2835
#snd_soc_pcm512x
i2c-dev
My archlinux is an older version that was upgraded via pacman -Syu ,
i did not try a fresh installation.
Re: I2S Success (at last) !
Hi Carla,
Good news that it is working for you.
Could you post your /boot/config.txt please, I still have problems.
Thanks
Good news that it is working for you.
Could you post your /boot/config.txt please, I still have problems.
Thanks
Re: I2S Success (at last) !
Also /boot/cmdline.txt
Mine is
Thanks
Mine is
Code: Select all
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
Re: I2S Success (at last) !
This is my cmdline.txt:
root=/dev/mmcblk0p5 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
In /boot/config.txt i2s is enabled:
device_tree_param=i2s=on
This is the output of lsmod:
Module Size Used by
snd_soc_simple_card 6405 0
my_loader 1580 0
evdev 10105 0
snd_soc_bcm2708_i2s 6899 2
regmap_mmio 3266 1 snd_soc_bcm2708_i2s
snd_soc_core 156250 3 snd_soc_simple_card,snd_soc_bcm2708_i2s
snd_compress 8074 1 snd_soc_core
snd_pcm_dmaengine 5356 1 snd_soc_core
i2c_bcm2708 5668 0
bcm2835_gpiomem 3343 0
uio_pdrv_genirq 3273 0
uio 8949 1 uio_pdrv_genirq
sch_fq_codel 7582 2
i2c_dev 6089 0
snd_bcm2835 20636 0
snd_pcm 86077 3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_timer 21100 1 snd_pcm
snd 62620 5 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_compress
bcm2708_rng 1068 0
rng_core 7821 1 bcm2708_rng
ip_tables 11769 0
x_tables 16585 1 ip_tables
ipv6 333610 12
root=/dev/mmcblk0p5 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
In /boot/config.txt i2s is enabled:
device_tree_param=i2s=on
This is the output of lsmod:
Module Size Used by
snd_soc_simple_card 6405 0
my_loader 1580 0
evdev 10105 0
snd_soc_bcm2708_i2s 6899 2
regmap_mmio 3266 1 snd_soc_bcm2708_i2s
snd_soc_core 156250 3 snd_soc_simple_card,snd_soc_bcm2708_i2s
snd_compress 8074 1 snd_soc_core
snd_pcm_dmaengine 5356 1 snd_soc_core
i2c_bcm2708 5668 0
bcm2835_gpiomem 3343 0
uio_pdrv_genirq 3273 0
uio 8949 1 uio_pdrv_genirq
sch_fq_codel 7582 2
i2c_dev 6089 0
snd_bcm2835 20636 0
snd_pcm 86077 3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_timer 21100 1 snd_pcm
snd 62620 5 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_compress
bcm2708_rng 1068 0
rng_core 7821 1 bcm2708_rng
ip_tables 11769 0
x_tables 16585 1 ip_tables
ipv6 333610 12
Re: I2S Success (at last) !
Hi Carla sch,
many thanks, still having problems with 20203000.i2s.
My cmdline.txt is identical to yours.
I also have I2S enabled in config.txt.
My lsmod are as follows, before and after insmod my_loader_ljk.ko
Last lines of dmesg are:
Any ideas how come DAI 20203000.i2s is not registered???
many thanks, still having problems with 20203000.i2s.
My cmdline.txt is identical to yours.
I also have I2S enabled in config.txt.
My lsmod are as follows, before and after insmod my_loader_ljk.ko
Code: Select all
[root@alarmpi loader2]# lsmod
Module Size Used by
sch_fq_codel 7252 1
snd_soc_bcm2708_i2s 7027 0
regmap_mmio 3157 1 snd_soc_bcm2708_i2s
snd_soc_core 163859 1 snd_soc_bcm2708_i2s
snd_compress 8186 1 snd_soc_core
snd_pcm_dmaengine 5351 1 snd_soc_core
snd_pcm 84615 2 snd_soc_core,snd_pcm_dmaengine
snd_seq 56695 0
snd_seq_device 6535 1 snd_seq
snd_timer 19608 2 snd_pcm,snd_seq
snd 60092 6 snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
evdev 9464 0
joydev 8515 0
w1_gpio 4226 0
wire 28558 1 w1_gpio
i2c_bcm2708 5646 0
cn 5097 1 wire
uio_pdrv_genirq 3281 0
uio 8710 1 uio_pdrv_genirq
bcm2708_rng 1143 0
rng_core 5666 1 bcm2708_rng
ipv6 343408 24
[root@alarmpi loader2]# insmod my_loader_ljk.ko
[root@alarmpi loader2]# lsmod
Module Size Used by
snd_soc_simple_card 6698 0
my_loader 1987 0
sch_fq_codel 7252 1
snd_soc_bcm2708_i2s 7027 0
regmap_mmio 3157 1 snd_soc_bcm2708_i2s
snd_soc_core 163859 2 snd_soc_simple_card,snd_soc_bcm2708_i2s
snd_compress 8186 1 snd_soc_core
snd_pcm_dmaengine 5351 1 snd_soc_core
snd_pcm 84615 2 snd_soc_core,snd_pcm_dmaengine
snd_seq 56695 0
snd_seq_device 6535 1 snd_seq
snd_timer 19608 2 snd_pcm,snd_seq
snd 60092 6 snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
evdev 9464 0
joydev 8515 0
w1_gpio 4226 0
wire 28558 1 w1_gpio
i2c_bcm2708 5646 0
cn 5097 1 wire
uio_pdrv_genirq 3281 0
uio 8710 1 uio_pdrv_genirq
bcm2708_rng 1143 0
rng_core 5666 1 bcm2708_rng
ipv6 343408 24
[root@alarmpi loader2]#
Code: Select all
[ 860.250244] request module load 'bcm2708-dmaengine': 0
[ 860.268578] register platform device 'asoc-simple-card': 0
[ 860.277096] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI 20203000.i2s not registered
[ 860.277191] platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral
[ 860.358684] Hello World :)
Re: I2S Success (at last) !
Find out your Linux version with uname -r , mine is now 4.1.6
But the sizes of the modules are different from yours, so
your version is different.
Find out what is in:
cat /sys/kernel/debug/platforms
That is how I found the name 20203000.i2s
Debugfs has to be mounted.
But the sizes of the modules are different from yours, so
your version is different.
Find out what is in:
cat /sys/kernel/debug/platforms
That is how I found the name 20203000.i2s
Debugfs has to be mounted.
Re: I2S Success (at last) !
Hi Carla,
I found a file called platforms in /sys/kernel/debug/asoc
This contained a different name for i2s, 3f203000.i2s. After using this in my loader, it loads!
Fantastic, many thanks!!!
Now I need to see if it works.
I found a file called platforms in /sys/kernel/debug/asoc
This contained a different name for i2s, 3f203000.i2s. After using this in my loader, it loads!
Fantastic, many thanks!!!
Now I need to see if it works.
Re: I2S Success (at last) !
It works!
I've tried it on all the versions of Arch Linux I am using and the same fix works for them all. I just needed the correct name for that I2S file.
Thanks again!
I've tried it on all the versions of Arch Linux I am using and the same fix works for them all. I just needed the correct name for that I2S file.
Thanks again!