meta data for this page
The pinephone has a sophisticated audio system controllable using ALSA. This is to facilitate certain complex features such as routing the audio input and output to the modem during phone calls. Look here for more details and the schematics. https://xnux.eu/devices/feature/audio-pp.html
Most of the low-level audio tweaks can be done at the ALSA level. In particular, alsamixer is really useful and can be installed with
$ sudo apt install alsa-utils
It is confusing sometimes the different layers to audio in Linux. There is ALSA, pulse audio and devices drivers. A very simple explanation is that modern sound devices have fairly complex internal circuitry, both analog and digital. This circuitry can be controlled through the device driver using I2S to do things like adjust levels, turn on/off switches, mute and capture. ALSA allows the hardware to be controlled at the software level with the help of the device drivers. There is a tool called alsamixer that can be used to manually made adjustments to the sound devices.
At a higher level there is pulse audio, which sits at the software level. Most user applications interface with it.
TBD: document some of the different sound devices to give an idea of what they do.
Sound can be recorded once the gain and capture is set for certain devices in the alsamixer tool. Toggle capture using the spacebar. Gain can be adjusted using the up/down arrow keys.
- Mic1 (Gain: 3dB: Capture: ON)
- Mic1 Boost (Gain: 36dB)
- ADC (Gain: 0dB)
- ADC Gain (Gain: 0dB)
- AIF1 AD0 (Gain: 0dB)
- AIF1 AD0 Mixer ADC (Capture: ON)
You should now be able to make a sound recording using the arecord tool:
A user contributed call-recorder has been hacked together. Consider it alpha-stage and targeted to hackers. Besides being a good proof-of-concept of what is possible, it nicely demonstrates how to act upon active call changes. (ie start doing something during a call) This could serve as a useful template to e.g. stop music players etc…