This same error happens with all configurations that pulseaudio tries
to use. The hardware is rejecting everything. Are you able to play
directly to hw:0 with aplay? What parameters does the hardware expect?
As you have mentioned, looks like I am having issues with configuring the sound card through PulseAudio.
Yes, I am able to play using aplay.

I am gonna try and give you all the details i have.

1. I am building a custom image for embedded hardware using yocto/poky build system.

2.      Before installing pulseaudio:

a.      aplay executes(without error) without giving any audio
b. After passing following amixer commands it starts to produce audio too.

amixer cset name='SLIMBUS_0_RX Audio Mixer MultiMedia1' '1'
amixer cset name='SLIM RX0 MUX' 'AIF_MIX1_PB'
amixer cset name='SLIM RX1 MUX' 'AIF_MIX1_PB'
amixer cset name='SLIM_0_RX Channels' 'Two'
amixer cset name='RX INT7_1 MIX1 INP0' 'RX0'
amixer cset name='RX INT8_1 MIX1 INP0' 'RX1'
amixer cset name='SpkrLeft COMP Switch' '1'
amixer cset name='SpkrRight COMP Switch' '1'
amixer cset name='SpkrLeft BOOST Switch' '1'
amixer cset name='SpkrRight BOOST Switch' '1'
amixer cset name='SpkrLeft VISENSE Switch' '1'
amixer cset name='SpkrRight VISENSE Switch' '1'
amixer cset name='SpkrLeft SWR DAC_Port Switch' '1'
amixer cset name='SpkrRight SWR DAC_Port Switch' '1'

aplay -D hw:0,0 Alesis-Fusion-Voice-Oohs-C4.wav
aplay Alesis-Fusion-Voice-Oohs-C4.wav

3.      Installing pulseaudio:

I am installing pulseaudio using bitbake recipe.
I have pulseaudio version 6.0.
I am adding following packages in image.

IMAGE_INSTALL += "lib32-libpulse"
IMAGE_INSTALL += "lib32-libpulsecommon"
IMAGE_INSTALL += "lib32-libpulsecore"
IMAGE_INSTALL += "lib32-libpulse-mainloop-glib"
IMAGE_INSTALL += "lib32-pulseaudio"
IMAGE_INSTALL += "lib32-pulseaudio-server"
IMAGE_INSTALL += "lib32-pulseaudio-dbg"
IMAGE_INSTALL += "lib32-pulseaudio-doc"
IMAGE_INSTALL += "lib32-pulseaudio-lib-alsa-util"
IMAGE_INSTALL += "lib32-pulseaudio-lib-cli"
IMAGE_INSTALL += "lib32-pulseaudio-lib-protocol-cli"
IMAGE_INSTALL += "lib32-pulseaudio-lib-protocol-native"
IMAGE_INSTALL += "lib32-pulseaudio-lib-protocol-simple"
IMAGE_INSTALL += "lib32-pulseaudio-misc"
IMAGE_INSTALL += "lib32-pulseaudio-module-cli"
IMAGE_INSTALL += "lib32-pulseaudio-module-cli-protocol-tcp"
IMAGE_INSTALL += "lib32-pulseaudio-module-cli-protocol-unix"
IMAGE_INSTALL += "lib32-pulseaudio-module-alsa-card"
IMAGE_INSTALL += "lib32-pulseaudio-module-alsa-sink"
IMAGE_INSTALL += "lib32-pulseaudio-module-alsa-source"
IMAGE_INSTALL += "lib32-pulseaudio-module-always-sink"
IMAGE_INSTALL += "lib32-pulseaudio-module-augment-properties"
IMAGE_INSTALL += "lib32-pulseaudio-module-card-restore"
IMAGE_INSTALL += "lib32-libpulse-simple"
IMAGE_INSTALL += "lib32-pulseaudio-module-dbus-protocol"
IMAGE_INSTALL += "lib32-pulseaudio-module-device-manager"
IMAGE_INSTALL += "lib32-pulseaudio-module-device-restore"

4.      After installing pulseaudio:

(if pulseaudio is not running)
/ # aplay /data/8khz_mono.wav
ALSA lib /local/mnt/workspace/LE05Sep_stable/poky/build/tmp-glibc/work/armv7a-vfp-neon-oemllib32-linux-gnueabi/lib32-alsa-plugins/1.0.29-r0/alsa-plugins-1.0.29/pulse/pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
aplay: main:730: audio open error: Connection refused

(if pulseaudio is not running)
/ # amixer cset name='SLIMBUS_0_RX Audio Mixer MultiMedia1' '1'
ALSA lib /local/mnt/workspace/LE05Sep_stable/poky/build/tmp-glibc/work/armv7a-vfp-neon-oemllib32-linux-gnueabi/lib32-alsa-plugins/1.0.29-r0/alsa-plugins-1.0.29/pulse/pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Timeout
amixer: Control default open error: Connection refused

/ # pulseaudio --start
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).

/ # aplay /data/8khz_mono.wav
Playing WAVE '/data/8khz_mono.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
(hanged here)

/ # amixer cset name='SLIMBUS_0_RX Audio Mixer MultiMedia1' '1'
amixer: Cannot find the given element from control default
(same command worked before installing pulseaudio)

(trying to run pulseaudio without any parameter)
/ # pulseaudio
W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set! W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set! N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode! N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time! W: [pulseaudio] main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. W: [pulseaudio] main.c: If you do it nonetheless then it's your own fault if things don't work as expected. W: [pulseaudio] main.c: Please read http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ for an explanation why system mode is usually a bad idea.
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-c051000.sound-9335" card_name="alsa_card.platform-c051000.sound-9335" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed. W: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No such file or directory W: [pulseaudio] authkey.c: Failed to load authentication key '/var/run/pulse/.config/pulse/cookie': No such file or directory W: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory W: [pulseaudio] authkey.c: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No such file or directory
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-c051000.sound-9335" card_name="alsa_card.platform-c051000.sound-9335" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-c051000.sound-9335" card_name="alsa_card.platform-c051000.sound-9335" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.

