Librem5 issueshttps://source.puri.sm/groups/Librem5/-/issues2023-02-10T01:43:13Zhttps://source.puri.sm/Librem5/linux/-/issues/463wm8962: Errors on system suspend2023-02-10T01:43:13ZSebastian Krzyszkowiakwm8962: Errors on system suspendWhen the audio device is active (for example because runtime suspend hasn't yet kicked in after the last time a sound was played), this gets logged in dmesg on system suspend:
```
[ 654.238567] wm8962 2-001a: ASoC: error at soc_componen...When the audio device is active (for example because runtime suspend hasn't yet kicked in after the last time a sound was played), this gets logged in dmesg on system suspend:
```
[ 654.238567] wm8962 2-001a: ASoC: error at soc_component_read_no_lock on wm8962.2-001a for register: [0x00000004] -16
[ 654.238596] wm8962 2-001a: Failed to read DSPCLK: -16
[ 654.238651] wm8962 2-001a: Failed to resume device: -13
[ 654.238659] wm8962 2-001a: ASoC: POST_PMD: TEMP_SPK event failed: -13
```
Sometimes there's also a loud pop coming from the speaker.https://source.puri.sm/Librem5/linux/-/issues/401external analog microphone volume is clipped at 50%2022-03-30T22:10:30ZMartin Kepplingerexternal analog microphone volume is clipped at 50%the amixer settings we do for the external mic are https://source.puri.sm/Librem5/librem5-base/-/blob/pureos/byzantium/default/audio/ucm2/simple-card/HiFi.conf#L151
In g-c-c audio settings one can already see that no matter how loud the...the amixer settings we do for the external mic are https://source.puri.sm/Librem5/librem5-base/-/blob/pureos/byzantium/default/audio/ucm2/simple-card/HiFi.conf#L151
In g-c-c audio settings one can already see that no matter how loud the signal should be (by tapping onto the mic itself for example) the recorded signal never exceedss 50% of the scale.
Not yet sure whether it's a kernel or config bug.
After this is fixed we can think about bumping the gain another 3 or 6 dB in case it's too quiet still.https://source.puri.sm/Librem5/linux/-/issues/394wm8962: support detecting an external analogue microphone2022-03-14T17:02:07ZMartin Kepplingerwm8962: support detecting an external analogue microphoneWe currently only detect headphones, not the mic (in case of a headset). So our ucm profile that makes the headset mic available is wrong because it listens to the headphones jack, not whether a MIC is available (IN3R is grounded, see ht...We currently only detect headphones, not the mic (in case of a headset). So our ucm profile that makes the headset mic available is wrong because it listens to the headphones jack, not whether a MIC is available (IN3R is grounded, see https://source.puri.sm/Librem5/linux-next/-/issues/5#note_111192 )https://source.puri.sm/Librem5/OS-issues/-/issues/234during phone call the other side hears an echo of herself when the L5 side is...2021-12-07T08:34:41ZMartin Kepplingerduring phone call the other side hears an echo of herself when the L5 side is talking simultaniously (when "interrupting")you could argue the L5 highlight bad habits and enforces a conversation exercise to listen to your partner until she finishes, but noises can still happen by accident while the other party is talking :)
and exactly in this case, the oth...you could argue the L5 highlight bad habits and enforces a conversation exercise to listen to your partner until she finishes, but noises can still happen by accident while the other party is talking :)
and exactly in this case, the other party suddenly starts to hear an echo of herself. It ends again when the other party is talking alone again.
So that indicates that our echo cancellation works but shows hour tricky that can become. When the signal on the mic is not obviously similar to what is received, echo cancellation currently fails.https://source.puri.sm/Librem5/OS-issues/-/issues/233new message audio notification too loud during a phone call2021-12-07T08:28:00ZMartin Kepplingernew message audio notification too loud during a phone callwhen receiving a message in chatty while talking on the phone, the notification can be disturbingly loud for the ear.when receiving a message in chatty while talking on the phone, the notification can be disturbingly loud for the ear.https://source.puri.sm/Librem5/linux/-/issues/270wm8962: Loud pop at the beginning of audio stream2022-03-31T05:12:04ZSebastian Krzyszkowiakwm8962: Loud pop at the beginning of audio streamWhen starting to record from the microphones, there's a loud pop at the very beginning of the stream:
![pop](/uploads/6ce3b126d710d17fe7101f6050694b7e/pop.wav)
I've seen it tripping some automatic gain control algorithms already.When starting to record from the microphones, there's a loud pop at the very beginning of the stream:
![pop](/uploads/6ce3b126d710d17fe7101f6050694b7e/pop.wav)
I've seen it tripping some automatic gain control algorithms already.https://source.puri.sm/Librem5/librem5-base/-/issues/38Set correct BM818 audio channel mapping2020-11-01T21:42:34ZSebastian KrzyszkowiakSet correct BM818 audio channel mappingAlthough BM818 consumes stereo audio stream, it appears that it randomly decides which channel it's going to use for the call.
This has burned me a few times when configuring echo cancellation. It would be nice to set channel mapping in...Although BM818 consumes stereo audio stream, it appears that it randomly decides which channel it's going to use for the call.
This has burned me a few times when configuring echo cancellation. It would be nice to set channel mapping in ALSA/PulseAudio so both output channels are treated as mono channels and contain the same downmixed content.https://source.puri.sm/Librem5/OS-issues/-/issues/166Headphone not detected when plugged2020-09-30T16:28:05ZGuido GuntherHeadphone not detected when pluggedwhen the headphone is plugged in during boot or when restarting pa output doesn't default to the headphone but to handset - i'd expect it to use headphone too.when the headphone is plugged in during boot or when restarting pa output doesn't default to the headphone but to handset - i'd expect it to use headphone too.https://source.puri.sm/Librem5/linux/-/issues/228redpine: HSP Bluetooth profile doesn't work (only noise is produced)2021-10-12T18:54:20ZSebastian Krzyszkowiakredpine: HSP Bluetooth profile doesn't work (only noise is produced)While A2DP audio profile works well, switching to HSP profile leads to just an awful noise being played from the Bluetooth speaker.
On this recording, I have switched from A2DP profile to HSP, using Bluez 5.50 and PulseAudio 13.0:
![red...While A2DP audio profile works well, switching to HSP profile leads to just an awful noise being played from the Bluetooth speaker.
On this recording, I have switched from A2DP profile to HSP, using Bluez 5.50 and PulseAudio 13.0:
![redpine.wav](/uploads/34c037c051eeea9133798629a8396c2a/redpine.wav)
You can hear there that when I paused the audio for a brief moment (around 11-12 sec mark), there was less noise coming out from the speaker (although some noise was still there even though nothing was playing). At the end I tried to switch back to A2DP, but it didn't work.
I have tried the latest driver/firmware combo from https://github.com/SiliconLabs/RS911X-nLink-OSD/tree/release/RS911X.NB0.NL.GNU.LNX.2.0.RC6 and the issue still happens there (in fact that's what I used to create recording above).
/cc @srinivashttps://source.puri.sm/Librem5/gnome-control-center/-/issues/118hide modem devices in sound tab2020-11-10T14:41:09ZGuido Guntherhide modem devices in sound tabWe likely want to do that at a lower level but we shouldn't show the channels presented by the modems since it confuses users.We likely want to do that at a lower level but we shouldn't show the channels presented by the modems since it confuses users.https://source.puri.sm/Librem5/linux/-/issues/173PipeWire does not write properly to the wm89622020-03-06T05:20:54ZBob HamPipeWire does not write properly to the wm8962PipeWire has problems writing data to the wm8962 on the phone. This issue is created in the linux-next project because it is *assumed* the problem is in the kernel driver but that may not be the case. The following steps will reproduce...PipeWire has problems writing data to the wm8962 on the phone. This issue is created in the linux-next project because it is *assumed* the problem is in the kernel driver but that may not be the case. The following steps will reproduce the problem:
```
# Shut pulseaudio off
systemctl --user mask pulseaudio.socket pulseaudio.service
systemctl --user stop pulseaudio.socket pulseaudio.service
# Install dependencies
sudo apt build-dep pipewire
sudo apt install libjack-jackd2-dev
# Build pipewire
git clone -b 0.3.0 https://gitlab.freedesktop.org/pipewire/pipewire.git
meson -Dvulkan=false -Dbluez5=false pipewire-build pipewire
cd pipewire-build
ninja
# Run pipewire from the build directory
PIPEWIRE_DEBUG=5 make run
# In another terminal, run paplay
cd pipewire-build
make shell
paplay /usr/share/sounds/librem5/stereo/phone-incoming-call.oga
# If you hear sound, stop paplay and restart it
# Witness something like the following in the first terminal
[T][000007645.668921][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7645617422513 7645617356931 65582 1024 11236
[T][000007645.668961][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007645.882172][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7645830673176 7645830106931 566245 1024 11236
[T][000007645.882208][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007646.094417][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7646042917526 7646042856931 60595 1024 11236
[T][000007646.094454][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007646.307208][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7646255700432 7646255606931 93501 1024 11236
[T][000007646.307265][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007646.519941][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7646468438098 7646468356931 81167 1024 11236
[T][000007646.519978][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007646.733195][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7646681690321 7646681106931 583390 1024 11236
[T][000007646.733231][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007646.945942][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7646894436267 7646893856931 579336 1024 11236
[T][000007646.945978][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007647.158227][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7647106709656 7647106606931 102725 1024 11236
[T][000007647.158295][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007647.371496][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7647319977359 7647319356931 620428 1024 11236
[T][000007647.371596][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007647.583779][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7647532254108 7647532106931 147177 1024 11236
[T][000007647.583879][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007647.796482][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7647744961534 7647744856931 104603 1024 11236
[T][000007647.796549][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
[T][000007648.009253][alsa-pcm.c:1097 alsa_on_timeout_event()] alsa-pcm 0xaaab005558a8: timeout 11236 1024 7647957730160 7647957606931 123229 1024 11236
[T][000007648.009319][alsa-pcm.c:1013 handle_play()] alsa-pcm 0xaaab005558a8: early wakeup 11236 1024
```
Here are logs of the daemon both failing as above and a log of one instance of writing correctly:
[pw.log-non-working](/uploads/88d58f5a33260b0009946d56166d3432/pw.log-non-working)
[pw.log-working](/uploads/c9ea121d4e35dc560e035d608185e612/pw.log-working)
This important grepped section of the non-working log shows the activity in alsa-pcm.c prior to failing:
```
[D][000000174.725632][alsa-pcm.c:1184 spa_alsa_start()] alsa-pcm 0xaaaaf31984c8: start 1024 duration:1024 rate:48000 slave:0 match:0
[T][000000174.726083][alsa-pcm.c:770 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: begin 0 131072 1024 2048
[T][000000174.726103][alsa-pcm.c:830 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: silence 2048
[T][000000174.726127][alsa-pcm.c:836 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: commit 0 2048 0
[T][000000174.726152][alsa-pcm.c:852 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: snd_pcm_start 2048
[T][000000174.726851][alsa-pcm.c:622 get_status()] alsa-pcm 0xaaaaf31984c8: avail: 129024, matching: 0
[T][000000174.726879][alsa-pcm.c:1101 alsa_on_timeout_event()] alsa-pcm 0xaaaaf31984c8: timeout 2048 1024 174693849576 174693223536 626040 1024 2048
[T][000000174.726915][alsa-pcm.c:716 update_time()] alsa-pcm 0xaaaaf31984c8: slave:0 174693223536 0.997804 2048 1024.000000 1021.751115 1024
[T][000000174.726934][alsa-pcm.c:1028 handle_play()] alsa-pcm 0xaaaaf31984c8: 0
[T][000000174.747828][alsa-pcm.c:622 get_status()] alsa-pcm 0xaaaaf31984c8: avail: 129024, matching: 0
[T][000000174.747853][alsa-pcm.c:1101 alsa_on_timeout_event()] alsa-pcm 0xaaaaf31984c8: timeout 2048 1024 174714823665 174714603824 219841 1024 2048
[T][000000174.747897][alsa-pcm.c:716 update_time()] alsa-pcm 0xaaaaf31984c8: slave:0 174714603824 0.994662 2048 1024.000000 1018.534358 1024
[T][000000174.747954][alsa-pcm.c:1028 handle_play()] alsa-pcm 0xaaaaf31984c8: 1
[T][000000174.749834][alsa-pcm.c:770 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: begin 2048 129024 1024 0
[T][000000174.749849][alsa-pcm.c:814 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: reuse buffer 0
[T][000000174.749876][alsa-pcm.c:836 spa_alsa_write()] alsa-pcm 0xaaaaf31984c8: commit 2048 996 2048
[T][000000174.769160][alsa-pcm.c:622 get_status()] alsa-pcm 0xaaaaf31984c8: avail: 128028, matching: 0
[T][000000174.769195][alsa-pcm.c:1101 alsa_on_timeout_event()] alsa-pcm 0xaaaaf31984c8: timeout 3044 1024 174736163754 174736051635 112119 1024 3044
[T][000000174.769219][alsa-pcm.c:1017 handle_play()] alsa-pcm 0xaaaaf31984c8: early wakeup 3044 1024
[T][000000174.811237][alsa-pcm.c:622 get_status()] alsa-pcm 0xaaaaf31984c8: avail: 128028, matching: 0
[T][000000174.811262][alsa-pcm.c:1101 alsa_on_timeout_event()] alsa-pcm 0xaaaaf31984c8: timeout 3044 1024 174778232653 174778134968 97685 1024 3044
[T][000000174.811323][alsa-pcm.c:1017 handle_play()] alsa-pcm 0xaaaaf31984c8: early wakeup 3044 1024
[T][000000174.853295][alsa-pcm.c:622 get_status()] alsa-pcm 0xaaaaf31984c8: avail: 128028, matching: 0
```
Here are some abridged logs of the `#pipewire` IRC channel discussing the issue:
15:26 <@wtay> rah, aplay works differently
15:27 < rah> wtay: how so?
15:28 <@wtay> rah, pipewire uses a timer and precise timing info from the driver to write samples. aplay uses the device interrupt
15:28 < panto> it is very common for platforms to have busted dma/timer drivers
15:29 < panto> it's like 99% of the problems that people have with pulseaudio which defaults to using timer interrupts
...
14:19 < rah> I can see why there's a click: it seems to write one period and then gets lost
14:19 < rah> there's an xrun first, then it writes a period, then it gets lost
14:22 < gkiagia> I've digged into this early wakeup before... what happens with broken drivers is that pipewire wakes up by the system timer to write, but before writing it asks the alsa driver how much data it still has in the buffer.... the driver reports wrong data and pipewire thinks it needs to sleep again ("early wakeup")
14:23 < gkiagia> and later on, when it finally comes to writing, the driver reports an underrun
14:38 < rah> gkiagia: can I ask which hardware/driver you saw this on before?
15:10 < gkiagia> rah: not sure, I think it was an imx6 board
15:11 < gkiagia> rah: I've played with a couple of boards for AGL... most of them fortunately work
15:12 < rah> gkiagia: I see
...
15:26 < smurray> gkiagia: re imx6/imx8, I've got both here (been tinkering with imx8) if there's something you need tested
15:28 < gkiagia> smurray: wasn't it your imx6 board that had underruns that I wasn't able to fix (when we tested at all systems go)
15:29 < gkiagia> I don't fully remember anymore
15:36 < smurray> gkiagia: yeah, and I see the same thing on imx8
15:37 < smurray> gkiagia: and I believe one of the Indian devs trying AGL on the imx8 EVK opened a similar JIRA
15:41 * rah is using imx8 btw
15:54 < Ford_Prefect> rah: smurray: wtay: we disable timer based scheduling on devices that report snd_pcm_hw_params_is_batch() as true (except if they are USB devices)
15:56 < Ford_Prefect> The rationale being that these devices usually only update their hw pointer values in multiples of the period size, so when you sleep for ~the full buffer length and wake up and query the free buffer space, you will get an incorrect low value
15:56 < gkiagia> we = pulseaudio ?
15:56 < Ford_Prefect> "incorrect"
15:56 < Ford_Prefect> gkiagia: yes, sorryhttps://source.puri.sm/Librem5/OS-issues/-/issues/103Different types of audio playback should be treated separately2023-04-16T19:58:51ZBob HamDifferent types of audio playback should be treated separatelyFor example notifications, alarms and media should all be treated separately. Each of the volumes of different audio types should be independent. I should be able to mute media playback like peertube videos from a high-level UI but sti...For example notifications, alarms and media should all be treated separately. Each of the volumes of different audio types should be independent. I should be able to mute media playback like peertube videos from a high-level UI but still hear notification and alarm sounds and similarly for each different type of audio.
There should be a high-level mute control to mute all audio types.
Call audio should be distinct from all other types of audio.
https://source.puri.sm/Librem5/OS-issues/-/issues/58UI for volume mixing2020-07-16T16:42:29ZHeather EllsworthUI for volume mixingEpic: https://source.puri.sm/Librem5/use-cases/issues/149
There will need to be a UI component for each audio type. This issue is to track just the UI portion. For the backend work, see https://source.puri.sm/Librem5/OS-issues/issues/57.Epic: https://source.puri.sm/Librem5/use-cases/issues/149
There will need to be a UI component for each audio type. This issue is to track just the UI portion. For the backend work, see https://source.puri.sm/Librem5/OS-issues/issues/57.https://source.puri.sm/Librem5/OS-issues/-/issues/31Call audio transmission through the SIM7100 PCM interface is massively noisey...2020-01-28T14:52:13ZBob HamCall audio transmission through the SIM7100 PCM interface is massively noisey and distortedPlaying audio files to the modem's ALSA device results in massive distortion when listening at the other end. In addition to distortion, there is extreme noise when there should be silence. This is true for music or speech, in particul...Playing audio files to the modem's ALSA device results in massive distortion when listening at the other end. In addition to distortion, there is extreme noise when there should be silence. This is true for music or speech, in particular replaying speech recorded through the same PCM interface in the other direction.
Adjusting `AT+CTXMICGAIN`, `AT+CTXVOLEX`, `AT+CNSN`, `AT+CNSLIM` or `AT+CECH` does not alter the degree of distortion or noise.
Noise appears when playing silence.Bob HamBob Hamhttps://source.puri.sm/Librem5/Apps_Issues/-/issues/60Need to be able to configure notification sounds (incoming call, text message...2020-08-27T06:57:09ZBob HamNeed to be able to configure notification sounds (incoming call, text message, etc.)We need some way to configure which sounds are played for particular events. For example, incoming phone call, incoming text message, alarm, etc.
The [GNOME Settings application](https://wiki.gnome.org/Design/SystemSettings/Sound) curr...We need some way to configure which sounds are played for particular events. For example, incoming phone call, incoming text message, alarm, etc.
The [GNOME Settings application](https://wiki.gnome.org/Design/SystemSettings/Sound) currently has no facility for configuring event sounds beyond the "alert" event.
[Libcanberra](http://0pointer.de/lennart/projects/libcanberra/) and [GSound](https://wiki.gnome.org/Projects/GSound) are GNOME's APIs for playing sound event notifications. They make use of [XDG Sound Theme and Naming Specifications](https://freedesktop.org/wiki/Specifications/sound-theme-spec/). However, there seems to be no way to configure sounds for individual events beyond specifying a particular filename during play calls or modifying the sound theme. The XDG specs seem a bit static. It may be that another layer is needed on top of these APIs.