I assume the usb stick become /dev/video0 and audio became card 1 (card 0 is an onboard audio device)
#> v4lctl -c /dev/video0 setattr input Composite1
#> v4lctl -c /dev/video0 setattr mute off
#> amixer -c 1 sset Line,0 50%,50% unmute cap
test with:
#> arecord -D hw:1,0 -f S16_LE -c2 -r48000 | aplay
To execute this commands automatically on plugin udev could be used:
I have a cheap msi movie vox mini stick using em28xx driver with an option set:
/etc/modprobe.d/local.conf
options em28xx card=38
/etc/udev/rules.d/90-usbvideo.rules:
ACTION=="add", KERNEL=="video*", DRIVERS=="usb", ATTRS{idVendor}=="eb1a", ATTRS{idProduct}=="2861", RUN+="/usr/bin/v4lctl -c /dev/%k setattr input Composite1"
ACTION=="add", KERNEL=="video*", DRIVERS=="usb", ATTRS{idVendor}=="eb1a", ATTRS{idProduct}=="2861", RUN+="/usr/bin/v4lctl -c /dev/%k setattr mute off"
ACTION=="add", KERNEL=="video*", DRIVERS=="usb", ATTRS{idVendor}=="eb1a", ATTRS{idProduct}=="2861", RUN+="/usr/bin/logger video init %k done"
ACTION=="add", KERNEL=="controlC[0-9]*", DRIVERS=="usb", ATTRS{idVendor}=="eb1a", ATTRS{idProduct}=="2861", RUN+="/usr/bin/amixer -c %n sset Line,0 50%,50% unmute cap"
ACTION=="add", KERNEL=="controlC[0-9]*", DRIVERS=="usb", ATTRS{idVendor}=="eb1a", TTRS{idProduct}=="2861", RUN+="/usr/bin/logger audio init card %n done"
v4lctl needs some time to finish, to check the settings use:
v4lctl -c /dev/video0 show
[ view entry ] ( 5178 views ) | print article
<<First <Back | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Next> Last>>