szechyjs / dsd

Digital Speech Decoder
Other
703 stars 272 forks source link

Portaudio does not work on some chipsets #42

Open nivex opened 10 years ago

nivex commented 10 years ago

My guess is newer chipsets can't go down to 8000 natively. Will probably have to look up the native resolution of the device and upsample in the wrapper.

kjotte@daedalus:~/git/dsd/build$ pasuspender -- ./dsd -a
Digital Speech Decoder 1.7.0-dev (build:v1.6.0-73-g6a9aa07)
mbelib version 1.2.5
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)

PortAudio version number = 1899
PortAudio version text = 'PortAudio V19-devel (built Feb 25 2014 21:09:53)'
Number of devices = 14
--------------------------------------- device #0
Name                        = HDA Intel PCH: CX20590 Analog (hw:0,0)
Host API                    = ALSA
Max inputs = 2, Max outputs = 4
Default sample rate         = 44100.00
--------------------------------------- device #1
Name                        = HDA Intel PCH: HDMI 0 (hw:0,3)
Host API                    = ALSA
Max inputs = 0, Max outputs = 8
Default sample rate         = 44100.00
--------------------------------------- device #2
Name                        = HDA Intel PCH: HDMI 1 (hw:0,7)
Host API                    = ALSA
Max inputs = 0, Max outputs = 8
Default sample rate         = 44100.00
--------------------------------------- device #3
Name                        = HDA Intel PCH: HDMI 2 (hw:0,8)
Host API                    = ALSA
Max inputs = 0, Max outputs = 8
Default sample rate         = 44100.00
--------------------------------------- device #4
Name                        = sysdefault
Host API                    = ALSA
Max inputs = 128, Max outputs = 128
Default sample rate         = 48000.00
--------------------------------------- device #5
Name                        = front
Host API                    = ALSA
Max inputs = 0, Max outputs = 4
Default sample rate         = 44100.00
--------------------------------------- device #6
Name                        = surround40
Host API                    = ALSA
Max inputs = 0, Max outputs = 4
Default sample rate         = 44100.00
--------------------------------------- device #7
Name                        = surround51
Host API                    = ALSA
Max inputs = 0, Max outputs = 4
Default sample rate         = 44100.00
--------------------------------------- device #8
Name                        = surround71
Host API                    = ALSA
Max inputs = 0, Max outputs = 4
Default sample rate         = 44100.00
--------------------------------------- device #9
Name                        = hdmi
Host API                    = ALSA
Max inputs = 0, Max outputs = 8
Default sample rate         = 44100.00
--------------------------------------- device #10
Name                        = pulse
Host API                    = ALSA
Max inputs = 32, Max outputs = 32
Default sample rate         = 44100.00
--------------------------------------- device #11
Name                        = dmix
Host API                    = ALSA
Max inputs = 0, Max outputs = 2
Default sample rate         = 48000.00
--------------------------------------- device #12
[ Default Input, Default Output ]
Name                        = default
Host API                    = ALSA
Max inputs = 32, Max outputs = 32
Default sample rate         = 44100.00
--------------------------------------- device #13
[ Default OSS Input, Default OSS Output ]
Name                        = /dev/dsp
Host API                    = OSS
Max inputs = 16, Max outputs = 16
Default sample rate         = 44100.00
----------------------------------------------
kjotte@daedalus:~/git/dsd/build$ ./scan.sh | pasuspender -- ./dsd -i /dev/stdin -o pa:0 -f1
Digital Speech Decoder 1.7.0-dev (build:v1.6.0-73-g6a9aa07)
mbelib version 1.2.5
Decoding only P25 Phase 1 frames.
Initializing portaudio.
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
Using portaudio device 0.
Name                        = HDA Intel PCH: CX20590 Analog (hw:0,0)
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2722
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
An error occured while initializing a portaudio stream
Error number: -9997
Error message: Invalid sample rate
tdbone1 commented 9 years ago

same problem hear motherboard = Asus Z97I-Plus

tim@tim-All-Series:~/digital_speech/dsd/build$ ./dsd -a Digital Speech Decoder 1.7.0-dev (build:v1.6.0-79-g60807e0) mbelib version 1.2.5 ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave

