• Content Count

  • Joined

  • Last visited

About nikkov

  • Rank

Recent Profile Visitors

858 profile views
  1. I'm confused, and I can't found source of problem. It's look like performance related issue, but I don't see any simptoms like high CPU loading. aplay is working fine, but mpd whith same file sometime working tens minutes fine, but sometime long time gets regulary underruns with constant period 11 second which one is independent of the sampling rate. Restarting mpd can sometimes solve the problem, sometimes not. This behaviour repeated on all audio devices - codec, spdif and i2s. I use many years old armbian version (with kernel 3.4.112) without any issue, but found it with new kernel. C
  2. Hi, I'm working with mpd on armbian 20.02.0 with i2s device and found some problem: periodically sound is interrupted. I enable verbose logging in mpd and I get message: May 20 04:36 : alsa_output: Underrun on ALSA device "hw:0,0" May 20 04:36 : alsa_output: Underrun on ALSA device "hw:0,0" May 20 04:37 : alsa_output: Underrun on ALSA device "hw:0,0" This is not permanent and some time maybe work fine, but if it starts, messages go with an interval of 10-11 seconds until I restart mpd. I rebuilt armbian with enabled ALSA debug options CONFIG_SND_PCM_XRUN_DEBUG, CONFIG_S
  3. I made some investigation and found that unstable phase is a consequence of sigma-delta modulation for audio PLL from this commit Sigma-delta modulation make more exact frequency but it leads variable phase of clocks. This means that with the kernel> 4.15 some codecs will not work, as they will not be able to synchronize with the clocks. My PCM5102A may work only with 48k, but not higher
  4. Hi, I try working with i2s driver on last armbian (5.99 kernel 4.19.84) with nanopi neo and found trouble with I2S clock - it has very excessive jitter (see attached screen from my oscilloscope). I use small dts overlay for enable i2s and mainline i2s code without changes and with changes from codekipper, nanopi neo and neo 2 with same result, but old armbian image 5.65 (4.14.17) working without problem. I also found a mention of a similar problem on forum volumio sun8i-h3-i2s0.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-
  5. I checked your wip i2s driver code with my hardware and simple codec driver for my clock board. In function sun4i_i2s_set_clk_rate calculates lrck value as (clk_rate / rate / oversample_rate)*word_size and we have, eg (22579200 / 44100 / 128) * 16 = 64 of BCLKs within each channel. But in stereo i2s mode lrck value must be equal slot width. In stable version lrck fixed and equal 32. After I replace calculated value lrck to fixed 32 I successfully played 16/24 bit sample.
  6. Yes, I found this values in A20 user manual. But it's related only for master mode i2s which clocked by PLL, and can't used for external clock and slave mode bus. So we must check oversample value only for master mode!
  7. Yes, your debug output I see in kernel.log For full-fledged testing, I need to add a codec driver to specify the hardware modes for my clocks board: i2s mode; 32 bit frame size independents from sample size; divider for BCLK/LRCLK driven by GPIO. I'll try made this in near time.
  8. Quick info about testing. - nanopi neo - armbian image builded from github sources - i2s module by codekipper - overlay from codekipper's post (but simple-audio-card,mclk-fs = <128>). Because my clock board without pins control works on 176400 all test with this sample rate: aplay -c 2 -f S16_LE -r 176400 /dev/urandom - working and I see some data on dout pin aplay -c 2 -f S24_LE -r 176400 /dev/urandom - aplay: pcm_write:2011: write error: Input/output error aplay -c 2 -f S32_LE -r 176400 /dev/urandom - no error and zero data on dout pin
  9. OK, I'll built fresh armbian image for nanopi neo and can check your code. One question: why oversample rates started with 128 but not 64 (32 bit frame) or 32 (16 bit frame)?
  10. Thank you for information. I only now began to understand mainline driver. I have some hardware (cubietruck, nanopi neo and nanopi neo 2), clocks board (schematic attached) and simple logic analyzer. I can try testing your modification. neoclock - Project.pdf
  11. Slave mode assume that externals source of the bit- and lr-clocks controls by driver, but I can't saw where is it. And as I see mainline driver support only 16 bit sample. I worked with friendlyarm's variant because it was most complete. Now I want modify mainline driver for support 16/24 bit master/slave and test it on nanopi neo (2, air) and cubietruck.
  12. If you want get just play function, you can use my Volumio image for NanoPi-Neo. But unfortunately I now don't have experience with overlays now
  13. Not related to armbian, but I made some work with friendlyarm kernel 4.11.2 for support i2s driver for h3/h5 with support 16/24 bit master/slave mode i2s (link) and build Volumio image for nanopi neo (link). In future I want to get same in mainline kernel.
  14. In my latest patch fixed issue when change the track or seeking in the track only. I don't use SPDIF and I don't know exists this issue in original linux-sunxi sources or not. I have found swapping channels when recording, but I can't fix it yet.