2010-11-10 18:37:06     AD73322 init sequence

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-11-10 18:37:06     AD73322 init sequence

Alexander Buryak (UKRAINE)

Message: 95762   

 

Hi ,

 

I trying  to use ad73322 driver on custom board with two ad73322.

 

I can not record or play sound.

 

Looking through  the code I found the next init sequence:

 

static int snd_ad73322_configure(int index)

 

.....

 

short ctrl_buffer[NUM_DEVICES_CHAIN*8];

 

                          ^^^^^^^^^^^^^^^

 

.....

 

       for (i = 0; i < 8; i++) {

                for (j = 0; j < NUM_DEVICES_CHAIN; j++)

                        bfin_write_SPORT1_TX16(ctrl_buffer[8*i+j]);

 

                                                               ^^^^^^^^^^^

                bfin_write_SPORT1_TCR1(bfin_read_SPORT1_TCR1() | TSPEN);

                SSYNC();

                status = bfin_read_SPORT1_STAT();

                while (!(status & TUVF)) {

                        udelay(1);

                        status = bfin_read_SPORT1_STAT();

                        SSYNC();

                }

                bfin_write_SPORT1_TCR1(bfin_read_SPORT1_TCR1() & ~TSPEN);

                SSYNC();

        }

......................

 

So , if NUM_DEVICES_CHAIN < 8  starting from some moment

 

(NUM_DEVICES_CHAIN*8) <  (8*i+j)

 

 

 

Looks like this should be like  bfin_write_SPORT_TX16(ctrl_buffer[8*j+i]);

 

or may be I missed something ?

 

Thanks

QuoteReplyEditDelete

 

 

2010-11-10 22:59:44     Re: AD73322 init sequence

Bob Liu (CHINA)

Message: 95763   

 

Please give more info of your version,failure log, kernel config etc.

 

I think the code have no problem, it depends on how crtl_buffer[] is filled.

 

Thanks

QuoteReplyEditDelete

 

 

2010-11-11 16:30:18     Re: AD73322 init sequence

Alexander Buryak (UKRAINE)

Message: 95783   

 

when NUM_DEVICES_CHAIN == 8

 

Device 07 reg B  value =  b900

Device 06 reg B  value =  b100

Device 05 reg B  value =  a900

Device 04 reg B  value =  a100

Device 03 reg B  value =  9900

Device 02 reg B  value =  9100

Device 01 reg B  value =  8900

Device 00 reg B  value =  8100

Device 07 reg C  value =  ba79

Device 06 reg C  value =  b279

Device 05 reg C  value =  aa79

Device 04 reg C  value =  a279

Device 03 reg C  value =  9a79

Device 02 reg C  value =  9279

Device 01 reg C  value =  8a79

Device 00 reg C  value =  8279

Device 07 reg D  value =  bb00

Device 06 reg D  value =  b300

Device 05 reg D  value =  ab00

Device 04 reg D  value =  a300

Device 03 reg D  value =  9b00

Device 02 reg D  value =  9300

Device 01 reg D  value =  8b00

Device 00 reg D  value =  8300

Device 07 reg E  value =  bc00

Device 06 reg E  value =  b400

Device 05 reg E  value =  ac00

Device 04 reg E  value =  a400

Device 03 reg E  value =  9c00

Device 02 reg E  value =  9400

Device 01 reg E  value =  8c00

Device 00 reg E  value =  8400

Device 07 reg F  value =  bd20

Device 06 reg F  value =  b520

Device 05 reg F  value =  ad20

Device 04 reg F  value =  a520

Device 03 reg F  value =  9d20

Device 02 reg F  value =  9520

Device 01 reg F  value =  8d20

Device 00 reg F  value =  8520

Device 07 reg G  value =  be00

Device 06 reg G  value =  b600

Device 05 reg G  value =  ae00

Device 04 reg G  value =  a600

Device 03 reg G  value =  9e00

Device 02 reg G  value =  9600

Device 01 reg G  value =  8e00

Device 00 reg G  value =  8600

Device 07 reg H  value =  bf00

Device 06 reg H  value =  b700

Device 05 reg H  value =  af00

Device 04 reg H  value =  a700

Device 03 reg H  value =  9f00

Device 02 reg H  value =  9700

Device 01 reg H  value =  8f00

Device 00 reg H  value =  8700

Device 07 reg A  value =  b871

Device 06 reg A  value =  b071

Device 05 reg A  value =  a871

Device 04 reg A  value =  a071

Device 03 reg A  value =  9871

Device 02 reg A  value =  9071

Device 01 reg A  value =  8871

Device 00 reg A  value =  8071

 

ad73322.h

test.c

QuoteReplyEditDelete

 

 

2010-11-11 16:31:14     Re: AD73322 init sequence

Alexander Buryak (UKRAINE)

Message: 95784   

 

NUM_DEVICES_CHAIN == 6

 

Device 05 reg B  value =  a900

Device 04 reg B  value =  a100

Device 03 reg B  value =  9900

Device 02 reg B  value =  9100

Device 01 reg B  value =  8900

Device 00 reg B  value =  8100

Device 03 reg C  value =  9a79

Device 02 reg C  value =  9279

Device 01 reg C  value =  8a79

Device 00 reg C  value =  8279

Device 05 reg D  value =  ab00

Device 04 reg D  value =  a300

Device 01 reg D  value =  8b00

Device 00 reg D  value =  8300

Device 05 reg E  value =  ac00

Device 04 reg E  value =  a400

Device 03 reg E  value =  9c00

Device 02 reg E  value =  9400

Device 05 reg F  value =  ad20

Device 04 reg F  value =  a520

Device 03 reg F  value =  9d20

Device 02 reg F  value =  9520

Device 01 reg F  value =  8d20

Device 00 reg F  value =  8520

Device 03 reg G  value =  9e00

Device 02 reg G  value =  9600

Device 01 reg G  value =  8e00

Device 00 reg G  value =  8600

Device 05 reg H  value =  af00

Device 04 reg H  value =  a700

Device 01 reg H  value =  8f00

Device 00 reg H  value =  8700

Device 05 reg A  value =  a851

Device 04 reg A  value =  a051

Device 03 reg A  value =  9851

Device 02 reg A  value =  9051

Device 00 reg A  value =  0

Device 00 reg A  value =  79

Device 00 reg A  value =  0

Device 00 reg A  value =  0

Device 00 reg A  value =  20

Device 00 reg A  value =  0

Device 07 reg H  value =  ffff

Device 00 reg A  value =  1

Device 00 reg A  value =  7

Device 00 reg A  value =  0

Device 00 reg A  value =  4

Device 00 reg A  value =  0

QuoteReplyEditDelete

 

 

2010-11-11 16:35:42     Re: AD73322 init sequence

Alexander Buryak (UKRAINE)

Message: 95785   

 

3 cascaded 73322 chips:

 

  blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=42090

Attachments

Outcomes