Hi,
Today I have got recording working as well. It appears that codec is used in the slave mode. Therefore LRCIN must be connected as well.
So the correct connection diagram is:
Codec RPi
3V3 3V3
GND GND
LRCOUT PCM-FS (P5-04)
LRCIN PCM-FS (P5-04) (together with LRCOUT)
BCLK PCM-CLK (P5-03)
SCLK I2C-SCL (P1-05)
SDIN I2C-SDA (P1-03)
MODE GND
MCK --
/CS 3V3
DIN PCM-DOUT (P5-06)
DOUT PCM-DIN (P5-05)
CLKOUT --
However the "scheduling while atomic" problem appears also during recording:
# arecord -D hw:1,0 -f dat /tmp/test1.wav
[ 1179.013561] bcm2708-dmaengine bcm2708-dmaengine: allocating channel for 0
Recording WAVE '/tmp/test1.wav' : Signed 16 bit Little Endian, Rat[ 1179.026691] BUG: scheduling while atomic: arecord/823/0x00000003
e 48000 Hz, Ster[ 1179.033575] Modules linked in:eo
snd_soc_rpi_mbed snd_soc_tlv320aic23 bcm2708_dmaengine virt_dma snd_soc_bcm2708_i2s snd_soc_bcm2708 snd_soc_core regmap_spi regmap_i2c snd_compress i2c_bcm2708 8192cu snd_bcm2835 snd_pcm snd_timer snd snd_page_alloc
[ 1179.057351] [<c0013b60>] (unwind_backtrace+0x0/0xf0) from [<c03d59b8>] (__schedule_bug+0x44/0x58)
[ 1179.066272] [<c03d59b8>] (__schedule_bug+0x44/0x58) from [<c03d96e8>] (__schedule+0x4d0/0x57c)
[ 1179.074926] [<c03d96e8>] (__schedule+0x4d0/0x57c) from [<c03d8270>] (schedule_timeout+0x170/0x200)
[ 1179.083923] [<c03d8270>] (schedule_timeout+0x170/0x200) from [<c03d9954>] (wait_for_common+0xcc/0x198)
[ 1179.093266] [<c03d9954>] (wait_for_common+0xcc/0x198) from [<c003572c>] (flush_work+0xe4/0x188)
[ 1179.102008] [<c003572c>] (flush_work+0xe4/0x188) from [<c0036fb4>] (schedule_on_each_cpu+0x48/0x60)
[ 1179.111091] [<c0036fb4>] (schedule_on_each_cpu+0x48/0x60) from [<c00c4108>] (migrate_prep+0x8/0x10)
[ 1179.120179] [<c00c4108>] (migrate_prep+0x8/0x10) from [<c009924c>] (alloc_contig_range+0xd8/0x2d0)
[ 1179.129190] [<c009924c>] (alloc_contig_range+0xd8/0x2d0) from [<c026d954>] (dma_alloc_from_contiguous+0x6c/0x10c)
[ 1179.139520] [<c026d954>] (dma_alloc_from_contiguous+0x6c/0x10c) from [<c0016904>] (__alloc_from_contiguous+0x28/0x74)
[ 1179.150319] [<c0016904>] (__alloc_from_contiguous+0x28/0x74) from [<c0016fb0>] (__dma_alloc.isra.20+0x150/0x2c0)
[ 1179.160550] [<c0016fb0>] (__dma_alloc.isra.20+0x150/0x2c0) from [<c001724c>] (arm_dma_alloc+0x90/0x98)
[ 1179.169902] [<c001724c>] (arm_dma_alloc+0x90/0x98) from [<bf0f1b9c>] (bcm2708_dma_prep_dma_cyclic+0xf0/0x1b4 [bcm2708_dmaengine])
[ 1179.181628] [<bf0f1b9c>] (bcm2708_dma_prep_dma_cyclic+0xf0/0x1b4 [bcm2708_dmaengine]) from [<bf0d5c78>] (snd_dmaengine_pcm_trigger+0xd4/0x148 [snd_soc_core])
[ 1179.195764] [<bf0d5c78>] (snd_dmaengine_pcm_trigger+0xd4/0x148 [snd_soc_core]) from [<bf0d1d98>] (soc_pcm_trigger+0x64/0x144 [snd_soc_core])
[ 1179.208447] [<bf0d1d98>] (soc_pcm_trigger+0x64/0x144 [snd_soc_core]) from [<bf020068>] (snd_pcm_do_start+0x2c/0x30 [snd_pcm])
[ 1179.219807] [<bf020068>] (snd_pcm_do_start+0x2c/0x30 [snd_pcm]) from [<bf01fc48>] (snd_pcm_hw_refine+0x908/0x9bc [snd_pcm])
[ 1179.230994] [<bf01fc48>] (snd_pcm_hw_refine+0x908/0x9bc [snd_pcm]) from [<bf025950>] (snd_pcm_update_hw_ptr+0x2f4/0x3ac [snd_pcm])
[ 1179.242787] [<bf025950>] (snd_pcm_update_hw_ptr+0x2f4/0x3ac [snd_pcm]) from [<bf025aa8>] (snd_pcm_lib_read+0x48/0x40c [snd_pcm])
[ 1179.254529] [<bf025aa8>] (snd_pcm_lib_read+0x48/0x40c [snd_pcm]) from [<bf021bcc>] (snd_pcm_status+0x1390/0x1668 [snd_pcm])
[ 1179.265734] [<bf021bcc>] (snd_pcm_status+0x1390/0x1668 [snd_pcm]) from [<c00d7864>] (do_vfs_ioctl+0x80/0x5d0)
[ 1179.275692] [<c00d7864>] (do_vfs_ioctl+0x80/0x5d0) from [<c00d7dec>] (sys_ioctl+0x38/0x64)
[ 1179.284000] [<c00d7dec>] (sys_ioctl+0x38/0x64) from [<c000dbe0>] (ret_fast_syscall+0x0/0x30)
[ 1179.297717] BUG: scheduling while atomic: arecord/823/0x40000003
[ 1179.303861] Modules linked in: snd_soc_rpi_mbed snd_soc_tlv320aic23 bcm2708_dmaengine virt_dma snd_soc_bcm2708_i2s snd_soc_bcm2708 snd_soc_core regmap_spi regmap_i2c snd_compress i2c_bcm2708 8192cu snd_bcm2835 snd_pcm snd_timer snd snd_page_alloc
[ 1179.325847] [<c0013b60>] (unwind_backtrace+0x0/0xf0) from [<c03d59b8>] (__schedule_bug+0x44/0x58)
[ 1179.334761] [<c03d59b8>] (__schedule_bug+0x44/0x58) from [<c03d96e8>] (__schedule+0x4d0/0x57c)
[ 1179.343410] [<c03d96e8>] (__schedule+0x4d0/0x57c) from [<c0043f08>] (__cond_resched+0x24/0x34)
[ 1179.352192] [<c0043f08>] (__cond_resched+0x24/0x34) from [<c03d9828>] (_cond_resched+0x3c/0x44)
[ 1179.360960] [<c03d9828>] (_cond_resched+0x3c/0x44) from [<c009f560>] (shrink_page_list+0x48/0x928)
[ 1179.369965] [<c009f560>] (shrink_page_list+0x48/0x928) from [<c009ff50>] (reclaim_clean_pages_from_list+0x110/0x178)
[ 1179.380521] [<c009ff50>] (reclaim_clean_pages_from_list+0x110/0x178) from [<c0099280>] (alloc_contig_range+0x10c/0x2d0)
[ 1179.391360] [<c0099280>] (alloc_contig_range+0x10c/0x2d0) from [<c026d954>] (dma_alloc_from_contiguous+0x6c/0x10c)
[ 1179.401756] [<c026d954>] (dma_alloc_from_contiguous+0x6c/0x10c) from [<c0016904>] (__alloc_from_contiguous+0x28/0x74)
[ 1179.412401] [<c0016904>] (__alloc_from_contiguous+0x28/0x74) from [<c0016fb0>] (__dma_alloc.isra.20+0x150/0x2c0)
[ 1179.422606] [<c0016fb0>] (__dma_alloc.isra.20+0x150/0x2c0) from [<c001724c>] (arm_dma_alloc+0x90/0x98)
[ 1179.431952] [<c001724c>] (arm_dma_alloc+0x90/0x98) from [<bf0f1b9c>] (bcm2708_dma_prep_dma_cyclic+0xf0/0x1b4 [bcm2708_dmaengine])
[ 1179.443677] [<bf0f1b9c>] (bcm2708_dma_prep_dma_cyclic+0xf0/0x1b4 [bcm2708_dmaengine]) from [<bf0d5c78>] (snd_dmaengine_pcm_trigger+0xd4/0x148 [snd_soc_core])
[ 1179.457934] [<bf0d5c78>] (snd_dmaengine_pcm_trigger+0xd4/0x148 [snd_soc_core]) from [<bf0d1d98>] (soc_pcm_trigger+0x64/0x144 [snd_soc_core])
[ 1179.470635] [<bf0d1d98>] (soc_pcm_trigger+0x64/0x144 [snd_soc_core]) from [<bf020068>] (snd_pcm_do_start+0x2c/0x30 [snd_pcm])
[ 1179.481997] [<bf020068>] (snd_pcm_do_start+0x2c/0x30 [snd_pcm]) from [<bf01fc48>] (snd_pcm_hw_refine+0x908/0x9bc [snd_pcm])
[ 1179.493183] [<bf01fc48>] (snd_pcm_hw_refine+0x908/0x9bc [snd_pcm]) from [<bf025950>] (snd_pcm_update_hw_ptr+0x2f4/0x3ac [snd_pcm])
[ 1179.504973] [<bf025950>] (snd_pcm_update_hw_ptr+0x2f4/0x3ac [snd_pcm]) from [<bf025aa8>] (snd_pcm_lib_read+0x48/0x40c [snd_pcm])
[ 1179.516585] [<bf025aa8>] (snd_pcm_lib_read+0x48/0x40c [snd_pcm]) from [<bf021bcc>] (snd_pcm_status+0x1390/0x1668 [snd_pcm])
[ 1179.527770] [<bf021bcc>] (snd_pcm_status+0x1390/0x1668 [snd_pcm]) from [<c00d7864>] (do_vfs_ioctl+0x80/0x5d0)
[ 1179.537721] [<c00d7864>] (do_vfs_ioctl+0x80/0x5d0) from [<c00d7dec>] (sys_ioctl+0x38/0x64)
[ 1179.546028] [<c00d7dec>] (sys_ioctl+0x38/0x64) from [<c000dbe0>] (ret_fast_syscall+0x0/0x30)
[ 1179.554776] BUG: scheduling while atomic: arecord/823/0x00000003
[ 1179.560862] Modules linked in: snd_soc_rpi_mbed snd_soc_tlv320aic23 bcm2708_dmaengine virt_dma snd_soc_bcm2708_i2s snd_soc_bcm2708 snd_soc_core regmap_spi regmap_i2c snd_compress i2c_bcm2708 8192cu snd_bcm2835 snd_pcm snd_timer snd snd_page_alloc
[ 1179.582842] [<c0013b60>] (unwind_backtrace+0x0/0xf0) from [<c03d59b8>] (__schedule_bug+0x44/0x58)
[ 1179.591756] [<c03d59b8>] (__schedule_bug+0x44/0x58) from [<c03d96e8>] (__schedule+0x4d0/0x57c)
[ 1179.600407] [<c03d96e8>] (__schedule+0x4d0/0x57c) from [<c03d8270>] (schedule_timeout+0x170/0x200)
[ 1179.609411] [<c03d8270>] (schedule_timeout+0x170/0x200) from [<c03d9954>] (wait_for_common+0xcc/0x198)
[ 1179.618752] [<c03d9954>] (wait_for_common+0xcc/0x198) from [<c003572c>] (flush_work+0xe4/0x188)
[ 1179.627455] [<c003572c>] (flush_work+0xe4/0x188) from [<c0036fb4>] (schedule_on_each_cpu+0x48/0x60)
[ 1179.636543] [<c0036fb4>] (schedule_on_each_cpu+0x48/0x60) from [<c0099364>] (alloc_contig_range+0x1f0/0x2d0)
[ 1179.646427] [<c0099364>] (alloc_contig_range+0x1f0/0x2d0) from [<c026d954>] (dma_alloc_from_contiguous+0x6c/0x10c)
[ 1179.656951] [<c026d954>] (dma_alloc_from_contiguous+0x6c/0x10c) from [<c0016904>] (__alloc_from_contiguous+0x28/0x74)
[ 1179.667615] [<c0016904>] (__alloc_from_contiguous+0x28/0x74) from [<c0016fb0>] (__dma_alloc.isra.20+0x150/0x2c0)
[ 1179.677825] [<c0016fb0>] (__dma_alloc.isra.20+0x150/0x2c0) from [<c001724c>] (arm_dma_alloc+0x90/0x98)
[ 1179.687173] [<c001724c>] (arm_dma_alloc+0x90/0x98) from [<bf0f1b9c>] (bcm2708_dma_prep_dma_cyclic+0xf0/0x1b4 [bcm2708_dmaengine])
[ 1179.698894] [<bf0f1b9c>] (bcm2708_dma_prep_dma_cyclic+0xf0/0x1b4 [bcm2708_dmaengine]) from [<bf0d5c78>] (snd_dmaengine_pcm_trigger+0xd4/0x148 [snd_soc_core])
[ 1179.713029] [<bf0d5c78>] (snd_dmaengine_pcm_trigger+0xd4/0x148 [snd_soc_core]) from [<bf0d1d98>] (soc_pcm_trigger+0x64/0x144 [snd_soc_core])
[ 1179.725703] [<bf0d1d98>] (soc_pcm_trigger+0x64/0x144 [snd_soc_core]) from [<bf020068>] (snd_pcm_do_start+0x2c/0x30 [snd_pcm])
[ 1179.737064] [<bf020068>] (snd_pcm_do_start+0x2c/0x30 [snd_pcm]) from [<bf01fc48>] (snd_pcm_hw_refine+0x908/0x9bc [snd_pcm])
[ 1179.748254] [<bf01fc48>] (snd_pcm_hw_refine+0x908/0x9bc [snd_pcm]) from [<bf025950>] (snd_pcm_update_hw_ptr+0x2f4/0x3ac [snd_pcm])
[ 1179.760168] [<bf025950>] (snd_pcm_update_hw_ptr+0x2f4/0x3ac [snd_pcm]) from [<bf025aa8>] (snd_pcm_lib_read+0x48/0x40c [snd_pcm])
[ 1179.771802] [<bf025aa8>] (snd_pcm_lib_read+0x48/0x40c [snd_pcm]) from [<bf021bcc>] (snd_pcm_status+0x1390/0x1668 [snd_pcm])
[ 1179.782992] [<bf021bcc>] (snd_pcm_status+0x1390/0x1668 [snd_pcm]) from [<c00d7864>] (do_vfs_ioctl+0x80/0x5d0)
[ 1179.792946] [<c00d7864>] (do_vfs_ioctl+0x80/0x5d0) from [<c00d7dec>] (sys_ioctl+0x38/0x64)
[ 1179.801253] [<c00d7dec>] (sys_ioctl+0x38/0x64) from [<c000dbe0>] (ret_fast_syscall+0x0/0x30)
Aborted by signal Interr[ 1189.701148] bcm2708-dmaengine bcm2708-dmaengine: freeing channel for 0
upt...
#