5. a more detailed verbose log for "pulseaudio -vv" is attched in previous mail.
highlight from that are bellow
D: [pulseaudio] reserve-wrap.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead I: [pulseaudio] utils.c: could not open configuration file /usr/share/alsa/ucm/msm8952-tasha-snd-card/msm8952-tasha-snd-card.conf I: [pulseaudio] parser.c: error: could not parse configuration for card msm8952-tasha-snd-card I: [pulseaudio] main.c: error: failed to import msm8952-tasha-snd-card use case configuration -2 I: [pulseaudio] alsa-ucm.c: UCM not available for card msm8952-tasha-snd-card D: [pulseaudio] conf-parser.c: Parsing configuration file '/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf'
D: [pulseaudio] alsa-mixer.c: Looking at profile input:analog-mono
D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Mono (analog-mono)
D: [pulseaudio] alsa-util.c: Trying hw:0 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open hw:0
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 5572 ms
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument

6.      I am also attaching the output of "pactl list".
"pactl list cards" detects no cards. Does that mean pulseaudio has no information about the card?

7.      pactl output
/ # pactl info
Server String: /var/volatile/tmp/pulse-PKdhtXMmr18n/native
Library Protocol Version: 30
Server Protocol Version: 30
Is Local: yes
Client Index: 1
Tile Size: 65496
User Name: root
Host Name: xxxxxx
Server Name: pulseaudio
Server Version: 6.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: 8c9a:c3af

8.      Additional information may be useful.
"gst-play-1.0 audio.wav" does produce audio for in both conditions before installing pulseaudio as well as after installing pulseaudio.


thanks for your help really appreciate it.
Module #0
        Name: module-device-restore
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore the volume/mute 
state of devices"
                module.version = "6.0"

Module #1
        Name: module-stream-restore
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore the 
volume/mute/device state of streams"
                module.version = "6.0"

Module #2
        Name: module-card-restore
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore profile of cards"
                module.version = "6.0"

Module #3
        Name: module-augment-properties
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Augment the property sets of streams with 
additional static information"
                module.version = "6.0"

Module #4
        Name: module-switch-on-port-available
        Argument: 
        Usage counter: n/a
        Properties:
                

Module #5
        Name: module-udev-detect
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Detect available audio hardware and load 
matching drivers"
                module.version = "6.0"

Module #7
        Name: module-native-protocol-unix
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Native protocol (UNIX sockets)"
                module.version = "6.0"

Module #8
        Name: module-default-device-restore
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore the default sink 
and source"
                module.version = "6.0"

Module #9
        Name: module-rescue-streams
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "When a sink/source is removed, try to 
move its streams to the default sink/source"
                module.version = "6.0"

Module #10
        Name: module-always-sink
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Colin Guthrie"
                module.description = "Always keeps at least one sink loaded 
even if it's a null one"
                module.version = "6.0"

Module #11
        Name: module-null-sink
        Argument: sink_name=auto_null 
sink_properties='device.description="Dummy Output"'
        Usage counter: 0
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Clocked NULL sink"
                module.version = "6.0"

Module #12
        Name: module-intended-roles
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically set device of streams based 
on intended roles of devices"
                module.version = "6.0"

Module #13
        Name: module-suspend-on-idle
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "When a sink/source is idle for too long, 
suspend it"
                module.version = "6.0"

Module #14
        Name: module-position-event-sounds
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Position event sounds between L and R 
depending on the position on screen of the widget triggering them."
                module.version = "6.0"

Module #15
        Name: module-role-cork
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Lennart Poettering"
                module.description = "Mute & cork streams with certain roles 
while others exist"
                module.version = "6.0"

Module #16
        Name: module-filter-heuristics
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Colin Guthrie"
                module.description = "Detect when various filters are desirable"
                module.version = "6.0"

Module #17
        Name: module-filter-apply
        Argument: 
        Usage counter: n/a
        Properties:
                module.author = "Colin Guthrie"
                module.description = "Load filter sinks automatically when 
needed"
                module.version = "6.0"

Sink #0
        State: SUSPENDED
        Name: auto_null
        Description: Dummy Output
        Driver: module-null-sink.c
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 11
        Mute: no
        Volume: front-left: 65536 / 100% / 0.Failed to get card information: 
Timeout
00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: auto_null.monitor
        Latency: 0 usec, configured 0 usec
        Flags: DECIBEL_VOLUME LATENCY 
        Properties:
                device.description = "Dummy Output"
                device.class = "abstract"
                device.icon_name = "audio-card"
        Formats:
                pcm

Source #0
        State: SUSPENDED
        Name: auto_null.monitor
        Description: Monitor of Dummy Output
        Driver: module-null-sink.c
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 11
        Mute: no
        Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% 
/ 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor of Sink: auto_null
        Latency: 0 usec, configured 0 usec
        Flags: DECIBEL_VOLUME LATENCY 
        Properties:
                device.description = "Monitor of Dummy Output"
                device.class = "monitor"
                device.icon_name = "audio-input-microphone"
        Formats:
                pcm

Client #0
        Driver: protocol-native.c
        Owner Module: 7
        Properties:
                application.name = "pactl"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "30"
                application.process.id = "2778"
                application.process.user = "root"
                application.process.host = "apq8017"
                application.process.binary = "pactl"
                application.language = "C"
                application.process.machine_id = 
"5a77504934ec44c3a4f39bbc506f245c"
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to