[Gta04-owner] first tries with si4721

Andreas Kemnade andreas at kemnade.info
Sat Feb 18 23:14:28 CET 2012


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.

> > 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.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clk.diff
Type: text/x-patch
Size: 1362 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120218/99ae3d6b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120218/99ae3d6b/attachment-0001.bin>


More information about the Gta04-owner mailing list