Wrong audio config for Raspberry Pi caused by #82 - setting the variable "device"
See original GitHub issueAll other audio works fine. The Alexa service won’t start because it can’t work with Alsa. The log files are below.
pi@raspberrypi:~ $ sudo journalctl -u AlexaPi.service
-- Logs begin at Sun 2016-11-27 17:35:33 MST, end at Sun 2016-11-27 17:40:56 MST. --
Nov 27 17:35:36 raspberrypi systemd[1]: Starting Alexa client for all your devices...
Nov 27 17:35:36 raspberrypi systemd[1]: Started Alexa client for all your devices.
Nov 27 17:36:05 raspberrypi python[585]: Checking Internet Connection...
Nov 27 17:36:05 raspberrypi python[585]: Connection OK
Nov 27 17:36:08 raspberrypi pulseaudio[1014]: [pulseaudio] alsa-mixer.c: Volume element
Nov 27 17:36:08 raspberrypi pulseaudio[1014]: [pulseaudio] alsa-mixer.c: Volume element
Nov 27 17:36:08 raspberrypi pulseaudio[1014]: [pulseaudio] alsa-mixer.c: Volume element
Nov 27 17:36:08 raspberrypi pulseaudio[1014]: [pulseaudio] alsa-mixer.c: Volume element
Nov 27 17:36:08 raspberrypi pulseaudio[1014]: [pulseaudio] alsa-mixer.c: Volume element
Nov 27 17:36:09 raspberrypi pulseaudio[1014]: [pulseaudio] server-lookup.c: Unable to c
Nov 27 17:36:09 raspberrypi pulseaudio[1014]: [pulseaudio] main.c: Unable to contact D-
Nov 27 17:36:09 raspberrypi pulseaudio[1014]: [pulseaudio] bluez4-util.c: org.bluez.Man
Nov 27 17:36:09 raspberrypi python[585]: ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Un
Nov 27 17:36:09 raspberrypi python[585]: [02dd0f18] alsa audio output error: cannot ope
Nov 27 17:36:09 raspberrypi python[585]: [02dd0f18] core audio output error: Audio outp
Nov 27 17:36:09 raspberrypi python[585]: [02dd0f18] core audio output error: The audio
Nov 27 17:36:09 raspberrypi python[585]: No such file or directory.
Nov 27 17:36:09 raspberrypi python[585]: [02dd0f18] core audio output error: module not
Nov 27 17:36:09 raspberrypi python[585]: [73410fe0] core decoder error: failed to creat
Nov 27 17:36:11 raspberrypi python[585]: ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Un
Nov 27 17:36:11 raspberrypi python[585]: Traceback (most recent call last):
Nov 27 17:36:11 raspberrypi python[585]: File "/opt/AlexaPi/src/main.py", line 598, in
Nov 27 17:36:11 raspberrypi python[585]: loop()
Nov 27 17:36:11 raspberrypi python[585]: File "/opt/AlexaPi/src/main.py", line 509, in
Nov 27 17:36:11 raspberrypi python[585]: inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, als
Nov 27 17:36:11 raspberrypi python[585]: alsaaudio.ALSAAudioError: No such file or dire
Nov 27 17:36:12 raspberrypi systemd[1]: AlexaPi.service: main process exited, code=exit
Nov 27 17:36:12 raspberrypi systemd[1]: Unit AlexaPi.service entered failed state.
lines 1-29/29 (END)
/opt/AlexaPi/src/main.py -d
INFO: pocketsphinx.c(152): Parsed model-specific feature parameters from /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn live batch
-cmninit 40,3,-1 41.00,-5.29,-0.12,5.09,2.48,-4.07,-1.37,-1.78,-5.08,-2.05,-6.45,-1.42,1.17
-compallsen no no
-debug 0
-dict /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/cmudict-en-us.dict
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us
-input_endian little little
-jsgf
-keyphrase alexa
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1 1.000000e-05
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 22
-lm
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.300000e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec 0-12/13-25/26-38
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 20 20
-vad_startspeech 10 10
-vad_threshold 2.0 2.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'
INFO: acmod.c(166): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(149): Reading HMM transition probability matrices: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/transition_matrices
INFO: acmod.c(117): Attempting to use PTM computation module
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/means
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/variances
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(304): 222 variance values floored
INFO: ptm_mgau.c(476): Loading senones from dump file /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/sendump
INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(838): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 138824 * 20 bytes (2711 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/cmudict-en-us.dict
INFO: dict.c(213): Dictionary size 134723, allocated 1016 KiB for strings, 1679 KiB for phones
INFO: dict.c(336): 134723 words read
INFO: dict.c(358): Reading filler dictionary: /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us/noisedict
INFO: dict.c(213): Dictionary size 134728, allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(361): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 21336 bytes (20 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 21336 bytes (20 KiB) for single-phone word triphones
INFO: kws_search.c(406): KWS(beam: -1080, plp: -23, default threshold -113, delay 10)
Checking Internet Connection...
Connection OK
Play_Audio Request for: /opt/AlexaPi/src/resources/hello.mp3
Player State: State.Opening
Player State: State.Playing
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM raspberrypi
[025b3280] alsa audio output error: cannot open ALSA device "raspberrypi": No such file or directory
[025b3280] core audio output error: Audio output failed
[025b3280] core audio output error: The audio device "raspberrypi" could not be used:
No such file or directory.
[025b3280] core audio output error: module not functional
[73411020] core decoder error: failed to create audio output
Player State: State.Ended
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM raspberrypi
Traceback (most recent call last):
File "/opt/AlexaPi/src/main.py", line 598, in <module>
loop()
File "/opt/AlexaPi/src/main.py", line 509, in loop
inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, alsaaudio.PCM_NORMAL, config['sound']['input_device'])
alsaaudio.ALSAAudioError: No such file or directory [raspberrypi]
INFO: kws_search.c(448): TOTAL kws 0.00 CPU nan xRT
INFO: kws_search.c(451): TOTAL kws 0.00 wall nan xRT
upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################
!!Script ran on: Mon Nov 28 00:55:12 UTC 2016
!!Linux Distribution
!!------------------
ID_LIKE=debian
!!DMI Information
!!---------------
Manufacturer:
Product Name:
Product Version:
Firmware Version:
!!Kernel Information
!!------------------
Kernel release: 4.4.33-v7+
Operating System: GNU/Linux
Architecture: armv7l
Processor: unknown
SMP Enabled: Yes
!!ALSA Version
!!------------
Driver version: k4.4.33-v7+
Library version: 1.0.28
Utilities version: 1.0.28
!!Loaded ALSA modules
!!-------------------
snd_usb_audio
snd_usb_audio
!!Sound Servers on this system
!!----------------------------
Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - No
Jack:
Installed - Yes (/usr/bin/jackd)
Running - No
!!Soundcards recognised by ALSA
!!-----------------------------
0 [Device_1 ]: USB-Audio - USB Sound Device
USB Sound Device at usb-3f980000.usb-1.5, full speed
1 [Device ]: USB-Audio - USB PnP Sound Device
C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.4, full spe
!!Modprobe options (Sound related)
!!--------------------------------
snd_pcsp: index=-2
snd_usb_audio: index=-2
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2
!!Loaded sound module options
!!---------------------------
!!Module: snd_usb_audio
autoclock : Y
device_setup : 0,0,0,0,0,0,0,0
enable : Y,Y,Y,Y,Y,Y,Y,Y
id : (null),(null),(null),(null),(null),(null),(null),(null)
ignore_ctl_error : N
index : -2,-1,-1,-1,-1,-1,-1,-1
pid : -1,-1,-1,-1,-1,-1,-1,-1
vid : -1,-1,-1,-1,-1,-1,-1,-1
!!Module: snd_usb_audio
autoclock : Y
device_setup : 0,0,0,0,0,0,0,0
enable : Y,Y,Y,Y,Y,Y,Y,Y
id : (null),(null),(null),(null),(null),(null),(null),(null)
ignore_ctl_error : N
index : -2,-1,-1,-1,-1,-1,-1,-1
pid : -1,-1,-1,-1,-1,-1,-1,-1
vid : -1,-1,-1,-1,-1,-1,-1,-1
!!USB Mixer information
!!---------------------
--startcollapse--
USB Mixer: usb_id=0x0d8c0102, ctrlif=0, ctlerr=0
Card: USB Sound Device at usb-3f980000.usb-1.5, full speed
Unit: 2
Control: name="PCM Capture Volume", index=0
Info: id=2, control=2, cmask=0x3, channels=2, type="S16"
Volume: min=-4096, max=2832, dBmin=-1600, dBmax=1106
Unit: 2
Control: name="PCM Capture Switch", index=0
Info: id=2, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 7
Control: name="PCM Capture Source", index=0
Info: id=7, control=0, cmask=0x0, channels=1, type="U8"
Volume: min=1, max=4, dBmin=0, dBmax=0
Unit: 8
Control: name="Mic Capture Volume", index=0
Info: id=8, control=2, cmask=0x3, channels=2, type="S16"
Volume: min=-4096, max=2832, dBmin=-1600, dBmax=1106
Unit: 8
Control: name="Mic Capture Switch", index=0
Info: id=8, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 9
Control: name="Mic Playback Volume", index=0
Info: id=9, control=2, cmask=0x3, channels=2, type="S16"
Volume: min=-6144, max=1921, dBmin=-2400, dBmax=750
Unit: 9
Control: name="Mic Playback Switch", index=0
Info: id=9, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 11
Control: name="Line Playback Volume", index=0
Info: id=11, control=2, cmask=0x3, channels=2, type="S16"
Volume: min=-6144, max=1921, dBmin=-2400, dBmax=750
Unit: 11
Control: name="Line Playback Switch", index=0
Info: id=11, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 13
Control: name="Speaker Playback Volume", index=0
Info: id=13, control=2, cmask=0xff, channels=8, type="S16"
Volume: min=-9456, max=0, dBmin=-3693, dBmax=0
Unit: 13
Control: name="Speaker Playback Switch", index=0
Info: id=13, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 15
Control: name="Line Capture Volume", index=0
Info: id=15, control=2, cmask=0x3, channels=2, type="S16"
Volume: min=-4096, max=2832, dBmin=-1600, dBmax=1106
Unit: 15
Control: name="Line Capture Switch", index=0
Info: id=15, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 16
Control: name="IEC958 In Capture Switch", index=0
Info: id=16, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
USB Mixer: usb_id=0x0d8c013c, ctrlif=0, ctlerr=0
Card: C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.4, full spe
Unit: 10
Control: name="Auto Gain Control", index=0
Info: id=10, control=7, cmask=0x0, channels=1, type="BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 10
Control: name="Mic Capture Volume", index=0
Info: id=10, control=2, cmask=0x0, channels=1, type="S16"
Volume: min=0, max=6096, dBmin=0, dBmax=2381
Unit: 10
Control: name="Mic Capture Switch", index=0
Info: id=10, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
--endcollapse--
!!ALSA Device nodes
!!-----------------
crw-rw----+ 1 root audio 116, 0 Nov 27 17:35 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 32 Nov 27 17:35 /dev/snd/controlC1
crw-rw----+ 1 root audio 116, 24 Nov 27 17:35 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116, 16 Nov 27 17:36 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116, 56 Nov 27 17:35 /dev/snd/pcmC1D0c
crw-rw----+ 1 root audio 116, 1 Nov 27 17:35 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Nov 27 17:35 /dev/snd/timer
/dev/snd/by-id:
total 0
drwxr-xr-x 2 root root 80 Nov 27 17:35 .
drwxr-xr-x 4 root root 220 Nov 27 17:35 ..
lrwxrwxrwx 1 root root 12 Nov 27 17:35 usb-0d8c_USB_Sound_Device-00 -> ../controlC0
lrwxrwxrwx 1 root root 12 Nov 27 17:35 usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00 -> ../controlC1
/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 80 Nov 27 17:35 .
drwxr-xr-x 4 root root 220 Nov 27 17:35 ..
lrwxrwxrwx 1 root root 12 Nov 27 17:35 platform-3f980000.usb-usb-0:1.4:1.0 -> ../controlC1
lrwxrwxrwx 1 root root 12 Nov 27 17:35 platform-3f980000.usb-usb-0:1.5:1.0 -> ../controlC0
!!ALSA configuration files
!!------------------------
!!User specific config file (~/.asoundrc)
# 2008-11-15
#
# This .asoundrc will allow the following:
#
# - upmix stereo files to 5.1 speakers.
# - playback real 5.1 sounds, on 5.1 speakers,
# - allow the playback of both stere(oupmixed) and surround(5.1) sources at the same time.
# - use the 6th and 7th channel (side speakers) as a separate soundcard, i.e. for headphones
# (This is called the "alternate" output throughout the file, device names prefixed with 'a')
# - play mono sources in stereo (like skype & ekiga) on the alterate output
#
# Make sure you have "8 Channels" and NOT "6 Channels" selected in alsamixer!
#
# Please try the following commands, to make sure everything is working as it should.
#
# To test stereo upmix : speaker-test -c2 -Ddefault -twav
# To test surround(5.1): speaker-test -c6 -Dplug:dmix6 -twav
# To test alternative output: speaker-test -c2 -Daduplex -twav
# To test mono upmix: speaker-test -c1 -Dmonoduplex -twav
#
#
# It may not work out of the box for all cards. If it doesnt work for you, read the comments throughout the file.
# The basis of this file was written by wishie of #alsa, and then modified with info from various sources by
# squisher.
#Define the soundcard to use
pcm.snd_card {
type hw
card 0
device 0
}
# 8 channel dmix - output whatever audio, to all 8 speakers
pcm.dmix8 {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "snd_card"
rate 48000
channels 8
period_time 0
period_size 1024
buffer_time 0
buffer_size 5120
}
# Some cards, like the "nforce" variants require the following to be uncommented. It routes the audio to t he correct speakers.
bindings {
0 0
1 1
2 4
3 5
4 2
5 3
6 6
7 7
}
}
# upmixing - duplicate stereo data to all 6 channels
pcm.ch51dup {
type route
slave.pcm dmix8
slave.channels 8
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
ttable.0.4 0.5
ttable.1.4 0.5
ttable.0.5 0.5
ttable.1.5 0.5
}
# this creates a six channel soundcard
# and outputs to the eight channel one
# i.e. for usage in mplayer I had to define in ~/.mplayer/config:
# ao=alsa:device=dmix6
# channels=6
pcm.dmix6 {
type route
slave.pcm dmix8
slave.channels 8
ttable.0.0 1
ttable.1.1 1
ttable.2.2 1
ttable.3.3 1
ttable.4.4 1
ttable.5.5 1
}
# share the microphone, i.e. because virtualbox grabs it by default
pcm.microphone {
type dsnoop
ipc_key 1027
slave {
pcm "snd_card"
}
}
# rate conversion, needed i.e. for wine
pcm.2chplug {
type plug
slave.pcm "ch51dup"
}
pcm.a2chplug {
type plug
slave.pcm "dmix8"
}
# routes the channel for the alternative
# 2 channel output, which becomes the 7th and 8th channel
# on the real soundcard
pcm.alt2ch {
type route
slave.pcm "a2chplug"
slave.channels 8
ttable.0.6 1
ttable.1.7 1
}
# skype and ekiga are only mono, so route left channel to the right channel
# note: this gets routed to the alternative 2 channels
pcm.mono_playback {
type route
slave.pcm "a2chplug"
slave.channels 8
# Send Skype channel 0 to the L and R speakers at full volume
ttable.0.6 1
ttable.0.7 1
}
# 'full-duplex' device for use with aoss
pcm.duplex {
type asym
playback.pcm "2chplug"
capture.pcm "microphone"
}
pcm.aduplex {
type asym
playback.pcm "alt2ch"
capture.pcm "microphone"
}
pcm.monoduplex {
type asym
playback.pcm "mono_playback"
capture.pcm "microphone"
}
# for aoss
pcm.dsp0 "duplex"
ctl.mixer0 "duplex"
# softvol manages volume in alsa
# i.e. wine likes this
pcm.mainvol {
type softvol
slave.pcm "duplex"
control {
name "2ch-Upmix Master"
card 0
}
}
#pcm.!default "mainvol"
# set the default device according to the environment
# variable ALSA_DEFAULT_PCM and default to mainvol
pcm.!default {
@func refer
name { @func concat
strings [ "pcm."
{ @func getenv
vars [ ALSA_DEFAULT_PCM ]
default "mainvol"
}
]
}
}
# uncomment the following if you want to be able to control
# the mixer device through environment variables as well
#ctl.!default {
# @func refer
# name { @func concat
# strings [ "ctl."
# { @func getenv
# vars [ ALSA_DEFAULT_CTL
# ALSA_DEFAULT_PCM
# ]
# default "duplex"
# }
# ]
# }
#}
!!Aplay/Arecord output
!!--------------------
APLAY
**** List of PLAYBACK Hardware Devices ****
card 0: Device_1 [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
ARECORD
**** List of CAPTURE Hardware Devices ****
card 0: Device_1 [USB Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
!!Amixer output
!!-------------
!!-------Mixer controls for card 0 [Device_1]
Card hw:0 'Device_1'/'USB Sound Device at usb-3f980000.usb-1.5, full speed'
Mixer name : 'USB Mixer'
Components : 'USB0d8c:0102'
Controls : 17
Simple ctrls : 7
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
Limits: Playback 0 - 197
Mono:
Front Left: Playback 190 [96%] [-1.32dB] [on]
Front Right: Playback 190 [96%] [-1.32dB] [on]
Rear Left: Playback 190 [96%] [-1.32dB] [on]
Rear Right: Playback 190 [96%] [-1.32dB] [on]
Front Center: Playback 191 [97%] [-1.13dB] [on]
Woofer: Playback 190 [96%] [-1.32dB] [on]
Side Left: Playback 191 [97%] [-1.13dB] [on]
Side Right: Playback 191 [97%] [-1.13dB] [on]
Simple mixer control 'PCM',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 6928
Front Left: Capture 6303 [91%] [8.61dB] [on]
Front Right: Capture 6303 [91%] [8.61dB] [on]
Simple mixer control 'PCM Capture Source',0
Capabilities: enum
Items: 'Mic' 'Line' 'IEC958 In' 'Mixer'
Item0: 'Mic'
Simple mixer control 'Line',0
Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 8065 Capture 0 - 6928
Front Left: Playback 7826 [97%] [6.56dB] [off] Capture 0 [0%] [-16.00dB] [off]
Front Right: Playback 7826 [97%] [6.56dB] [off] Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Mic',0
Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 8065 Capture 0 - 6928
Front Left: Playback 7778 [96%] [6.37dB] [off] Capture 6308 [91%] [8.63dB] [on]
Front Right: Playback 7778 [96%] [6.37dB] [off] Capture 6308 [91%] [8.63dB] [on]
Simple mixer control 'IEC958 In',0
Capabilities: cswitch cswitch-joined
Capture channels: Mono
Mono: Capture [on]
Simple mixer control '2ch-Upmix Master',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 255
Front Left: 255 [100%]
Front Right: 255 [100%]
!!-------Mixer controls for card 1 [Device]
Card hw:1 'Device'/'C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.4, full spe'
Mixer name : 'USB Mixer'
Components : 'USB0d8c:013c'
Controls : 4
Simple ctrls : 2
Simple mixer control 'Mic',0
Capabilities: cvolume cvolume-joined cswitch cswitch-joined
Capture channels: Mono
Limits: Capture 0 - 16
Mono: Capture 13 [81%] [19.34dB] [on]
Simple mixer control 'Auto Gain Control',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
!!Alsactl output
!!--------------
--startcollapse--
state.Device_1 {
control.1 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
value.6 0
value.7 0
comment {
access read
type INTEGER
count 8
range '0 - 36'
}
}
control.2 {
iface PCM
name 'Capture Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.3 {
iface MIXER
name 'Mic Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.4 {
iface MIXER
name 'Mic Playback Volume'
value.0 7778
value.1 7778
comment {
access 'read write'
type INTEGER
count 2
range '0 - 8065'
dbmin -2400
dbmax 750
dbvalue.0 637
dbvalue.1 637
}
}
control.5 {
iface MIXER
name 'Line Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.6 {
iface MIXER
name 'Line Playback Volume'
value.0 7826
value.1 7826
comment {
access 'read write'
type INTEGER
count 2
range '0 - 8065'
dbmin -2400
dbmax 750
dbvalue.0 656
dbvalue.1 656
}
}
control.7 {
iface MIXER
name 'Speaker Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.8 {
iface MIXER
name 'Speaker Playback Volume'
value.0 190
value.1 190
value.2 190
value.3 190
value.4 191
value.5 190
value.6 191
value.7 191
comment {
access 'read write'
type INTEGER
count 8
range '0 - 197'
dbmin -3693
dbmax 0
dbvalue.0 -132
dbvalue.1 -132
dbvalue.2 -132
dbvalue.3 -132
dbvalue.4 -113
dbvalue.5 -132
dbvalue.6 -113
dbvalue.7 -113
}
}
control.9 {
iface MIXER
name 'Mic Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.10 {
iface MIXER
name 'Mic Capture Volume'
value.0 6308
value.1 6308
comment {
access 'read write'
type INTEGER
count 2
range '0 - 6928'
dbmin -1600
dbmax 1106
dbvalue.0 863
dbvalue.1 863
}
}
control.11 {
iface MIXER
name 'Line Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.12 {
iface MIXER
name 'Line Capture Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 6928'
dbmin -1600
dbmax 1106
dbvalue.0 -1600
dbvalue.1 -1600
}
}
control.13 {
iface MIXER
name 'IEC958 In Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.14 {
iface MIXER
name 'PCM Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.15 {
iface MIXER
name 'PCM Capture Volume'
value.0 6303
value.1 6303
comment {
access 'read write'
type INTEGER
count 2
range '0 - 6928'
dbmin -1600
dbmax 1106
dbvalue.0 861
dbvalue.1 861
}
}
control.16 {
iface MIXER
name 'PCM Capture Source'
value Mic
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Mic
item.1 Line
item.2 'IEC958 In'
item.3 Mixer
}
}
control.17 {
iface MIXER
name '2ch-Upmix Master'
value.0 255
value.1 255
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '00000001000000080000000000000014'
dbmin 0
dbmax 5100
dbvalue.0 5100
dbvalue.1 5100
}
}
}
state.Device {
control.1 {
iface PCM
name 'Capture Channel Map'
value 0
comment {
access read
type INTEGER
count 1
range '0 - 36'
}
}
control.2 {
iface MIXER
name 'Mic Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.3 {
iface MIXER
name 'Mic Capture Volume'
value 13
comment {
access 'read write'
type INTEGER
count 1
range '0 - 16'
dbmin 0
dbmax 2381
dbvalue.0 1934
}
}
control.4 {
iface MIXER
name 'Auto Gain Control'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
}
--endcollapse--
!!All Loaded Modules
!!------------------
Module
bnep
hci_uart
btbcm
bluetooth
snd_usb_audio
snd_hwdep
snd_usbmidi_lib
snd_rawmidi
brcmfmac
snd_seq_device
brcmutil
snd_pcm
snd_timer
snd
cfg80211
rfkill
bcm2835_gpiomem
i2c_bcm2708
bcm2835_wdt
evdev
uio_pdrv_genirq
uio
i2c_dev
fuse
ipv6
!!ALSA/HDA dmesg
!!--------------
[ 4.191882] usb 1-1.5: [2] FU [PCM Capture Volume] ch = 2, val = -4096/2832/1
[ 4.193710] usbcore: registered new interface driver snd-usb-audio
[ 4.231662] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Pi3 Audio Setting Error!!!!! - Raspberry Pi Forums
I want to use my 3.5MM headphone jack. When I use raspi-config,it get Error like follow: There was an error running option A8...
Read more >Raspberry Pi Documentation - The config.txt file
Causes the content of the specified file to be inserted into the current file. ... Try setting this value if the display detection...
Read more >Pi Zero W2 and Bullseye: *** no cameras available
Hi everyone, I did a fresh install of the latest version of Raspberry Pi OS Lite (bullseye) and the camera is not recognized....
Read more >Pi4 Raspbian "No audio devices found" - can't get 3.5mm jack ...
I'm running the latest version of Raspbian desktop. When I go to sudo raspi-config > system options > S2 Audio and hit enter,...
Read more >sox default device - Raspberry Pi Forums
play FAIL sox: Sorry, there is no default audio device configured ... setting the audio device with the environment variable AUDIODEV with:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this does not seem right:
Did that reference to raspberrypi get set in the config.yaml in the wrong place somehow? whats in the audio output section for output: and output_device:
@AZ-Cam-Op I’m not sure what the issue is - whether it’s a PA bug, wrong config, or something else.
Just to make sure, please post again the output of
journalctl -u AlexaPi.service
and output when you run it interactively in debug mode, both with the fixed config.