Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

SampleApp failure due to Alsa Lib not finding sound card #1302

Closed
2 of 8 tasks
cdelsordo opened this issue Mar 29, 2019 · 7 comments
Closed
2 of 8 tasks

SampleApp failure due to Alsa Lib not finding sound card #1302

cdelsordo opened this issue Mar 29, 2019 · 7 comments

Comments

@cdelsordo
Copy link

cdelsordo commented Mar 29, 2019

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

What is the expected behavior?

What behavior are you observing?

Provide the steps to reproduce the issue, if applicable:

Tell us about your environment:

What version of the AVS Device SDK are you using?

  <x.y.z>

Tell us what hardware you're using:

  • Desktop / Laptop
  • Raspberry Pi
  • Other - tell us more:

Tell us about your OS (Type & version):

  • Linux
  • MacOS
  • Raspbian Stretch
  • Raspbian Jessy
  • Other - tell us more:
@cdelsordo
Copy link
Author

We have ported the AVS SDK and we are experiencing a problem creating the sample App.
I have DEBUG9 level turned on and I think the error
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot find card '0'
Is the key error which I need to solve. I do not have any sound cards listed. Can you provide any guidance?

/proc/asound# cat cards
--- no soundcards ---
2019-03-29 17:57:07.542 [ a] 9 HTTP2Transport:insertActiveStream:handle=0xb59f9148
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM dmix
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2019-03-29 17:57:07.880 [ 1] C PortAudioMicrophoneWrapper:Failed to open PortAudio default stream
2019-03-29 17:57:07.880 [ 1] C PortAudioMicrophoneWrapper:Failed to initialize PortAudioMicrophoneWrapper
2019-03-29 17:57:07.880 [ 1] C SampleApplication:Failed to create PortAudioMicrophoneWrapper!
2019-03-29 17:57:07.880 [ 1] C SampleApplication:Failed to initialize SampleApplication

@cdelsordo
Copy link
Author

Do we need to have gstreamer1.0-alsa in our system to set up the usr/share/avs/alsa configuration files
There are also errors that seem to be related to pcm audio output
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib ../../alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
2019-03-29 20:32:43.934 [ c] 0 EventBuilder:buildJsonEventString:messageId=25d62993-0be6-4372-8544-17684f96229d,namespace=System,name=SynchronizeState
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
2019-03-29 20:32:43.934 [ c] 9 HTTP2Transport:enqueueRequest
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) 2019-03-29 20:32:44.034 [ a] 0 HTTP2Transport:processNextOutgoingMessage
Unknown PCM cards.pcm.iec958
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
2019-03-29 20:32:44.267 [ a] 0 HTTP2StreamPool:getStream:streamId=3,numAcquiredStreams=2
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
2019-03-29 20:32:44.267 [ a] 9 HTTP2Transport:insertActiveStream:handle=0xb59f9148
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

@mvelegon-amzn
Copy link
Contributor

Hi @cdelsordo Thank you for reaching out to us. This seems like a common issue that could be fixed by following the guidance mentioned in the following:

https://github.com/alexa/avs-device-sdk/wiki/Troubleshooting-Guide

The specific instructions are under the Linux section. Also the issue you are seeing is similar to this resolved ticket: #212.

Also here are few more related issues with speaker setup which have been resolved:

Please let us know if this has fixed your error.

Thanks,
Mahesh

@cdelsordo
Copy link
Author

Mahesh,
Thank you. I neglected to provide you the appropriate information which I think will help you provide guidance. We would like to show a demo to our management team as a proof of concept.

avs-device-sdk version:
I am using version 1.12 which I thinbk is the master version.

