<div dir="ltr">Hello Denis,<div><br></div><div>I believe there is a misunderstanding, I do not intend to run PA on the ESP32.</div><div><br></div><div>I want to build a wifi headphone with microphone that connects with PA native or simple protocol. (module-native-protocol-tcp)</div><div><br></div><div>The chip has two stereo I2S busses (the variant I have called ESP32-A1S has audio ADC/DAC on board)</div><div><br></div><div>So for the microphone I would sample at 44khz 16 bit one channel, take the incoming PCM, compress using esp-libopus into 15 millisecond frames at 256kbit/s complexity 1 and send that via PA native tcp protocol.</div><div><br></div><div>It is unclear if PA can receive opus compressed audio from the network. It is not listed in <a href="https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SupportedAudioFormats/">https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SupportedAudioFormats/</a></div><div>If not possible, then whatever the next best thing is to keep frame size low (and make wifi jitter irrelevant, final design will probably use 802.11ax and ideal RF environment conditions)</div><div><br></div><div>For the speakers, I hope to tell PA to start sending data to my device over the network, again in whatever the best low latency lossy compression is available.</div><div><br></div><div>The hope is not to exceed 100ms total latency including all the buffers.</div><div><br></div><div>The ESP32 barely has enough cpu power to do all this, so Plan B is to use a Raspberry Pi Pico (RP 2040 chip) for the sole purpose of compression of the microphone audio.</div><div>Or to run two ESP32, one just for the microphone and one just for the speakers.</div><div><br></div><div>Regarding opus support in PA (It is unclear if it is supported, supported through gstreamer or not supported at all, obviously PCM is highly inefficient over network and probably unusable over wifi without ginormous buffers)</div><div><a href="https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/483">https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/483</a><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 3, 2021 at 6:04 PM Denis Shulyaka <<a href="mailto:shulyaka@gmail.com">shulyaka@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Hi JF,</div><div dir="auto"><br></div><div dir="auto">PA relies on ALSA drivers for the sound cards, including I²S, so unless you have a Linux port on this chip, there's a lot of work. Also, active noise cancelation is easier said than done.</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto">Denis Shulyaka<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">сб, 4 сент. 2021 г., 00:03 JF <<a href="mailto:pulseaudio@domn.net" target="_blank">pulseaudio@domn.net</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I would like to know if anyone has ever tried to interface pulseaudio with an ESP32 chip ?</div><div><br></div><div>This extremely popular 3$ chip has ethernet, wifi 802.11n and bluetooth 4.2+BLE capabilities as well as a pair DMA capable I²S bus capable of operation is both master or slave modes. </div><div><br></div><div>This is on of the most popular chip currently in use by Arduino IDE users, making it extremely accessible for hobbyist use.</div><div><br></div><div>Infomation regarding the I2s programming interface</div><div><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/i2s.html" rel="noreferrer" target="_blank">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/i2s.html</a><br></div><div><br></div><div>More information about this chip</div><div><a href="https://en.wikipedia.org/wiki/ESP32" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/ESP32</a><br></div><div><br></div><div>A variant of this chip called the ESP32-A1S, comes with on board audios ADC/DACs ? </div><div>Although the details are not clear about this one for me. It is a audio-centric variant.</div><div><a href="https://docs.ai-thinker.com/en/esp32-a1s" rel="noreferrer" target="_blank">https://docs.ai-thinker.com/en/esp32-a1s</a><br></div><div><a href="https://github.com/donny681/esp-adf" rel="noreferrer" target="_blank">https://github.com/donny681/esp-adf</a><br></div><div><br></div><div>I've been a subscribe to this mailing list for a while but I have not yet spotted discussion of this chip. I am under the impression that this chip could be the ideal hobbyist pulseaudio platform. </div><div><br></div><div>(My intention is to create 3d printed wifi gaming headest with DSP capability and active noise cancellation. I know the doc says wifi's not good enough for audio, but I want to try it out for myself, especially with the latest 802.11ax standard) </div><div><br></div><div>Thanks !</div></div>
</blockquote></div></div></div>
</blockquote></div>