rust-portaudio: Callback function never called - arm

I’m working on getting rust-portaudio to work on my bananapi. On the bananapi I want to ignore the builtin audio devices and use a USB soundblaster instead. I’m able to specify that device using a device index, but I get a lot of error messages concerning the builtin audio device. The results is I don’t hear any audio. I’m not sure what the cause might be, though the error messages look suspicious. PortAudio doesn’t seem to be too happy.

FWIW, I am able to play audio through the soundblaster using other sound sources on that computer. aplay works, as does supercollider running through jack1.

Output from my test program is below. (portaudio startup is at line 89 in my test program).

initting with sample rate: 44100
add_elem(ui_elem_type_t type, char *label) 0x00
add_elem(ui_elem_type_t type, char *label) Volume
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.front.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
--------------------------------------- DeviceIndex(1)
DeviceInfo {
    struct_version: 2,
    name: "Sound Blaster X-Fi Go! Pro: USB Audio (hw:1,0)",
    host_api: 0,
    max_input_channels: 2,
    max_output_channels: 2,
    default_low_input_latency: 0.008684807256235827,
    default_low_output_latency: 0.008707482993197279,
    default_high_input_latency: 0.034829931972789115,
    default_high_output_latency: 0.034829931972789115,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 2 channel input:
    44100hz
Supported standard sample rates for half-duplex 16-bit 2 channel output:
    44100hz
Supported standard sample rates for full-duplex 16-bit 2 channel input, 2 channel output:
    44100hz

And here’s output from the ‘devices.rs’ example:

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.front.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.sunxi-CODEC.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Number of devices = 7
--------------------------------------- DeviceIndex(0)
DeviceInfo {
    struct_version: 2,
    name: "sunxi-CODEC: PCM (hw:0,0)",
    host_api: 0,
    max_input_channels: 2,
    max_output_channels: 2,
    default_low_input_latency: 0.06965986394557823,
    default_low_output_latency: 0.06965986394557823,
    default_high_input_latency: 0.06965986394557823,
    default_high_output_latency: 0.06965986394557823,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 2 channel input:
    8000hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    96000hz
    192000hz
Supported standard sample rates for half-duplex 16-bit 2 channel output:
    8000hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    96000hz
    192000hz
Supported standard sample rates for full-duplex 16-bit 2 channel input, 2 channel output:
    8000hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    96000hz
    192000hz
--------------------------------------- DeviceIndex(1)
DeviceInfo {
    struct_version: 2,
    name: "Sound Blaster X-Fi Go! Pro: USB Audio (hw:1,0)",
    host_api: 0,
    max_input_channels: 2,
    max_output_channels: 2,
    default_low_input_latency: 0.008684807256235827,
    default_low_output_latency: 0.008707482993197279,
    default_high_input_latency: 0.034829931972789115,
    default_high_output_latency: 0.034829931972789115,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 2 channel input:
    44100hz
Supported standard sample rates for half-duplex 16-bit 2 channel output:
    44100hz
Supported standard sample rates for full-duplex 16-bit 2 channel input, 2 channel output:
    44100hz
--------------------------------------- DeviceIndex(2)
DeviceInfo {
    struct_version: 2,
    name: "sysdefault",
    host_api: 0,
    max_input_channels: 128,
    max_output_channels: 128,
    default_low_input_latency: 0.06965986394557823,
    default_low_output_latency: 0.06965986394557823,
    default_high_input_latency: 0.06965986394557823,
    default_high_output_latency: 0.06965986394557823,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 128 channel input:
    8000hz
    9600hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    88200hz
    96000hz
    192000hz
Supported standard sample rates for half-duplex 16-bit 128 channel output:
    8000hz
    9600hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    88200hz
    96000hz
    192000hz
Supported standard sample rates for full-duplex 16-bit 128 channel input, 128 channel output:
    8000hz
    9600hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    88200hz
    96000hz
    192000hz
--------------------------------------- DeviceIndex(3)
DeviceInfo {
    struct_version: 2,
    name: "default",
    host_api: 0,
    max_input_channels: 128,
    max_output_channels: 128,
    default_low_input_latency: 0.06965986394557823,
    default_low_output_latency: 0.06965986394557823,
    default_high_input_latency: 0.06965986394557823,
    default_high_output_latency: 0.06965986394557823,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 128 channel input:
    8000hz
    9600hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    88200hz
    96000hz
    192000hz
Supported standard sample rates for half-duplex 16-bit 128 channel output:
    8000hz
    9600hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    88200hz
    96000hz
    192000hz
Supported standard sample rates for full-duplex 16-bit 128 channel input, 128 channel output:
    8000hz
    9600hz
    11025hz
    12000hz
    16000hz
    22050hz
    24000hz
    32000hz
    44100hz
    48000hz
    88200hz
    96000hz
    192000hz
--------------------------------------- DeviceIndex(4)
DeviceInfo {
    struct_version: 2,
    name: "dmix",
    host_api: 0,
    max_input_channels: 0,
    max_output_channels: 2,
    default_low_input_latency: -1,
    default_low_output_latency: 0.021333333333333333,
    default_high_input_latency: -1,
    default_high_output_latency: 0.021333333333333333,
    default_sample_rate: 48000
}
Supported standard sample rates for half-duplex 16-bit 0 channel input:
Supported standard sample rates for half-duplex 16-bit 2 channel output:
    48000hz
Supported standard sample rates for full-duplex 16-bit 0 channel input, 2 channel output:
--------------------------------------- DeviceIndex(5)
DeviceInfo {
    struct_version: 2,
    name: "/dev/dsp",
    host_api: 1,
    max_input_channels: 16,
    max_output_channels: 16,
    default_low_input_latency: 0.008707482993197279,
    default_low_output_latency: 0.008707482993197279,
    default_high_input_latency: 0.034829931972789115,
    default_high_output_latency: 0.034829931972789115,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 16 channel input:
Supported standard sample rates for half-duplex 16-bit 16 channel output:
Supported standard sample rates for full-duplex 16-bit 16 channel input, 16 channel output:
--------------------------------------- DeviceIndex(6)
DeviceInfo {
    struct_version: 2,
    name: "/dev/dsp1",
    host_api: 1,
    max_input_channels: 16,
    max_output_channels: 16,
    default_low_input_latency: 0.008707482993197279,
    default_low_output_latency: 0.008707482993197279,
    default_high_input_latency: 0.034829931972789115,
    default_high_output_latency: 0.034829931972789115,
    default_sample_rate: 44100
}
Supported standard sample rates for half-duplex 16-bit 16 channel input:
Supported standard sample rates for half-duplex 16-bit 16 channel output:
Supported standard sample rates for full-duplex 16-bit 16 channel input, 16 channel output:

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

for me pull request #152 fixed the issue after i did apply a patch to the pull request itself to make it compile on a 32-bit processor