[Gta04-owner] first tries with si4721

Dr. H. Nikolaus Schaller hns at goldelico.com
Mon Feb 20 19:19:05 CET 2012

Am 18.02.2012 um 23:14 schrieb Andreas Kemnade:

> Hi,
> On Sat, 11 Feb 2012 13:34:35 +0100
> Andreas Kemnade <andreas at kemnade.info> wrote:
>> Hi,
>> On Fri, 2012-02-10 at 09:10 +0100, Dr. H. Nikolaus Schaller wrote:
>>> Am 09.02.2012 um 22:30 schrieb Andreas Kemnade:
>>>> Hi,
>>>> I played a bit with the si4721 from userspace using /dev/i2c-2. According
>>>> to SNR/RSSI values it seems to find something.
>>>> Now I am wondering how I can hear that.
>>>> In 2.6.32 arecord -l does not list a gta04fm pcm
>>>> aplay -l does
>>>> What needs to be done there? That's not a part of the kernel
>>>> I know well. Is the clock really from the si4721? 
>>> Well, the ALSA driver is just a stub that compiles and presents
>>> some more or less useful interface.
>>> The driver for the PCM interface to the Si47xx is here
>>> 	https://github.com/goldelico/gta04-kernel/blob/hw-validation/sound/soc/omap/gta04-fm.c
>>> And the ALSA driver here:
>>> 	https://github.com/goldelico/gta04-kernel/blob/hw-validation/sound/soc/codecs/si47xx.c
>> I have already seen these files but I have not understood why I have no
>> capture interface. After learning a lot about the alsa code, I finally
>> understand something more and after some sleep I found this nonsense:
>> (from si47xx.c)
>> 	.playback = {
>> 		.stream_name = "Capture",
> I hope nobody regards this comment as being offensive
>> I guess now I understand why I have no capture interface. That has taken
>> a lot of time to understand that simple think.
> Which attached patch I could create a capture interface.

Yes, this sounds reasonable. John helped me to make it work at all
and this included some copy&paste. And we just made the Si47xx driver
a stub (based on the gtm601 code).

>>> They do not initialize much more than the McBSP link.
>>> And they do not define amixer capabilities like recording or play back volume etc.
>>>> I understand the datasheet so that the clock comes from host.
>>> If I remember correctly, this is a parameter of the McBSP interface
>>> and can be defined in the gta04-fm.c source where the setup of
>>> the DAI link is done.
>> I try to get the DAI link working now as a first step.
> I put the commented line in gta04-voice.c to enable the clock 
> (never use this with a gtm601 installed or so) into gta04-fm.c 
> But arecord does not give any data. If the clock is correctly initalized,
> I should at least get some random bits regardless of the configuration of the
> si4721 chip. But I do not get anything. 
> Has there something to be in the startup and shutdown functions in gtk04-fm.c?
> It seems that someone has tried to get a clock out to a not installed gtm601
> so someone here should know how to do that, if not I guess I have to go deeper
> into the SoC manual.

Well, the GTM601 is defined to be the master and provide clock. But only after
a successful voice call has been setup.

I think I tried the other way round to check if the interface code is doing
something at all. And it may have been forgotten to remove after it worked.
Or to leave it as a reminder for use in the other drivers :)

> I have attached the patch I tried (against hw validation kernel, tried also
> similar things against 3.2).
> here is the userspace  quickhack 
> http://misc.andi.de1.cc/si4721.c
> To use it, any kernel driver has to be unbound from the i2c-device
> ( echo 2-0011 >unbind in the driver directory) Of course it should go
> into the kernel at later time.
> Greetings
> Andreas Kemnade
> <clk.diff>_______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo/gta04-owner

More information about the Gta04-owner mailing list