Hello, Dear Habrovicane. Write this article brought me to my favorite Ubuntu distribution and TV tuner Avermedia Avertv 507, with which I had problems with a clean installation of Ubuntu 9.10, and many other Linux users.
And this is my first topic, for which I received an invite. And the thing is that most of the instructions for setting up this tuner made a lot of mistakes, a lot of disagreements, not to mention that at the time of tuning the tuner, there were no articles for the Ubuntu 9.10 core, and it was very difficult to tune the tuner .
So, to help many people who have already spent all their nerves, I will give below an algorithm for setting up the above-mentioned tuner with explanations and the correct configs.
And those who, as they say, in a cap, can simply snoop on configs.
To watch tv we will use tvtime, for remote control the lirc package
Install them through the package manager or via the console:
sudo apt-get install tvtime
sudo apt-get install lirc
')
During installation, tvtime will ask us about the broadcast standard. For most people in Russia, it is Pal-DK and Secam, in my Sochi it is Secam.
Choose anything, since we will still rule configs. The same applies to the choice of chipset for Lirc.
After installing the packages, we need to tell tvtim our chipset numbers (card and tuner), and the numbers for the new kernel. Also for the new core it was necessary to remove some parameters, otherwise the TV tuner did not want to be friends with us. Especially for you, here and now, true working config :)
Create a file with config
sudo nano /etc/modprobe.d/aliases
in which we write:
alias char-major-81 videodev
options i2c-algo-bit bit_test=1
options saa7134 card=102 tuner=38
options tuner secam=d
alias char-major-81-0 saa7134
alias char-major-81-1 off
alias char-major-81-2 off
alias char-major-81-3 off
Save, reboot :)
Now the TV tuner should show a picture, it remains to scan and add channels.
I advise you to add them manually, so as not to have a lot of problems, like mine.
The frequency table in the settings of my time is selected “Other”, the channel settings are in the file
~ / .tvtime / stationlist.xml
I draw your attention to the fact that the file with the channels must be in the user directory and you need to create it from a regular user so that the user has the necessary access rights to the file and can read it.
I will give my file as a reference, but note that in other cities (I have Sochi) the frequency of the channels is different. I picked up my frequencies by scanning channels on a regular TV.
You can set up channels and autoscan, but if you want them to go in the order you need and work everything - only manually.
So, my stationlist.xml:
<? xml version = "1.0" ? >
<! DOCTYPE stationlist PUBLIC "- // tvtime // DTD station list 1.0 // EN" " tvtime.sourceforge.net/DTD/stationlist1.dtd " >
< stationlist xmlns = " tvtime.sourceforge.net/DTD " >
< list norm = "SECAM" frequencies = "custom" audio = "dk" >
< station name = "1" active = "1" position = "1" band = "Custom" channel = "49.00MHz" finetune = "9" norm = "SECAM" audio = "auto" />
< station name = "2" active = "1" position = "2" band = "Custom" channel = "207.00 MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "3" active = "1" position = "3" band = "Custom" channel = "495.00 MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "4" active = "1" position = "4" band = "Custom" channel = "191.00 MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "5 active =" 1 " position =" 5 " band =" Custom " channel =" 535.00 MHz " finetune =" 0 " norm =" SECAM " audio =" auto " />
< station name = "6" active = "1" position = "6" band = "Custom" channel = "77,00MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "7" active = "1" position = "7" band = "Custom" channel = "575.00 MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "8" active = "1" position = "8" band = "Custom" channel = "623.00MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "9" active = "1" position = "9" band = "Custom" channel = "591.00MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "10" active = "1" position = "10" band = "Custom" channel = "679.00MHz" finetune = "0" norm = "SECAM" audio = "auto" />
< station name = "11" active = "1" position = "11" band = "Custom" channel = "711.00 MHz" finetune = "0" norm = "SECAM" audio = "auto" />
</ list >
</ stationlist >
* This source code was highlighted with Source Code Highlighter .
Pay attention to quotes, they ate habraprisers.
Custom here means that the channels belong to the “Other” frequency table, and not “Russia”, for example.
Now we will deal with the sound. My problem was that no wires were attached to the TV tuner.
Neither internal nor external. Fortunately, I found an external wire with the correct connector and length, which came with my PC speakers.
You can get the wire in the store.
So, we got the wire :)
We connect the wire to the line-in connector of the sound card at one end, and to the audio output connector of the tuner, respectively, at the other end.
If the sound does not appear, then go to
- > ->
Go to the input tab, check that the receiving sound device of your computer is selected, and “Analog input” is selected as the input channel
But if now even treacherously the sound does not want to appear, in the terminal we give the command
alsamixer
Here we have two important parameters, Line and Surround.
Surround set to the position of "Independent", in Line raise the volume slider. If the Line below the slider is not a signature “00”, but “MM”, which means mute, press the English letter “M” on the keyboard and turn on the sound. Now the sound could not make :)
It took me a lot of work to reveal such a pattern :)
It remains for us to configure and program the console.
First, we define the address of the console:
cat /proc/bus/input/devices
In the issue we find something like
I: Bus=0001 Vendor=1461 Product=a11b Version=0001
N: Name="saa7134 IR (Avermedia AVerTV St"
P: Phys=pci-0000:05:07.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:09.0/0000:05:07.0/input/input6
U: Uniq=
H: Handlers=kbd event6
B: EV=100003
B: KEY=40fc310 82140000 0 0 0 0 2048000 180 4001 9e0000 0 0 ffc
Here event6 is important to us. you can have it, for example, event5
Next, edit the file /etc/lirc/hardware.conf
sudo nano /etc/lirc/hardware.conf
Correct the following lines:
REMOTE_MODULES=»"
REMOTE_DRIVER=»dev/input»
REMOTE_DEVICE=»/dev/input/event6″
REMOTE_LIRCD_CONF=»/etc/lirc/lircd.conf»
My file ends up looking like this:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="AverMedia TV card (TVCapture TVPhone) (card=6)"
REMOTE_MODULES=""
REMOTE_DRIVER="dev/input"
REMOTE_DEVICE="/dev/input/event6"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_LIRCD_ARGS=""
#Chosen IR Transmitter
TRANSMITTER="Custom"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
#Enable lircd
START_LIRCD="true"
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"
#Try to load appropriate kernel modules
LOAD_MODULES="true"
# Default configuration files for your hardware if any
LIRCMD_CONF=""
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
Now let's program the console (change the event6 to its value):
sudo irrecord -H dev/input -d /dev/input/event6 /etc/lirc/lircd.conf
The wizard will ask us to press on any keys. We press until we are notified of the successful completion of the procedure.
Now enter the name of the button, press enter. We have about 5 seconds to press the button on the remote that you entered.
Attention , the names of the buttons are reserved! If you enter your names, the wizard will give you an error. I have posted the list of allowed titles for you here.
Repeat the procedure for all the buttons we need, press enter.
Restart the daemon daemon, which reads configs:
sudo /etc/init.d/lirc restart
It's time to check if we did everything right.
Enter the command in the terminal
irw
Now click on the buttons of the remote. If the terminal displays the physical addresses of the buttons, then we are on the right track.
Go to the last stage.
Create a file associating TVtime commands with buttons on the console:
cd ~
nano .lircrc
According to this sample, for each button that you give the name, we indicate the Twtime command:
begin
prog = irexec
button = KEY_POWER
config = tvtime &
config = tvtime-command QUIT
end
Here is my file, with the main buttons I need:
begin
prog = irexec
button = KEY_POWER
config = tvtime &
config = tvtime-command QUIT
end
begin
prog = irexec
button = KEY_VOLUMEUP
config = tvtime-command CHANNEL_UP
end
begin
prog = irexec
button = KEY_VOLUMEDOWN
config = tvtime-command CHANNEL_DOWN
end
begin
prog = irexec
button = KEY_NEXT
config = tvtime-command RIGHT
end
begin
prog = irexec
button = KEY_LAST
config = tvtime-command LEFT
end
begin
prog = irexec
button = BTN_1
config = tvtime-command CHANNEL_1
end
begin
prog = irexec
button = BTN_2
config = tvtime-command CHANNEL_2
end
begin
prog = irexec
button = BTN_3
config = tvtime-command CHANNEL_3
end
begin
prog = irexec
button = BTN_4
config = tvtime-command CHANNEL_4
end
begin
prog = irexec
button = BTN_5
config = tvtime-command CHANNEL_5
end
begin
prog = irexec
button = BTN_6
config = tvtime-command CHANNEL_6
end
begin
prog = irexec
button = BTN_7
config = tvtime-command CHANNEL_7
end
begin
prog = irexec
button = BTN_8
config = tvtime-command CHANNEL_8
end
begin
prog = irexec
button = BTN_9
config = tvtime-command CHANNEL_9
end
begin
prog = irexec
button = BTN_0
config = tvtime-command CHANNEL_0
end
begin
prog = irexec
button = KEY_MUTE
config = tvtime-command TOGGLE_MUTE
end
begin
prog = irexec
button = KEY_MENU
config = tvtime-command TOGGLE_FULLSCREEN
end
And now my /etc/lirc/lircd.conf file, so you can check if you are in any doubt:
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.6(devinput) on Fri Nov 6 16:23:42 2009
#
# contributed by
#
# brand: /etc/lirc/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name /etc/lirc/lircd.conf
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0x8001
gap 35992
toggle_bit_mask 0x0
begin codes
KEY_VOLUMEUP 0x0192
KEY_VOLUMEDOWN 0x017F
KEY_MUTE 0x0071
KEY_NEXT 0x0073
KEY_LAST 0x0072
BTN_0 0x000B
BTN_1 0x0002
btn_2 0x0003
BTN_3 0x0004
btn_4 0x0005
BTN_5 0x0006
BTN_6 0x0007
BTN_7 0x0008
BTN_8 0x0009
BTN_9 0x000A
KEY_MENU 0x0174
KEY_POWER 0x0074
end codes
end remote
To start the console, add the irexec -d command to the applications to be started at boot time.
That's all, enjoy your watching :)
Postscript: moved to the collective blog
Postpoststriptum: that in the menu of a choice of users there were no sounds of the TV
gedit ~/.tvtime/tvtime.xml
add row
< option name = "MuteOnExit" value = "1" />
and save