Code Monkey home page Code Monkey logo

Comments (6)

franzflasch avatar franzflasch commented on September 26, 2024

Hi Sergios!

Your changes look good so far. I've never tested the recording with the ar9331, so I cannot guarantee, that the setup is correct.

Which pin are you using for recording? It should be GPIO22 on the ar9331.

Please also check the i2s lines with an oscilloscope, check especially if the master clock and the input data lines are OK.

from ar9331-i2s-alsa.

ondonadas avatar ondonadas commented on September 26, 2024

Thanks Franz

You're right, I'm already using GPIO22 and the oscilloscope shows right values:
MCK=11.28MHz
CK=1.41MHz
WS=44.1KHz
BTW, the I2S input it is not showing any activity (always 0), but as far I know, this may be due to some switch/I2C in the codec, I guess that this has no influence in the overrun errors...

As far I understand it may be related to DMA interruption or so.

from ar9331-i2s-alsa.

franzflasch avatar franzflasch commented on September 26, 2024

Yes it is possible that there is something wrong in the RX path of the driver.

Could you please also try to do the following:

arecord -f cd /tmp/test.wav

Maybe the overrun errors are occuring because the data cannot be streamed as fast as the DMA is producing them.

from ar9331-i2s-alsa.

ondonadas avatar ondonadas commented on September 26, 2024

ummm! I've made a test a seems to work (but I don't understand your argumentation).

Let me activate the codec input in order to get I2S_DATA_IN working... I'll be back in a moment (I hope)

from ar9331-i2s-alsa.

franzflasch avatar franzflasch commented on September 26, 2024

That's great! That means the alsa driver is OK, also with recording.

I can explain the issue if you want:

when you do "arecord -f cd" the output will be streamed to stdout. However if stdout is too slow to print the data, the DMA on the receive side will run into a buffer overflow. The same issue could also occure if you record to the SPI flash, which is also not very fast.

When recording to /tmp the data will be streamed directly into the RAM and this is the fastest memory you have on the ar9331.

Regards,
Franz

from ar9331-i2s-alsa.

ondonadas avatar ondonadas commented on September 26, 2024

Hi Franz

Thank you for your explanation. It makes sense

Sergio

from ar9331-i2s-alsa.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.