[pulseaudio-discuss] echo-cancel module
Aaron Brice
aaron.brice at nikolamotor.com
Fri Aug 19 21:41:52 UTC 2022
I'm having trouble getting the echo-cancel module working. I'm running
pulseaudio 15.0 on an i.MX8QM arm embedded system, and trying to do
echo-cancel between the speakers and the mic to act as bluetooth
speakerphone. For testing I am playing music through the echo-canceled
speaker sink and running parecord on the echo-canceled mic source. I can
do either of those independently and it works. However, when I start
parecord while playing through speakers, pulseaudio goes to 100% CPU and
journalctl shows the error "Resume failed, couldn't restore original sample
settings." streaming over and over. Tried with aec_method=null for test
purposes and got the same result.
verbose log:
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Protocol version: remote 35,
local 35
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Got credentials: uid=0 gid=0
success=1
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: SHM possible: no
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Negotiated SHM: no
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Disabling srbchannel, reason:
No SHM support
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Negotiated format: pcm,
format.sample_format = "\"s16le\"" format.rate = "44100" format.channels
= "2" format.channel_map = "\"front-left,front-right\""
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Trying to change sample spec
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Source
alsa_input.platform-sound.stereo-fallback.echo-cancel becomes busy,
resuming.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
alsa_input.platform-sound.stereo-fallback.echo-cancel: suspend_cause: IDLE
-> (none)
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
alsa_input.platform-sound.stereo-fallback.echo-cancel: state: SUSPENDED ->
IDLE
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Source
alsa_input.platform-sound.stereo-fallback.echo-cancel becomes idle, timeout
in 5 seconds.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Source
alsa_input.platform-sound.stereo-fallback.echo-cancel becomes idle, timeout
in 5 seconds.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resampler:
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: rate 32000 -> 44100 (method
speex-float-1)
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: format s16le -> s16le
(intermediate float32le)
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: channels 1 -> 2 (resampling
1)
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Channel matrix:
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: I00
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: +------
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: O00 | 1.000
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: O01 | 1.000
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Using mono to stereo remapping
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Choosing speex quality setting
1.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: memblockq requested:
maxlength=33554432, tlength=0, base=2, prebuf=0, minreq=1 maxrewind=0
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: memblockq sanitized:
maxlength=33554432, tlength=33554432, base=2, prebuf=0, minreq=2 maxrewind=0
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Created output 3 "test.wav" on
alsa_input.platform-sound.stereo-fallback.echo-cancel with sample spec
s16le 2ch 44100Hz and channel map front-left,front-right
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: media.format = "WAV
(Microsoft)"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: application.name =
"parecord"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: media.name = "test.wav"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: native-protocol.peer =
"UNIX socket client"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: native-protocol.version =
"35"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: application.process.id =
"5312"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: application.process.user =
"root"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: application.process.host =
"apalis-vhu2"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: application.process.binary
= "pacat"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: application.language = "C"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
application.process.machine_id = "2911e8d3e385480c9ac3ff9c742569a4"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
application.process.session_id = "c4"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: module-stream-restore.id =
"source-output-by-application-name:parecord"
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: memblockq requested:
maxlength=4194304, tlength=0, base=4, prebuf=1, minreq=0 maxrewind=0
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: memblockq sanitized:
maxlength=4194304, tlength=4194304, base=4, prebuf=4, minreq=4 maxrewind=0
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Final latency 2000.00 ms =
2000.00 ms + 0.00 ms
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Suspending source
alsa_input.platform-sound.stereo-fallback due to changing format, desired
format = s16le rate = 48000
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
alsa_input.platform-sound.stereo-fallback: suspend_cause: IDLE ->
IDLE|INTERNAL
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Source does not support sample
rate of 48000, set it to a verfied value
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Reconfigured successfully
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
alsa_input.platform-sound.stereo-fallback: suspend_cause: IDLE|INTERNAL ->
IDLE
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Source output 0 state 1
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Source
alsa_input.platform-sound.stereo-fallback becomes busy, resuming.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Trying resume...
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Disabling tsched mode since
BATCH flag is set
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Maximum hw buffer size is 341
ms
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Set buffer size first (to 4806
samples), period size second (to 1201 samples).
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Device hw:0 doesn't support
44100 Hz, changed to 48000 Hz.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resume failed, couldn't
restore original sample settings.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
alsa_input.platform-sound.stereo-fallback: suspend_cause: IDLE -> (none)
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]:
alsa_input.platform-sound.stereo-fallback.echo-cancel: state: IDLE ->
RUNNING
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Dropped redundant event due to
change event.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: /dev/snd/controlC0 is
accessible: yes
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resuming all sinks and sources
of card alsa_card.platform-sound.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Trying resume...
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Disabling tsched mode since
BATCH flag is set
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Maximum hw buffer size is 341
ms
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Set buffer size first (to 4806
samples), period size second (to 1201 samples).
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Device hw:0 doesn't support
44100 Hz, changed to 48000 Hz.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resume failed, couldn't
restore original sample settings.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: /dev/snd/controlC0 is
accessible: yes
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resuming all sinks and sources
of card alsa_card.platform-sound.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Trying resume...
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Disabling tsched mode since
BATCH flag is set
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Maximum hw buffer size is 341
ms
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Set buffer size first (to 4806
samples), period size second (to 1201 samples).
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Device hw:0 doesn't support
44100 Hz, changed to 48000 Hz.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resume failed, couldn't
restore original sample settings.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: /dev/snd/controlC0 is
accessible: yes
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resuming all sinks and sources
of card alsa_card.platform-sound.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Trying resume...
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Disabling tsched mode since
BATCH flag is set
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Maximum hw buffer size is 341
ms
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Set buffer size first (to 4806
samples), period size second (to 1201 samples).
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Device hw:0 doesn't support
44100 Hz, changed to 48000 Hz.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resume failed, couldn't
restore original sample settings.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: /dev/snd/controlC0 is
accessible: yes
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resuming all sinks and sources
of card alsa_card.platform-sound.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Trying resume...
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Disabling tsched mode since
BATCH flag is set
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Maximum hw buffer size is 341
ms
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Set buffer size first (to 4806
samples), period size second (to 1201 samples).
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Device hw:0 doesn't support
44100 Hz, changed to 48000 Hz.
Aug 19 14:02:36 apalis-vhu2 pulseaudio[478]: Resume failed, couldn't
restore original sample settings.
sinks:
Sink #0
State: RUNNING
Name: alsa_output.platform-sound.stereo-fallback
Description: Built-in Audio Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 5
Mute: no
Volume: front-left: 47104 / 72%, front-right: 47104 / 72%
balance 0.00
Base Volume: 65536 / 100%
Monitor Source: alsa_output.platform-sound.stereo-fallback.monitor
Latency: 91620 usec, configured 100136 usec
Flags: HARDWARE HW_VOLUME_CTRL LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "59050000.sai-sgtl5000 sgtl5000-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "apalis-imx8qm-sgtl5000"
alsa.long_card_name = "apalis-imx8qm-sgtl5000"
device.bus_path = "platform-sound"
sysfs.path = "/devices/platform/sound/sound/card0"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "17664"
device.buffering.fragment_size = "4416"
device.access_mode = "mmap"
device.profile.name = "stereo-fallback"
device.profile.description = "Stereo"
device.description = "Built-in Audio Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output: Analog Output (type: Analog, priority: 9900,
availability unknown)
analog-output-headphones: Headphones (type: Headphones,
priority: 9900, availability unknown)
Active Port: analog-output
Formats:
pcm
Sink #3
State: RUNNING
Name: alsa_output.platform-sound.stereo-fallback.echo-cancel
Description: Built-in Audio Stereo (echo cancelled with Built-in
Audio Stereo)
Driver: module-echo-cancel.c
Sample Specification: s16le 1ch 32000Hz
Channel Map: mono
Owner Module: 17
Mute: no
Volume: mono: 47104 / 72%
balance 0.00
Base Volume: 65536 / 100%
Monitor Source:
alsa_output.platform-sound.stereo-fallback.echo-cancel.monitor
Latency: 91895 usec, configured 100136 usec
Flags: HW_MUTE_CTRL LATENCY
Properties:
device.master_device =
"alsa_output.platform-sound.stereo-fallback"
device.class = "filter"
device.intended_roles = "phone"
device.description = "Built-in Audio Stereo (echo cancelled
with Built-in Audio Stereo)"
device.icon_name = "audio-card"
Formats:
pcm
sources:
Source #1
State: SUSPENDED
Name: alsa_input.platform-sound.stereo-fallback
Description: Built-in Audio Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 5
Mute: no
Volume: front-left: 21845 / 33%, front-right: 21845 / 33%
balance 0.00
Base Volume: 65536 / 100%
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "59050000.sai-sgtl5000 sgtl5000-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "apalis-imx8qm-sgtl5000"
alsa.long_card_name = "apalis-imx8qm-sgtl5000"
device.bus_path = "platform-sound"
sysfs.path = "/devices/platform/sound/sound/card0"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "17664"
device.buffering.fragment_size = "4416"
device.access_mode = "mmap"
device.profile.name = "stereo-fallback"
device.profile.description = "Stereo"
device.description = "Built-in Audio Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-input-mic: Microphone (type: Mic, priority: 8700,
availability unknown)
Active Port: analog-input-mic
Formats:
pcm
Source #4
State: SUSPENDED
Name: alsa_input.platform-sound.stereo-fallback.echo-cancel
Description: Built-in Audio Stereo (echo cancelled with Built-in
Audio Stereo)
Driver: module-echo-cancel.c
Sample Specification: s16le 1ch 32000Hz
Channel Map: mono
Owner Module: 17
Mute: no
Volume: mono: 21845 / 33%
balance 0.00
Base Volume: 65536 / 100%
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HW_MUTE_CTRL LATENCY
Properties:
device.master_device =
"alsa_input.platform-sound.stereo-fallback"
device.class = "filter"
device.intended_roles = "phone"
device.description = "Built-in Audio Stereo (echo cancelled
with Built-in Audio Stereo)"
device.icon_name = "audio-input-microphone"
Formats:
pcm
Thanks,
--
*—*
*Aaron Brice*
| aaron.brice at nikolamotor.com
[image: Nikola Logo]
NIKOLA CORPORATION | nikolamotor.com
4141 E Broadway R <https://goo.gl/maps/bKfEzApeDMErgi4e7>d
<https://goo.gl/maps/bKfEzApeDMErgi4e7>|
<https://goo.gl/maps/bKfEzApeDMErgi4e7>
<https://goo.gl/maps/bKfEzApeDMErgi4e7>Phoenix | AZ | 85040
<https://goo.gl/maps/bKfEzApeDMErgi4e7>
[image: -] <https://www.facebook.com/nikolamotorcompany> [image: -]
<https://twitter.com/nikolamotor> [image: -]
<https://www.youtube.com/c/nikolamotorcompany> [image: -]
<https://www.linkedin.com/company/nikola-motor-company/> [image: -]
<https://www.instagram.com/nikolamotorcompany/>
INFORMATION CONTAINED IN THIS E-MAIL TRANSMISSION IS CONFIDENTIAL. IF YOU
ARE NOT THE INTENDED RECIPIENT, DO NOT READ, DISTRIBUTE OR REPRODUCE THIS
TRANSMISSION (INCLUDING ANY ATTACHMENTS). IF YOU HAVE RECEIVED THIS E-MAIL
IN ERROR, PLEASE NOTIFY THE SENDER BY E-MAIL REPLY AND THEN DELETE THIS
E-MAIL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20220819/e289f0c1/attachment-0001.htm>
More information about the pulseaudio-discuss
mailing list