Replies: 1 comment
-
Has this not been implemented yet? Should I study the AudioBufferManager or some other code? Hints are greatly appreciated. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @earlephilhower, et. al.,
Sorry for being so clueless, but I am back at trying to get the PCM1802 going, and the data transferred to a host running Linux. I did some testing via the serial port, and am getting a much higher throughput than I thought I should, so I must not understand the serial UART well enough. If the Linux host is not reading the data from the port and printing it to the screen, I get 137 Mbps. If I connect to a terminal that is printing it to the screen, the rate is 7.9 Mbps, which agrees with the 12 Mbps maximum for USB 1.1, which is what I think the Raspberry Pi Pico has. It must be that when nothing is connected to the UART, the measurements are not right. I was worried that the serial monitor would slow the data because it is printing to the screen, which will not be needed when I am just transferring data to the host's RAM. It certainly looks like the serial monitor does not block, and that neither does the Pico, even though I did not use the void Serial.ignoreFlowControl(bool ignore) function. Here is my code whose purpose is to try and figure out if it is possible to get the audio data over the USB UART:
I would appreciate any comments on this because 6 Mbps and 8 Mbps are pretty close. I could always go back to 48 kHz sampling if needed, but I would really like to understand this.
The thing I need even more than a better understanding of the USB UART is an example using the I2S onReceive() function. It states that it gets fired when data is ready on the I2S, but not to use the read32, etc. because they are all blocking. How do I get the data from the buffers if the read is not allowed? How do I do a non-blocking read for the I2S data? It probably has to do with the buffers, which I still do not fully understand. Why do you specify the number of buffers and the size of each in i2s.setBuffers()? Seeing an example onReceive() callback function would be great. If you provide one, I would love to try it out for you. Even some help understanding how I am supposed to make the onReceive() function would be so appreciated.
Thanks so much!
Beta Was this translation helpful? Give feedback.
All reactions