respeaker / usb_4_mic_array

ReSpeaker 4 Mic Array with builtin VAD, DOA, AEC, Beamforming & NS
https://www.seeedstudio.com/ReSpeaker-Mic-Array-v2.0-p-3053.html
Apache License 2.0
137 stars 64 forks source link

Support playback 16bit or 32bit #46

Open webispy opened 3 years ago

webispy commented 3 years ago

Hi,

I am testing ReSpeaker USB Mic Array v2.0 on a BeableBoneBlack board with QNX OS. Fortunately, the microphone works fine, but playback through the audio jack is not working properly.

Even though I'm not an audio driver expert, when I look at the manuals and below logs, it doesn't seem to work because of 24bit playback. 16bit or 32bit seems to work.

...
[3] audio_update_capabilities(458): audio_update_capabilities: Config = 1, iface = 1, Alt = 1, bSubFrameSize = 3, bBitResolution = 24, bNrChannels =2
...
[3] audio_update_capabilities(458): audio_update_capabilities: Config = 1, iface = 2, Alt = 1, bSubFrameSize = 2, bBitResolution = 16, bNrChannels =6
...
[3] psw_resync_parent_configuration(330): Software Mixer re-config failed (capabilities mismatch)
[3] ado_pcm_sw_mix(4073): Failed to configure PCM software mixer
...

http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.utilities/topic/i/io-audio.html

sw_mixer_sample_size=[16 | 32]
  Specify the sample size for the PCM software mixer to use:
    * 16 — 16-bit signed, native endian.
    * 32 — 32-bit signed, native endian.
  If you do not use this key, the sample size is determined by the sample size the underlying hardware uses:
    * If the hardware is 8- or 16-bit, the mixer uses 16-bit signed, native endian.
    * For 24- or 32-bit hardware, the mixer uses 32-bit signed, native endian.

Is it possible to get the firmware modified to 16bit or 32bit only on the playback side? Or is there a manual for QNX?