星期日, 十二月 16, 2007

ubuntu下使用赛维的sv2200(F)

折腾好久,终于把赛维的SV2200(F)在ubuntu下用起来了,方法总结一下就是:
在/etc/modprobe.d下创建一个文件saa7134
里面内容为
options saa7134 card=53 tuner=54
重新启动一下,就可以用了,效果和windows下的好像没有区别

但是仅仅这样做好像用tvtime看电视会没有声音,查看网上的资料发现需要借助另一个软件实现
自己写一个shell脚本,内容为

#!/bin/sh
(sleep 6; amixer -c 0 sset PCM 100%,100% unmute; sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 32000 /dev/dsp) &
tvtime --mixer=/dev/mixer:pcm
wait tvtime
t=`pidof sox`;
kill $t;

也可以使用arecord,对应的脚本稍有变化

#!/bin/sh
(sleep 6; amixer -c 0 sset PCM 100%,100% unmute; arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -) &
tvtime
wait tvtime
t=`pidof arecord`;
kill $t;

使用此脚本运行tvtime即可

参考了:
http://forum.ubuntu.org.cn/viewtopic.php?t=493&highlight=%E7%94%B5%E8%A7%86%E5%8D%A1
http://www.linuxtv.org/v4lwiki/index.php/Saa7134-alsa
http://www.linuxtv.org/v4lwiki/index.php/Generic_SAA7134_Card_Installation
http://gentoo-wiki.com/HARDWARE_saa7134