Wednesday, May 1, 2024

Re: ALSA sink

Thank you very much for the thorough approach to my question and
detailed instructions on how to catch the problem.

I tried to look with a debugger earlier, but I am not good at debugging
and C++. That's why I reproduced the steps you suggested.

Below is the output of the commands. I understand that unfortunately for
this case, some variables are optimized during compilation:

(gdb) continue
Thread 1 "alsa1" hit Breakpoint 2, snd_pcm_hw_params_set_periods
(pcm=0x555555802c70, params=0x5555557177b0, val=17, dir=0) at pcm/pcm.c:5601
5601 {
(gdb) frame 1
#1 0x00007ffff7e0db2c in gr::audio::alsa_sink::alsa_sink
(this=<optimized out>, sampling_rate=<optimized out>, device_name=...,
ok_to_block=<optimized out>, this=<optimized out>,
sampling_rate=<optimized out>, device_name=..., ok_to_block=<optimized out>)
at
/usr/src/debug/gnuradio/gnuradio-3.10.9.2/gr-audio/lib/alsa/alsa_impl.h:81
81 snd_pcm_t* get() noexcept { return d_pcm_handle; }
(gdb) printf "max: %d, min: %d; d_: %d\n", max_nperiods, min_nperiods,
d_nperiods
value has been optimized out

I guess to see the desired parameters you need to rebuild gnuradio with
optimization options disabled at compile time.

Maybe if you have bare ALSA and alsa-plugins installed, you can define a
virtual PCM device as I have it defined in ~/.asoundrc and you can
reproduce the problem with it ?

Thank you

No comments:

Post a Comment