[Letux-kernel] Letux/Alpha 400: small progress with sound

Paul Boddie paul at boddie.org.uk
Wed Apr 28 21:39:32 CEST 2021


On Wednesday, 28 April 2021 20:19:15 CEST H. Nikolaus Schaller wrote:
> 
> I have hacked some ioremap() into jz4740_i2s_trigger() to be able to modify
> pinctrl on the fly and read the gpio bits directly.
> 
> There is clock activity on both BITCLK and SYNC obviously coming from the
> codec. And switching to ping function 0x2 makes these pins an output.
> 
> So I think we can rule out codec and pinctrl problems as the main blocking
> point for completely stuck communication. It still may happen that there is
> no sound if we fix that but aplay Front_Center.wav should finish playing
> after ca. 3 seconds.
> 
> There remains only the AC97/I2S driver as the location of the issue.

I would have to look at it properly to have an opinion about it. Is there some 
DMA involvement in this as well?

> I have now checked the register model of jz4730 and jz4740 and there is a
> handful of extra bits for the jz4740. Mainly it is possible to control
> input and output channel which separately and jz4740 can do fancy things
> linke swapping byte order or outputting stereo for mono etc.
> 
> Maybe the driver is setting some register under the wrong assumption that it
> is a jz4740.
> 
> Next, I'll try to dump the AC97 registers in jz4740_i2s_trigger() where
> everything should have been set up properly...
> 
> Modifying code isn't difficult. We already have a DT compatible for
> jz4730-i2s and a ->version field in the device struct. Small differences
> are already handled for jz4760 and jz4770 by this mechanism.

Maybe I should take a closer look. I have been slowly working back towards the 
Minibook in another project of mine, but this has been proceeding rather 
slowly. One thing that will be necessary will be an investigation of DMA 
beyond the simple memory-to-memory transfers that I tested, and that might be 
informative for both the MMC and I2S peripherals.

Paul




More information about the Letux-kernel mailing list