Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 36216

Re: ADAU1761 Linux Device Driver for kernel v3.8

$
0
0

I've taken the ADI audio_zynq branch and used that as a base for getting audio working on the zed board with our fpga bit stream. I had to make a couple of changes to the spi-xilinx-ps.c to get valid SPI transactions working correctly. Made a couple of changes to our DTS and now I have ALSA able to register the adau1761 sound card when the kernel boots. That is farther then I got before with the v3.8 kernel.

 

I also needed to make the following tweaks

  • adi/zed_adau1761.c: set the MCLK to 20MHz as that is what our bit stream is generating.
  • adau17x1.c: Hard coded values (X=2, R=4, N=572, M=625) for the PLL config register
  • Disabled REGMAP cache so I can see SPI reads with scope to verify reads work.

 

When I attempt to play a sound with:

  • aplay -D plughw:0,0 /usr/share/sounds/alsa/Noise.wav

I do not get any output from the headphone or line out jacks.

 

I can see data on the BCLK, LRCLK and DAC_SDATA lines using a scope.

 

I can see valid register accesses on the SPI bus using a scope.

 

For a sanity check, I ran the ADI reference kernel (2013-12-12) to verify sound output and to have a look at the expected signals on BCLK, LRCLK and DAC_SDATA (pretty much the same as I saw with the audio_zynq kernel). I captured some I2C data with my scope for comparison with my SPI captures. I noticed the following:

  • I2C: The PLL control register is only written to at boot time, not written to when I run aplay.
  • SPI: The PLL control reigster is not written to at boot time, It is written to when starting aplay and after aplay exits.
  • The registers accessed by the I2C kernel (3.12:adi ref) and the SPI kernel (3.10:audio_zynq) don't seem to match.

I've attached a spreadsheet (libre-office calc format) that has the data I captured with the scope and my current DTS file and kernel config.

 

Any ideas where to dig next?


Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>