Skip to content

common: Disable tap sound effects by default

Mattijs Korpershoek requested to merge mkorpershoek/audio-debug into ti-android-15

When starting an audio record using a dedicated recorder app, we see:

> E alsa_device_proxy:   proxy_open() pcm_is_ready() failed: cannot set hw params: Invalid argument
> E AHAL_AlsaUtils: openProxyForAttachedDevice: failed to open device, address=<0,0> error=-12
> D StreamHalAidl: 0xb400006e7f06e518 StreamInHalAidl::standby
> E StreamHalAidl: standby: not supported from input stream state ERROR
> E AudioFlinger: Error when putting input stream into standby: -38

With sound effects disabled, we don't reproduce the issue.

This is because the driver cannot start a capture when a playback is already running.

To reproduce:

  1. run tinyplay2 on a long .wav file:
   am62p:/data # tinyplay2 file.wav
   playing '/data/file.wav': 2 ch, 44100 hz, 16-bit signed PCM
  1. While tinyplay2 is running, start a capture:
   am62p:/ # tinycap2 /data/record.wav
   SNDRV_PCM_IOCTL_HW_PARAMS error (22)
   Unable to open PCM device (cannot set hw params: Invalid argument)
   Captured 0 frames

Disable sound effects to avoid having playback and capture at the same time, which fixes audio record.

Test: settings get system sound_effects_enabled # returns 0
Test: settings get system lockscreen_sounds_enabled # returns 0
Test: settings get secure charging_sounds_enabled # returns 0

Signed-off-by: Mattijs Korpershoek mkorpershoek@baylibre.com

Merge request reports

Loading