PortAudio version number = 1899 PortAudio version text = 'PortAudio V19-devel (built Feb 25 2014 21:09:53)' Number of devices = 8 --------------------------------------- device #0 Name = HDA Intel HDMI: 0 (hw:0,3) Host API = ALSA Max inputs = 0, Max outputs = 8 Default sample rate = 44100.00 --------------------------------------- device #1 Name = HDA Intel HDMI: 1 (hw:0,7) Host API = ALSA Max inputs = 0, Max outputs = 2 Default sample rate = 44100.00 --------------------------------------- device #2 Name = HDA Intel PCH: ALC892 Analog (hw:1,0) Host API = ALSA Max inputs = 2, Max outputs = 0 Default sample rate = 44100.00 --------------------------------------- device #3 Name = HDA Intel PCH: ALC892 Digital (hw:1,1) Host API = ALSA Max inputs = 0, Max outputs = 2 Default sample rate = 44100.00 --------------------------------------- device #4 Name = HDA Intel PCH: ALC892 Alt Analog (hw:1,2) Host API = ALSA Max inputs = 2, Max outputs = 0 Default sample rate = 44100.00 --------------------------------------- device #5 Name = hdmi Host API = ALSA Max inputs = 0, Max outputs = 8 Default sample rate = 44100.00 --------------------------------------- device #6 Name = pulse Host API = ALSA Max inputs = 32, Max outputs = 32 Default sample rate = 44100.00 --------------------------------------- device #7 [ Default Input, Default Output ] Name = default Host API = ALSA Max inputs = 32, Max outputs = 32

Default sample rate = 44100.00

tim@tim-All-Series:~/digital_speech/dsd/build$ socat UDP-RECV:7355 - | ./dsd -i - -o pa:1 Digital Speech Decoder 1.7.0-dev (build:v1.6.0-79-g60807e0) mbelib version 1.2.5 Initializing portaudio. ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave Using portaudio device 1. Name = HDA Intel HDMI: 1 (hw:0,7) Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2722 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843 An error occured while initializing a portaudio stream Error number: -9997 Error message: Invalid sample rate 2015/01/13 16:14:55 socat[4494] E write(1, 0xc67ae0, 256): Broken pipe tim@tim-All-Series:~/digital_speech/dsd/build$

Oros42 commented 9 years ago

Same problem :-(

$ dsd -a
Digital Speech Decoder 1.7.0-dev (build:v1.6.0-79-g60807e0)
mbelib version 1.2.5
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave

PortAudio version number = 1899
PortAudio version text = 'PortAudio V19-devel (built Feb 25 2014 21:09:53)'
Number of devices = 6
--------------------------------------- device #0
Name                        = HDA NVidia: ALC888 Analog (hw:0,0)
Host API                    = ALSA
Max inputs = 2, Max outputs = 0
Default sample rate         = 44100.00
--------------------------------------- device #1
Name                        = HDA NVidia: ALC888 Alt Analog (hw:0,2)
Host API                    = ALSA
Max inputs = 2, Max outputs = 0
Default sample rate         = 44100.00
--------------------------------------- device #2
Name                        = HDA ATI HDMI: 0 (hw:1,3)
Host API                    = ALSA
Max inputs = 0, Max outputs = 8
Default sample rate         = 44100.00
--------------------------------------- device #3
Name                        = sysdefault
Host API                    = ALSA
Max inputs = 128, Max outputs = 0
Default sample rate         = 48000.00
--------------------------------------- device #4
Name                        = pulse
Host API                    = ALSA
Max inputs = 32, Max outputs = 32
Default sample rate         = 44100.00
--------------------------------------- device #5
[ Default Input, Default Output ]
Name                        = default
Host API                    = ALSA
Max inputs = 32, Max outputs = 32
Default sample rate         = 44100.00
----------------------------------------------
$ dsd -C /dev/ttyUSB0 -o pa:2
Digital Speech Decoder 1.7.0-dev (build:v1.6.0-79-g60807e0)
mbelib version 1.2.5
Initializing portaudio.
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Using portaudio device 2.
Name                        = HDA ATI HDMI: 0 (hw:1,3)
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2722
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
An error occured while initializing a portaudio stream
Error number: -9997
Error message: Invalid sample rate
obayhan commented 8 years ago

Same here :(

ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect() failed: Connection refused (111) ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave Cannot connect to server socket err = No such file or directory Cannot connect to server request channel

idl0r commented 6 years ago

Same here. It also shows a sample rate of 44100.00 for some reason, even though it's 96k default and 48k fallback. Might be a PA issue tough. Anyway, I just set SAMPLE_RATE_OUT to 48k as well for now.

sudo-nano commented 12 months ago

Same issue here. @idl0r what did you do to set SAMPLE_RATE_OUT to 48k?

idl0r commented 12 months ago

I don't remember, sorry.