DSPRelated.com
Forums

controlling AIC23 via McBSP (c6713 DSK)

Started by Fariza Dion Prasetyo October 15, 2007
Hi,

i have a question about controlling AIC23 through McBSP on C6713 DSK.
AIC23 is interfaced with 2 McBSP, one for control and another for data flow.
To use the AIC23, I have to initialize the AIC23 first by writing AIC23 config structure to McBSP port 0,
then we can start data transfer through McBSP port 1.

In my work, I am trying to modify the ti example dsk_app.pjt. I want the dsk behave such if i pressed the DIP switch (void blinkLED()), it will modify the AIC23 control register (i.e increase the volume control register) while the AIC23 is doing data transfer (in this case bypassing audio). Is there any suggestion to do this using mcbsp ?

In my mind, i could do -- after pressing the switch, do stop the data transfer, close all communication, then restart from beginning (i.e re-open mcbsp, configure mcbsp, edma etc, write aic23 config structure, then start bypassing audio). But i don't think this will be the most efficient way.

I am wondering if someone else has done configuring the aic23 control register while it is transferring data.

Thanks a lot

-dion-
Fariza Dion Prasetyo-

> i have a question about controlling AIC23 through McBSP on C6713 DSK.
> AIC23 is interfaced with 2 McBSP, one for control and another for data
> flow.
> To use the AIC23, I have to initialize the AIC23 first by writing AIC23
> config structure to McBSP port 0,
> then we can start data transfer through McBSP port 1.
>
> In my work, I am trying to modify the ti example dsk_app.pjt. I want
> the dsk behave such if i pressed the DIP switch (void blinkLED()), it
> will modify the AIC23 control register (i.e increase the volume control
> register) while the AIC23 is doing data transfer (in this case
> bypassing audio). Is there any suggestion to do this using mcbsp ?
>
> In my mind, i could do -- after pressing the switch, do stop the data
> transfer, close all communication, then restart from beginning (i.e
> re-open mcbsp, configure mcbsp, edma etc, write aic23 config
> structure, then start bypassing audio). But i don't think this will be
> the most efficient way.
>
> I am wondering if someone else has done configuring the aic23 control
> register while it is transferring data.

What you want to do -- update an AIC23 control register on the fly -- is
straightforward and commonly done. If you dig into the DSP source code and the
AIC23B data sheet, you will be able to figure this out. It will take only a small
amount of code, and once you get it working, you will be able to update any AIC23
register.

-Jeff
Hello Dion,

On 10/16/07, Fariza Dion Prasetyo wrote:
>
> yes, that's what i want to do.
> i finally manage to update the aic23 config on the fly.
> this is done by getting the opened mcbsp handle value, then pass this value and aic23 config to mcbsp_write().
>
> i did experiments by changing the value of aic23 config register 2 and 3 (output volume left & right channel), i found after exceeding value 128 the sound is at low level then increasing again. As it exceeds 255, again the sound level becomes low again. It also happens at 383 and 512. Is it because this register 2 & 3 only capable 8 bits value ?

I do not know the specs on the AIC23, but your empirical evidence
indicates that you have 7 bits [0-127] of volume control. You can
verify by checking the datasheet.

mikedunn

> -dion-
>
> ----- Original Message ----
> From: Jeff Brower
> To: Fariza Dion Prasetyo
> Cc: c...
> Sent: Tuesday, October 16, 2007 8:22:26 PM
> Subject: Re: [c6x] controlling AIC23 via McBSP (c6713 DSK)
>
> Fariza Dion Prasetyo-
>
> > i have a question about controlling AIC23 through McBSP on C6713 DSK.
> > AIC23 is interfaced with 2 McBSP, one for control and another for data
> > flow.
> > To use the AIC23, I have to initialize the AIC23 first by writing AIC23
> > config structure to McBSP port 0,
> > then we can start data transfer through McBSP port 1.
> >
> > In my work, I am trying to modify the ti example dsk_app.pjt. I want
> > the dsk behave such if i pressed the DIP switch (void blinkLED()), it
> > will modify the AIC23 control register (i.e increase the volume control
> > register) while the AIC23 is doing data transfer (in this case
> > bypassing audio). Is there any suggestion to do this using mcbsp ?
> >
> > In my mind, i could do -- after pressing the switch, do stop the data
> > transfer, close all communication, then restart from beginning (i.e
> > re-open mcbsp, configure mcbsp, edma etc, write aic23 config
> > structure, then start bypassing audio). But i don't think this will be
> > the most efficient way.
> >
> > I am wondering if someone else has done configuring the aic23 control
> > register while it is transferring data.
>
> What you want to do -- update an AIC23 control register on the fly -- is
> straightforward and commonly done. If you dig into the DSP source code and the
> AIC23B data sheet, you will be able to figure this out. It will take only a small
> amount of code, and once you get it working, you will be able to update any AIC23
> register.
>
> -Jeff
> ________________________________
Looking for a deal? Find great prices on flights and hotels with
Yahoo! FareChase.
>
>
yes, that's what i want to do.
i finally manage to update the aic23 config on the fly.
this is done by getting the opened mcbsp handle value, then pass this value and aic23 config to mcbsp_write().

