I have IMX6Q based board and want game with pulseaudio.
My board have 3 sound devices.
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: tlv320aic3xaudi [tlv320aic3x-audio], device 0: HiFi tlv320aic3x-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tlv320aic32x4au [tlv320aic32x4-audio], device 0: HiFi tlv320aic32x4-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: imxhdmisoc [imx-hdmi-soc], device 0: i.MX HDMI Audio Tx hdmi-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
So device is **hw:1,0**
aplay -D plughw:1,0 /usr/share/sounds/2.wav
This worked fine.
But at start the Pulseaudio do not detect PCM devices.
I try manually configure PA via
# pactl load-module module-alsa-sink device="hw:1,0"
got answer:
Failure: Module initialization failed
and manually started (# pulseaudio --system -vvvv --log-meta) pulseaudio make log:
I: [pulseaudio][pulsecore/client.c:80 pa_client_new()] Created 1 "Native client (UNIX socket client)"
I: [pulseaudio][pulsecore/protocol-native.c:5012 pa_native_protocol_connect()] Client authenticated anonymously.
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Client added for object /org/pulseaudio/core1/client1
D: [pulseaudio][pulsecore/protocol-native.c:2601 command_auth()] Protocol version: remote 29, local 29
D: [pulseaudio][pulsecore/protocol-native.c:2664 command_auth()] SHM possible: no
D: [pulseaudio][pulsecore/protocol-native.c:2682 command_auth()] Negotiated SHM: no
D: [pulseaudio][modules/alsa/alsa-util.c:673 pa_alsa_open_by_device_string()] Trying hw:1,0 with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio][(alsa-lib)pcm_hw.c:1667 _snd_pcm_hw_open()] Invalid value for card
**I: [pulseaudio][modules/alsa/alsa-util.c:680 pa_alsa_open_by_device_string()] Error opening PCM device hw:1,0: No such file or directory
E: [pulseaudio][pulsecore/module.c:175 pa_module_load()] Failed to load module "module-alsa-sink" (argument: "device=hw:1,0"): initialization failed.**
I: [pulseaudio][pulsecore/client.c:102 pa_client_free()] Freed 1 "pactl"
I: [pulseaudio][pulsecore/protocol-native.c:4903 pstream_die_callback()] Connection died.
D: [pulseaudio][pulsecore/protocol-dbus.c:835 pa_dbus_protocol_remove_interface()] Interface org.PulseAudio.Core1.Client removed from object /org/pulseaudio/core1/client1
why PA cannot open device?
P.S. start PA log
# killall pulseaudio
# pulseaudio --system -vvvv --log-meta
W: [pulseaudio][daemon/main.c:726 main()] Running in system mode, but --disallow-exit not set!
W: [pulseaudio][daemon/main.c:729 main()] Running in system mode, but --disallow-module-loading not set!
N: [pulseaudio][daemon/main.c:732 main()] Running in system mode, forcibly disabling SHM mode!
N: [pulseaudio][daemon/main.c:737 main()] Running in system mode, forcibly disabling exit idle time!
D: [pulseaudio][pulsecore/core-rtclock.c:166 pa_rtclock_hrtimer_enable()] Timer slack is set to 50 us.
D: [pulseaudio][pulsecore/core-util.c:871 set_nice()] setpriority() worked.
I: [pulseaudio][pulsecore/core-util.c:914 pa_raise_priority()] Successfully gained nice level -11.
I: [pulseaudio][daemon/main.c:195 change_user()] Found user 'pulse' (UID 1000) and group 'pulse' (GID 1000).
W: [pulseaudio][daemon/caps.c:98 pa_drop_caps()] Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
I: [pulseaudio][daemon/main.c:271 change_user()] Successfully changed user to "pulse".
I: [pulseaudio][daemon/main.c:916 main()] This is PulseAudio 5.0
D: [pulseaudio][daemon/main.c:917 main()] Compilation host: arm-buildroot-linux-gnueabihf
D: [pulseaudio][daemon/main.c:918 main()] Compilation CFLAGS: -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -O2 -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option
D: [pulseaudio][daemon/main.c:921 main()] Running on host: Linux armv7l 3.10.23-svn72 #3 SMP Tue Oct 14 15:10:49 MSK 2014
D: [pulseaudio][daemon/main.c:924 main()] Found 4 CPUs.
I: [pulseaudio][daemon/main.c:926 main()] Page size is 4096 bytes
D: [pulseaudio][daemon/main.c:931 main()] Compiled with Valgrind support: no
D: [pulseaudio][daemon/main.c:934 main()] Running in valgrind mode: no
D: [pulseaudio][daemon/main.c:936 main()] Running in VM: no
D: [pulseaudio][daemon/main.c:939 main()] Optimized build: yes
D: [pulseaudio][daemon/main.c:947 main()] FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio][daemon/main.c:956 main()] Machine ID is 8156dcb6930fc1dca0f83dd10000000d.
I: [pulseaudio][daemon/main.c:966 main()] Using runtime directory /var/run/pulse.
I: [pulseaudio][daemon/main.c:971 main()] Using state directory /var/lib/pulse.
I: [pulseaudio][daemon/main.c:974 main()] Using modules directory /usr/lib/pulse-5.0/modules.
I: [pulseaudio][daemon/main.c:976 main()] Running in system mode: yes
W: [pulseaudio][daemon/main.c:981 main()] OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.
W: [pulseaudio][daemon/main.c:981 main()] If you do it nonetheless then it's your own fault if things don't work as expected.
W: [pulseaudio][daemon/main.c:981 main()] Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea.
I: [pulseaudio][daemon/main.c:1006 main()] Fresh high-resolution timers available! Bon appetit!
D: [pulseaudio][pulsecore/memblock.c:744 pa_mempool_new()] Using private memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496
W: [pulseaudio][pulsecore/random.c:125 pa_random()] Failed to get proper entropy. Falling back to unsecure pseudo RNG.
I: [pulseaudio][pulsecore/cpu-arm.c:133 pa_cpu_get_arm_flags()] CPU flags: V6 V7 VFP EDSP NEON VFPV3
I: [pulseaudio][pulsecore/svolume_arm.c:162 pa_volume_func_init_arm()] Initialising ARM optimized volume functions.
I: [pulseaudio][pulsecore/sconv_neon.c:91 pa_convert_func_init_neon()] Initialising ARM NEON optimized conversions.
I: [pulseaudio][pulsecore/mix_neon.c:90 pa_mix_func_init_neon()] Initialising ARM NEON optimized mixing functions.
D: [pulseaudio][pulsecore/module.c:77 pa_module_exists()] Checking for existence of '/usr/lib/pulse-5.0/modules/module-udev-detect.so': success
D: [pulseaudio][modules/module-udev-detect.c:296 verify_access()] /dev/snd/controlC2 is accessible: no
D: [pulseaudio][modules/module-udev-detect.c:296 verify_access()] /dev/snd/controlC0 is accessible: no
D: [pulseaudio][modules/module-udev-detect.c:296 verify_access()] /dev/snd/controlC1 is accessible: no
I: [pulseaudio][modules/module-udev-detect.c:801 module_udev_detect_LTX_pa__init()] Found 3 cards.
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-udev-detect" (index: #0; argument: "").
D: [pulseaudio][pulsecore/module.c:77 pa_module_exists()] Checking for existence of '/usr/lib/pulse-5.0/modules/module-esound-protocol-unix.so': success
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-esound-protocol-unix" (index: #1; argument: "").
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-native-protocol-unix" (index: #2; argument: "auth-anonymous=1").
I: [pulseaudio][modules/module-stream-restore.c:2446 module_stream_restore_LTX_pa__init()] Successfully opened database file '/var/lib/pulse/8156dcb6930fc1dca0f83dd10000000d-stream-volumes'.
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-stream-restore" (index: #3; argument: "").
I: [pulseaudio][modules/module-device-restore.c:1272 module_device_restore_LTX_pa__init()] Successfully opened database file '/var/lib/pulse/8156dcb6930fc1dca0f83dd10000000d-device-volumes'.
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-device-restore" (index: #4; argument: "").
I: [pulseaudio][modules/module-default-device-restore.c:77 load()] Saved default sink 'auto_null' not existent, not restoring default sink setting.
I: [pulseaudio][modules/module-default-device-restore.c:98 load()] Saved default source 'auto_null.monitor' not existent, not restoring default source setting.
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-default-device-restore" (index: #5; argument: "").
D: [pulseaudio][pulsecore/module.c:77 pa_module_exists()] Checking for existence of '/usr/lib/pulse-5.0/modules/module-dbus-protocol.so': success
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Memstats added for object /org/pulseaudio/core1/memstats
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module0
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module1
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module2
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module3
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module4
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module5
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module6
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1 added for object /org/pulseaudio/core1
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-dbus-protocol" (index: #6; argument: "access=local").
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-rescue-streams" (index: #7; argument: "").
D: [pulseaudio][modules/module-always-sink.c:77 load_null_sink_if_needed()] Autoloading null-sink as no other sinks detected.
I: [pulseaudio][pulsecore/sink.c:371 pa_sink_new()] Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio][pulsecore/sink.c:371 pa_sink_new()] device.description = "Dummy Output"
I: [pulseaudio][pulsecore/sink.c:371 pa_sink_new()] device.class = "abstract"
I: [pulseaudio][pulsecore/sink.c:371 pa_sink_new()] device.icon_name = "audio-card"
D: [pulseaudio][pulsecore/core-subscribe.c:244 pa_subscription_post()] Dropped redundant event due to change event.
I: [pulseaudio][pulsecore/source.c:357 pa_source_new()] Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio][pulsecore/source.c:357 pa_source_new()] device.description = "Monitor of Dummy Output"
I: [pulseaudio][pulsecore/source.c:357 pa_source_new()] device.class = "monitor"
I: [pulseaudio][pulsecore/source.c:357 pa_source_new()] device.icon_name = "audio-input-microphone"
D: [null-sink][modules/module-null-sink.c:203 thread_func()] Thread starting up
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Device added for object /org/pulseaudio/core1/source0
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Source added for object /org/pulseaudio/core1/source0
D: [pulseaudio][modules/module-device-restore.c:862 sink_put_hook_callback()] Could not set format on sink auto_null
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Device added for object /org/pulseaudio/core1/sink0
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Sink added for object /org/pulseaudio/core1/sink0
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-null-sink" (index: #9; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-always-sink" (index: #8; argument: "").
D: [pulseaudio][modules/module-suspend-on-idle.c:114 restart()] Sink auto_null becomes idle, timeout in 5 seconds.
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-suspend-on-idle" (index: #10; argument: "").
I: [pulseaudio][pulsecore/module.c:179 pa_module_load()] Loaded "module-position-event-sounds" (index: #11; argument: "").
D: [pulseaudio][pulsecore/dbus-util.c:290 pa_dbus_wrap_connection_new()] Successfully connected to D-Bus system bus 4bfa047e6e2412c2d508e0690000000d as :1.6
D: [pulseaudio][daemon/main.c:376 register_dbus_name()] Got org.pulseaudio.Server!
I: [pulseaudio][daemon/main.c:1147 main()] Daemon startup complete.
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module7
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module9
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module8
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module10
D: [pulseaudio][pulsecore/protocol-dbus.c:799 pa_dbus_protocol_add_interface()] Interface org.PulseAudio.Core1.Module added for object /org/pulseaudio/core1/module11
I: [pulseaudio][modules/module-suspend-on-idle.c:92 timeout_cb()] Sink auto_null idle for too long, suspending ...
D: [pulseaudio][pulsecore/sink.c:879 pa_sink_suspend()] Suspend cause of sink auto_null is 0x0004, suspending
D: [pulseaudio][pulsecore/core.c:256 pa_core_maybe_vacuum()] Hmm, no streams around, trying to vacuum.