2010-02-04 01:19:45 ad73311_SoC+bf548 problem
Vitaliy Popov (RUSSIAN FEDERATION)
Message: 85566
Hi all!
I develop my own board on bf548 with ad73311. First of all I test ad73311 by sport_test -t sample.wav, sound play ok. AD73311_SE is on GPIO79 and AD73311_RESET is on GPIO78. If I change SCL divider of ad73311, the speed of playng is changed, so internal config registers of ad73311 are configured propertly. Then I try to add SoC driver support to linux kernel.
Firstly I cold not compile, with the error, not defined bfin_write_SPORT_TX16 in file /uClinux-dist/linux-2.6.x/sound/soc/blackfin/bf5xx-ad73311.c. I add define in file /uClinux-dist/arch/blackfin/mach-bf548/include/mach/cdefBF548.h
#define bfin_write_SPORT0_TX16 bfin_write16(SPORT0_TX,val)
similar as defined
#define bfin_write_SPORT0_TX bfin_write(SPORT0_TX,val)
now all compiled ok, but driver do not start! I see the output:
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ASoC version 0.13.2
ad73311: failed to configure codec
soc-audio: probe of soc-audio failed with error -14
ALSA device list:
No soundcards found.
what I do wrong?
I use latest
Linux version 2.6.28.10-ADI-2009R1.1 (----@-------) (gcc version 4.1.2 (ADI svn))
I use oscilloscope for looking AD73311_SE and AD73311_RESET timing. When I can hear sound by sport_test and when driver starting the timing is similar...
QuoteReplyEditDelete
2010-02-04 12:03:20 Re: ad73311_SoC+bf548 problem
Vitaliy Popov (RUSSIAN FEDERATION)
Message: 85612
Hi all!
I develop my own board on bf548 with ad73311. First of all I test ad73311 by sport_test -t sample.wav, sound play ok. AD73311_SE is on GPIO79 and AD73311_RESET is on GPIO78. If I change SCL divider of ad73311, the speed of playng is changed, so internal config registers of ad73311 are configured propertly. Then I try to add SoC driver support to linux kernel.
Firstly I cold not compile, with the error, not defined bfin_write_SPORT_TX16 in file /uClinux-dist/linux-2.6.x/sound/soc/blackfin/bf5xx-ad73311.c. I add define in file /uClinux-dist/arch/blackfin/mach-bf548/include/mach/cdefBF548.h
#define bfin_write_SPORT0_TX16 bfin_write16(SPORT0_TX,val)
similar as defined
#define bfin_write_SPORT0_TX bfin_write(SPORT0_TX,val)
now all compiled ok, but driver do not start! I see the output:
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ASoC version 0.13.2
ad73311: failed to configure codec
soc-audio: probe of soc-audio failed with error -14
ALSA device list:
No soundcards found.
what I do wrong?
I use latest
Linux version 2.6.28.10-ADI-2009R1.1 (----@-------) (gcc version 4.1.2 (ADI svn))
I use oscilloscope for looking AD73311_SE and AD73311_RESET timing. When I can hear sound by sport_test and when driver starting the timing is similar..
---.
I find a point of problem, there is no data on DATA_IN pin of ad73311. AD73311_SE going from low to high SCLK is apeared(16.384/8=2.048M) but there is no data!
QuoteReplyEditDelete
2010-02-05 01:17:16 Re: ad73311_SoC+bf548 problem
Vitaliy Popov (RUSSIAN FEDERATION)
Message: 85633
I find the problem-
in function
static int snd_ad73311_configure(void)
SPORT of bf548 not configured in portc_mux
need to do:
bfin_write_SPORT_TCR1(TFSR);
bfin_write_SPORT_TCR2(0xF);
SSYNC();
#if 1
bfin_write_PORTC_FER(0x00dd);//switch on bf548 SPORT0
#endif
/* SPORT Tx Register is a 8 x 16 FIFO, all the data can be put to
* FIFO before enable SPORT to transfer the data
*/
for (count = 0; count < 6; count++)
bfin_write_SPORT_TX16(ctrl_regs[count]);
SSYNC();
now codec is configured propertly!
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ASoC version 0.13.2
dma rx:0 tx:1, err irq:10, regs:ffc00800
asoc: AD73311 <-> bf5xx-i2s mapping ok
ALSA device list:
#0: bf5xx_ad73311 (AD73311)
QuoteReplyEditDelete
2010-02-05 01:18:34 Re: ad73311_SoC+bf548 problem
Vitaliy Popov (RUSSIAN FEDERATION)
Message: 85634
not MUX, PORTC_FER...
QuoteReplyEditDelete
2010-02-05 01:20:39 Re: ad73311_SoC+bf548 problem
Sonic Zhang (CHINA)
Message: 85635
Could you attach your patch here? So, we can merge into our tree.
Thanks
QuoteReplyEditDelete
2010-02-05 14:13:31 Re: ad73311_SoC+bf548 problem
Vitaliy Popov (RUSSIAN FEDERATION)
Message: 85710
Im new in linux world, but my patch is very simple.
Latest Release 2009R1.1-RC4
/uClinux-dist/linux-2.6.x/sound/soc/blackfin/bf5xx-ad73311.c
line 106, add new 3 lines
107: #if 1
108: bfin_write_PORTC_FER(0x00dd);//switch on gpoi_pin multiplexor of bf548 to SPORT0 function
109: #endif
on line 107 probably need to be #if CONFIG_BF54x
and as I wroute before in /uClinux-dist/arch/blackfin/mach-bf548/include/mach/cdefBF548.h add aditional defines in line 95:
#define bfin_write_SPORT0_TX16 bfin_write16(SPORT0_TX,val)
that's all!