i did experiments by changing the value of aic23 config register 2 and 3 (output volume left & right channel), i found after exceeding value 128 the sound is at low level then increasing again. As it exceeds 255, again the sound level becomes low again. It also happens at 383 and 512. Is it because this register 2 & 3 only capable 8 bits value ?

-dion-

----- Original Message ----
From: Jeff Brower
To: Fariza Dion Prasetyo
Cc: c...
Sent: Tuesday, October 16, 2007 8:22:26 PM
Subject: Re: [c6x] controlling AIC23 via McBSP (c6713 DSK)
Fariza Dion Prasetyo-

> i have a question about controlling AIC23 through McBSP on C6713 DSK.
> AIC23 is interfaced with 2 McBSP, one for control and another for
data
> flow.
> To use the AIC23, I have to initialize the AIC23 first by writing
AIC23
> config structure to McBSP port 0,
> then we can start data transfer through McBSP port 1.
>
> In my work, I am trying to modify the ti example dsk_app.pjt. I want
> the dsk behave such if i pressed the DIP switch (void blinkLED()), it
> will modify the AIC23 control register (i.e increase the volume
control
> register) while the AIC23 is doing data transfer (in this case
> bypassing audio). Is there any suggestion to do this using mcbsp ?
>
> In my mind, i could do -- after pressing the switch, do stop the data
> transfer, close all communication, then restart from beginning (i.e
> re-open mcbsp, configure mcbsp, edma etc, write aic23 config
> structure, then start bypassing audio). But i don't think this will
be
> the most efficient way.
>
> I am wondering if someone else has done configuring the aic23 control
> register while it is transferring data.

What you want to do -- update an AIC23 control register on the fly --
is
straightforward and commonly done. If you dig into the DSP source code
and the
AIC23B data sheet, you will be able to figure this out. It will take
only a small
amount of code, and once you get it working, you will be able to update
any AIC23
register.

-Jeff

____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
Fariza Dion Prasetyo-
> yes, that's what i want to do.
> i finally manage to update the aic23 config on the fly.
> this is done by getting the opened mcbsp handle value, then pass this value and
> aic23 config to mcbsp_write().
>

Ok that's good work. I'm glad you were able to figure it out.
> i did experiments by changing the value of aic23 config register 2 and 3 (output
> volume left & right channel), i found after exceeding value 128 the sound is at low
> level then increasing again. As it exceeds 255, again the sound level becomes low
> again. It also happens at 383 and 512. Is it because this register 2 & 3 only
> capable 8 bits value ?
>

As Mike pointed out, you have to compare your results with the AIC23B data sheet,
which will tell you exactly the min/max limits on input gain and output volume.

-Jeff
> ----- Original Message ----
> From: Jeff Brower
> To: Fariza Dion Prasetyo
> Cc: c...
> Sent: Tuesday, October 16, 2007 8:22:26 PM
> Subject: Re: [c6x] controlling AIC23 via McBSP (c6713 DSK)
>
> Fariza Dion Prasetyo-
>
> > i have a question about controlling AIC23 through McBSP on C6713 DSK.
> > AIC23 is interfaced with 2 McBSP, one for control and another for data
> > flow.
> > To use the AIC23, I have to initialize the AIC23 first by writing AIC23
> > config structure to McBSP port 0,
> > then we can start data transfer through McBSP port 1.
> >
> > In my work, I am trying to modify the ti example dsk_app.pjt. I want
> > the dsk behave such if i pressed the DIP switch (void blinkLED()), it
> > will modify the AIC23 control register (i.e increase the volume control
> > register) while the AIC23 is doing data transfer (in this case
> > bypassing audio). Is there any suggestion to do this using mcbsp ?
> >
> > In my mind, i could do -- after pressing the switch, do stop the data
> > transfer, close all communication, then restart from beginning (i.e
> > re-open mcbsp, configure mcbsp, edma etc, write aic23 config
> > structure, then start bypassing audio). But i don't think this will be
> > the most efficient way.
> >
> > I am wondering if someone else has done configuring the aic23 control
> > register while it is transferring data.
>
> What you want to do -- update an AIC23 control register on the fly -- is
> straightforward and commonly done. If you dig into the DSP source code and the
> AIC23B data sheet, you will be able to figure this out. It will take only a small
> amount of code, and once you get it working, you will be able to update any AIC23
> register.
>
> -Jeff
>