Cannot get this working on Ubuntu 16.04. Below is the output demonstrating the problem.
blabj@thinkbuntu:~/ppmadapter$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
blabj@thinkbuntu:~/ppmadapter$ uname -a
Linux thinkbuntu 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
blabj@thinkbuntu:~/ppmadapter$ ls -l /dev/uinput
crw-rw---- 1 root adm 10, 223 Apr 22 07:34 /dev/uinput
blabj@thinkbuntu:~/ppmadapter$ groups
blabj adm dialout cdrom plugdev lpadmin admin sambashare vboxusers
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter inputs
Input audio devices
-------------------
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
HDA Intel: ALC269 Analog (hw:0,0)
HDA Intel: HDMI 0 (hw:0,3)
sysdefault
front
surround40
surround51
surround71
hdmi
pulse
dmix
default
/dev/dsp
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i hw:0,0 run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: HDA Intel: ALC269 Analog (hw:0,0)
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 205, in main
with PPMDecoder(rate) as ppm:
File "ppmadapter/__init__.py", line 75, in __init__
ecodes.EV_KEY: {288: 'BTN_JOYSTICK'}
File "/home/blabj/.local/lib/python2.7/site-packages/evdev/uinput.py", line 136, in __init__
_uinput.create(self.fd, name, vendor, product, version, bustype, absinfo)
IOError: [Errno 22] Invalid argument
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i hw:0,3 run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: HDA Intel: HDMI 0 (hw:0,3)
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i hw:0 run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: HDA Intel: HDMI 0 (hw:0,3)
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i sysdefault run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: sysdefault
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 205, in main
with PPMDecoder(rate) as ppm:
File "ppmadapter/__init__.py", line 75, in __init__
ecodes.EV_KEY: {288: 'BTN_JOYSTICK'}
File "/home/blabj/.local/lib/python2.7/site-packages/evdev/uinput.py", line 136, in __init__
_uinput.create(self.fd, name, vendor, product, version, bustype, absinfo)
IOError: [Errno 22] Invalid argument
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i front run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: front
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i surround40 run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: surround40
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i surround51 run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: surround51
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i surround71 run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: surround71
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i hdmi run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: hdmi
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i pulse run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: pulse
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 205, in main
with PPMDecoder(rate) as ppm:
File "ppmadapter/__init__.py", line 75, in __init__
ecodes.EV_KEY: {288: 'BTN_JOYSTICK'}
File "/home/blabj/.local/lib/python2.7/site-packages/evdev/uinput.py", line 136, in __init__
_uinput.create(self.fd, name, vendor, product, version, bustype, absinfo)
IOError: [Errno 22] Invalid argument
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i dmix run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: dmix
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 202, in main
input_device_index=in_ix)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i default run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: default
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 205, in main
with PPMDecoder(rate) as ppm:
File "ppmadapter/__init__.py", line 75, in __init__
ecodes.EV_KEY: {288: 'BTN_JOYSTICK'}
File "/home/blabj/.local/lib/python2.7/site-packages/evdev/uinput.py", line 136, in __init__
_uinput.create(self.fd, name, vendor, product, version, bustype, absinfo)
IOError: [Errno 22] Invalid argument
blabj@thinkbuntu:~/ppmadapter$ python -m ppmadapter -i /dev/dsp run
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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Using input: /dev/dsp
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/blabj/ppmadapter/ppmadapter/__main__.py", line 5, in <module>
sys.exit(ppmadapter.main())
File "ppmadapter/__init__.py", line 205, in main
with PPMDecoder(rate) as ppm:
File "ppmadapter/__init__.py", line 75, in __init__
ecodes.EV_KEY: {288: 'BTN_JOYSTICK'}
File "/home/blabj/.local/lib/python2.7/site-packages/evdev/uinput.py", line 136, in __init__
_uinput.create(self.fd, name, vendor, product, version, bustype, absinfo)
IOError: [Errno 22] Invalid argument
blabj@thinkbuntu:~/ppmadapter$ ls -l /dev/dsp
crw-rw-rw- 1 root root 14, 3 Apr 22 07:34 /dev/dsp