2009-08-12 11:36:42 BF518F- EZBRD SSM2602 I2S problem
Felix Lazarev (UNITED STATES)
Message: 78766
Hi all,
I have trouble getting SSM2602 on ALSA SOC I2S to work. The BF518F EZBRD comes with SSM2602 codec. I've configured it into TWI connection and verified that it's recognized on addr 0x1B in u-boot (iprobe). SW15 (SPORT0) is all on. but when i'm trying to play anything (vplay /dev/urandom) i'm getting within 10-15 seconds error
"ALSA sound/core/pcm_lib.c:1548: playback write error (DMA or IRQ trouble?)"
then vplay spits "/dev/dsp: Success" and quits.
i've verified that I2S signals are present on the codec pins (LRCK, BITCLK, DATA, SCLK) before vplay quits, but no sound heard....
uclinux-dist and toolchain are 2009R1
QuoteReplyEditDelete
2009-08-12 14:26:17 BF518F- EZBRD SSM2602 I2S problem
Michael Hennerich (GERMANY)
Message: 78780 Did you compile i2c-bfin-twi into the kernel or loaded the module prior
in loading the ssm2602/3 driver? The ssm2602 codec doesn't complain.
-Will give things a try on my side tomorrow.
-Michael
QuoteReplyEditDelete
2009-08-12 15:39:35 Re: BF518F- EZBRD SSM2602 I2S problem
Felix Lazarev (UNITED STATES)
Message: 78783
Actually i've found the problem -- bf5xx-i2s driver was "tightly" coded for BF527. BF518 has only one location for SPORT0 -- it's PORTG. hence -- all BF518 specific sections of KConfig are irrelevant (select either port F or portG, PORTG10 or PORTG14 for TSCLK). In sound/soc/blackin/bf5xx-i2s.c
there's a fragment:
#ifdef CONFIG_BF527_SPORT0_PORTF
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#else
#define LOCAL_SPORT0_TFS (0)
#endif
which is wrong for anything but BF527
it should be
#ifdef CONFIG_BF527
#ifdef CONFIG_BF527_SPORT0_PORTF
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#else
#define LOCAL_SPORT0_TFS (0)
#endif
#else
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#endif
That fixed I2S
QuoteReplyEditDelete
2009-08-12 16:42:37 Re: BF518F- EZBRD SSM2602 I2S problem
Mike Frysinger (UNITED STATES)
Message: 78785
that makes the nested logic worse. i would simply change the one letter and invert:
#ifdef CONFIG_BF527_SPORT0_PORTG
#define LOCAL_SPORT0_TFS (0)
#else
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#endif
QuoteReplyEditDelete
2009-08-13 02:25:01 Re: BF518F- EZBRD SSM2602 I2S problem
Cliff Cai (CHINA)
Message: 78798
Applied,Thanks.
Cliff
QuoteReplyEditDelete
2009-08-13 13:51:57 Re: BF518F- EZBRD SSM2602 I2S problem
Felix Lazarev (UNITED STATES)
Message: 78857
Another thing --- I2S DAI is hard coded for first 2 SPORT ports only -- which poses a problem for BF54x having 4 SPORT ports. please enhance it to support SPORT3 and SPORT4 as well. In my other project i'm using SSM2602 on SPORT3 of BF548.