Skip to contentSkip to conversation

McBSP troubles

DISCUSSION Sergey Lapin 2 participants 2 messages Nov 21, 2009

lore
Share & tools
lore
#0 lore raw

Hi, all!

I have problems making any sound with current linux-omap master. Driver below worked ok with 2.6.28-omap1, and debugging output of mcbsp driver is the following:

gnome5:~# aplay -c 2 -f S16_LE /dev/urandom
[ 4593.480072] !!!omap_mcbsp_dai_startup()
[ 4593.484283] !!!omap2_mcbsp_request()
[ 4593.488159] disabling LINE_OUT
[ 4593.491302] disabling DMIC
[ 4593.494018] Disabling ASSYM pin
Playing raw data '/dev/urandom' : Signed 16 bit Little Endian, Rate
8000 Hz, Stereo
[ 4593.522064] !!!omap_mcbsp_dai_set_dai_fmt()
[ 4593.615905] !!!omap_mcbsp_dai_hw_params()
[ 4593.620086] omap-mcbsp omap-mcbsp.2: Configuring McBSP2  phys_base:
0x49022000
[ 4593.678375] gnome5_jack_event
[ 4593.726623] !!!omap_mcbsp_set_threshold()
[ 4593.730651] !!!omap_mcbsp_dai_trigger()
[ 4593.735015] omap-mcbsp omap-mcbsp.2: **** McBSP2 regs ****
[ 4593.740539] omap-mcbsp omap-mcbsp.2: DRR2:  0xd907da5a
[ 4593.745697] omap-mcbsp omap-mcbsp.2: DRR1:  0x0000
[ 4593.750518] omap-mcbsp omap-mcbsp.2: DXR2:  0x0000
[ 4593.755340] omap-mcbsp omap-mcbsp.2: DXR1:  0x0000
[ 4593.760162] omap-mcbsp omap-mcbsp.2: SPCR2: 0x02f5
[ 4593.764984] omap-mcbsp omap-mcbsp.2: SPCR1: 0x0030
[ 4593.769805] omap-mcbsp omap-mcbsp.2: RCR2:  0x8041
[ 4593.774627] omap-mcbsp omap-mcbsp.2: RCR1:  0x0040
[ 4593.779449] omap-mcbsp omap-mcbsp.2: XCR2:  0x8041
[ 4593.784271] omap-mcbsp omap-mcbsp.2: XCR1:  0x0040
[ 4593.789093] omap-mcbsp omap-mcbsp.2: SRGR2: 0x001f
[ 4593.793884] omap-mcbsp omap-mcbsp.2: SRGR1: 0x0f00
[ 4593.798706] omap-mcbsp omap-mcbsp.2: PCR0:  0x000f
[ 4593.803527] omap-mcbsp omap-mcbsp.2: ***********************
[ 4603.811187] ALSA sound/core/pcm_lib.c:1708: playback write error
(DMA or IRQ trouble?)
[ 4614.818878] ALSA sound/core/pcm_lib.c:1708: playback write error
(DMA or IRQ trouble?)
aplay: pcm_write:1442: write error:

And no sound at all. Codec is supplied properly with clock, and programmed normally, so
I think that's McBSP trouble, but I might be wrong. I use tlv320aic32 as codec.

I use slightly modified sound/soc/omap/n810.c with clock names changed for OMAP3.
Clock is supplied properly.

#1 lore raw
Quoted 13 lines · Sergey Lapin

Hi, all!

I have problems making any sound with current linux-omap master. ASoC repository did not change anything either. I use slightly modified (removed all GPIOs/jacks and different clock names because we use OMAP3 instead of OMAP2 n810 uses)
sound/soc/omap/n810.c, with McBSP2. Codec is tlv320aic32 and it is well supplied with 13 MHz clock, so should work happily. Old 2.6.28-omap1 kernel + modifications works well with this, but it lacks some fundamental features recently added to mainline and linux-omap kernels, so we considered upgrading. Almost all stuff on custom board works, except for sound, which I fight for several weeks already, so I look for any help with this. I use OMAP3525 SoC.

More experiments show that codec seems to be responsible. After some tampering with reset GPIO, it finally works.

Sorry for trouble,

S.