hardware environment I am using:
This is key. I am porting avs-device-sdk to an exiting product that is used in telco and cable environments. The hardware uses a Broadcom BCM7271 chipset. The operating environment is a RDK V LLC environemnt which uses an arm Linux OS. gstremer is used to play AV files and that currently works. gstreamer customizations are provided by Broadcom via URSR 18.3 (if you are familiar with Broadcom. Hence all the gstreamer opensource is already loaded and working. HDMI works for TV and file playback.

I am hoping to use a usb microphone for input and the BCM7271/HDMI as the output.

Steps to Reproduce:

  1. We are starting the SampleApplication using the following command:
    ./SampleApp/src/SampleApp ./Integration/AlexaClientSDKConfig.json DEBUG9
    We have a product registered with Amazon and I have assigned a serial number in the AlexaClientSDKConfig.json file as seen `below.
    "deviceInfo":{
    // Unique device serial number. e.g. 123456
    "deviceSerialNumber":"ArrisChrisRDKVIP928sn",
    // The Client ID of the Product from developer.amazon.com
    "clientId":"amzn1.application-oa2-client.a4158ee16f1d49e6a0d4de61a7ba0e48",
    // Product ID from developer.amazon.com
    "productId":"Arris_Voice_Product"
    },
    All the appropriate dbase paths are set in this file as well as DEBUG9 logging object. I have not other custom configurations in this file.

Expected behavior:
I am have passed the Amazon 2 step authorization and the SamepleApplication goes to the idel state and then fails due to what I think is an alsa configuration issue and then disconnects.

We installed alsa-utils and when I run the alsa utilities function to see sound cards and recording devices I get:
root@IP928:/usr# cd lib
root@IP928:/usr/lib# aplay -l
aplay: device_list:272: no soundcards found...
root@IP928:/usr/lib# arecord -l
arecord: device_list:272: no soundcards found...
root@IP928:/usr/lib#
I think I see an example from a pi board on line where I should see the following:
arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Camera [Vimicro USB2.0 UVC Camera], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

In looking online at a Amazon avs-device sdk issue online which is for a pi board that uses a Broadcom chip we see the following configurations using alsa-utils which shows output configured for bcm2835/HDMI and a usb microphone input. We would like to use BCM7271/HDMI and usb microphone configuration and we would like to know if you can help guide us on how to get this configured.

...FROM Pi Board configuration
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Chris

@cdelsordo
Copy link
Author

SampleApplicationCreationFailure04-01-2019.txt

Here is the SampleApplication log attachment. Hopefully the attachment worked.

@cdelsordo
Copy link
Author

Mahesh,
We have gotten past the SampleApplication creation problem. we did the following:

  1. added usb audio kernel configurations so that our linux system could sense a usb audio device.
  2. we added an .asoundrc file and confgured alsa to use an input device from card1 slot
    pcm.!default {
    type asym
    playback.pcm {
    type plug
    slave.pcm "hw:0,0"
    }
    capture.pcm {
    type plug
    slave.pcm "hw:1,0"
    }
    }
    This got us past the PortAudioMicrophoneWrapper error and the SampleApplication comes up to the idle state.
    Next we asked "what is the weather" and did not hear a response. We still need to configure the audio sound /speakers.
    The attached log below shows the following error that we thing needs to be resolved.

2019-04-02 17:12:22.297 [ 4] E MediaPlayer:handleBusMessageError:source=decoder,error=Your GStreamer installation is missing a plug-in.,debug=../../../gst-plugins-base-1.10.4/gst/playback/gstdecodebin2.c(4593): gst_decode_bin_expose (): /GstPipeline:audio-pipeline/GstDecodeBin:decoder:
no suitable plugins found:
Missing decoder: ID3 tag (application/x-id3)

Which gst-plugins-base1.10.4 plugin am I missing? Sorry if I should be able to decipher this. My understanding is that gstreamer should be able to select the sound output path on its own and I am notr sure if alsa-configuration would play a part in that.
I appreciate your help!!

SampleApplicationDebugOutput04022019.txt

@cdelsordo
Copy link
Author

Mahesh,
I decided to open up another ticket since the ask has changed. I was thinking maybe that is the right next step. I will close this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants