[alsa-devel] ASoC: at91sam9260-PCM1808/TAS5709-based board driver

Jon Smirl jonsmirl at gmail.com
Tue Aug 11 20:51:19 CEST 2009


On Tue, Aug 11, 2009 at 2:41 PM, Pedro I. Sanchez<psanchez at fosstel.com> wrote:
> Thank you John for the sample code. It's going to be very useful specially
> when I get to the TAS5709 part and the I2C interface.

I attached a TAS5504 driver. It plays music. You need to use a custom
app to manipulate the rest of the registers.

TAS chips have a complicated variable length register scheme that is
hard to cache.


> My next question is with regards to clocking on the SSC interface. The
> PCM1808 in my board has a pretty straight forward connection as follows:
>
> SSC-I/F     PCM1808     Comment
>  RF  ---->   LRCK      Frame clock
>  RK  ---->   BCK       Bit clock
>  RD  <----   DOUT      Digital data
>
> The PCM1808 is hardwired to be in slave mode. The two clock lines are
> expected to be provided by the SoC's SSC interface.
>
> I have the following code in my machine driver to request the SSC interface
> and bind the PCM1808 to it:
>
>        /*
>         * Request SSC device
>         */
>        ssc = ssc_request(0);
>        if (IS_ERR(ssc)) {
>                printk(KERN_ERR "ASoC: Failed to request SSC 0\n");
>                ret = PTR_ERR(ssc);
>                ssc = NULL;
>                goto err_ssc;
>        }
>        ssc_p->ssc = ssc;
>
> What I need to do now is to set the SSC's clock divider to feed the PCM1808
> with the proper clocking. So these are my next questions:
>
> 1. How do I specify in the machine driver that my pcm1808 is hardwired to
> slave mode and that I need bit/frame clocks to be provided by the SSC
> interface?
>
> 2. How do I set the SSC's clock divider to provide the right clock signals?
>
> Thanks again,
>
> --
> Pedro
>
>
> Jon Smirl wrote:
>>
>> On Sun, Aug 9, 2009 at 9:35 AM, Jon Smirl<jonsmirl at gmail.com> wrote:
>>>
>>> On Sat, Aug 8, 2009 at 1:39 PM, Pedro Sanchez<psanchez at fosstel.com>
>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I have to develop a driver for a custom board based on the at91sam9260
>>>> with
>>>> a PCM1808/TAS5709 chipset combo. I am addressing the PCM1808 first
>>>> because
>>>> it is a simpler device. Since I'm new to ASoC I'm looking for some help
>>>> in
>>>> this list on how to go about writing this driver.
>>>
>>> I attached a PCM1690 driver I'm currently working on.
>>
>> The attached fabric driver show how to use it.
>>
>>>
>>>> So far I have identified two files that I need to work on (other than
>>>> the
>>>> needed kconfig modifications). First is the codec driver at
>>>> sound/soc/codecs/PCM1808.[c|h] which is based on the existent pcm3008
>>>> driver; I believe I'm fine with this.
>>>>
>>>> The second file is the machine driver at sound/soc/atmel/myBoard.c. I'm
>>>> using sam9g20_wm8731.c as reference, on which I believe I found a typo
>>>> which
>>>> I reported in a separated e-mail.
>>>>
>>>> So my first question is, is this two-files step the right approach? am I
>>>> in
>>>> the right track? I'm using the 2.6.30 kernel.
>>>>
>>>> Other questions will come and I hope I will get some cycles from you to
>>>> help
>>>> me direct my work. Of course I'll be glad to submit my driver work for
>>>> inclusion in the kernel if it proves useful.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Pedro
>>>>
>>>>
>>>> _______________________________________________
>>>> Alsa-devel mailing list
>>>> Alsa-devel at alsa-project.org
>>>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>>>
>>>>
>>>
>>>
>>> --
>>> Jon Smirl
>>> jonsmirl at gmail.com
>>>
>>
>>
>>
>
>



-- 
Jon Smirl
jonsmirl at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tas5504.c
Type: text/x-csrc
Size: 26815 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090811/c913e910/attachment-0001.c 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tas5504.h
Type: text/x-chdr
Size: 6375 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090811/c913e910/attachment-0001.h 


More information about the Alsa-devel mailing list