Audio Input/Output Usage
The Rhino Pi IQ9N provides audio input (MIC, connected through the AEC interface) and audio output (SPK ×2) through the onboard audio module. Under the system, audio devices are exposed as ALSA sound cards, so standard ALSA tools can be used for configuration, playback, and recording tests.
Audio Channel Description
| Channel | Description |
|---|---|
| MIC (AEC interface) | 4Mic Array omnidirectional microphone array, connected through the AEC interface (WAFER-GH1.25-4PLB, signals LINE_LP / LINE_LM / LINE_RP / LINE_RM), supporting wake-up, beamforming noise reduction, echo cancellation, and directional sound pickup |
| SPK ×2 | 2 × 5W speaker output, connector model WAFER-PH2.0-2PWB |
| AEC reference channel | Internal USB2.0 audio channel, used for the echo cancellation reference signal |
The audio module supports 4/6 MIC input and VOIP call noise reduction, and can achieve 5 m long-distance pickup with a recording distance adjustable from 1 to 5 m.
The above are specification values; measured metrics are subject to whole-machine testing.
Viewing Sound Cards and Devices
# View sound cards and device nodes (the onboard sound card is card 0)
aplay -l
arecord -l
cat /proc/asound/cards
# View PipeWire audio devices and routing
wpctl statusThe measured device enumeration results are as follows:
| Item | Name | Description |
|---|---|---|
| Playback device (ALSA) | card 0, device 0 | Onboard playback device, outputting to the 2 × 5W speakers on the SPK interface |
| Recording device (ALSA) | card 0, device 2 | Onboard digital microphone, mono, supporting 8~48 kHz |
| Default output (PipeWire) | pal sink speaker ll | Audio is output to the speaker by default |
| Default input (PipeWire) | pal source handset mic | Recording is taken from the onboard microphone by default |
Note
Audio on the IQ9N is managed uniformly by PipeWire. When using aplay / arecord, do not use -D hw:x,y to occupy the hardware directly, otherwise it will conflict with PipeWire and report Device or resource busy; without -D, the commands automatically go through PipeWire's default input and output.
Volume Configuration
# View the default output device and current volume
wpctl status
wpctl get-volume @DEFAULT_AUDIO_SINK@
# Set the default output volume (0.0 ~ 1.0)
wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.8
# You can also adjust the onboard smart amplifier directly through ALSA (the two channels correspond to the two speakers respectively; valid range 0~180)
amixer -c 0 sget 'aw_dev_0_volume'
amixer -c 0 sset 'aw_dev_0_volume' 80%
amixer -c 0 sset 'aw_dev_1_volume' 80%Playback Test
# Play a wav file (through PipeWire's default output)
aplay test.wav
# Or use the PipeWire playback tool
pw-play test.wavRecording Test
The onboard microphone is mono, so -c 1 must be specified when recording:
# Record a 5-second wav file (through PipeWire's default input)
arecord -f S16_LE -c 1 -r 16000 -d 5 -t wav mic_test.wav
# Or use the PipeWire recording tool (press Ctrl+C to stop)
pw-record --rate 16000 --channels 1 mic_test.wav
# Play back the recording
aplay mic_test.wavSwitching Input/Output Devices
When the system has multiple inputs and outputs (such as the onboard speaker and headphones), you can switch the default device through PipeWire:
# View device names and IDs
wpctl status
# Switch the default device to the specified ID (example)
wpctl set-default 44
# Adjust the default input volume
wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 1.0Notes
- Keep a certain distance between the microphone array and the speakers to avoid howling during pickup.
- When using AEC echo cancellation, make sure the reference signal channel and the recording channel are enabled at the same time.
- Pay attention to power matching when connecting external speakers; the maximum output per channel is 5W.
- Use PH2.0 2Pin specification cables for the audio interfaces; for specific interface definitions, see Interface Definitions and Applications.
- The commands above must be run in a terminal on the AidLux desktop (user
aidlux); under the root environment ofadb shell, PipeWire is unreachable andaplay/arecordreportHost is down.