bthardware
index
/usr/local/share/apps/kbtv/bthardware.py

Hardware detection and setup for bktr, saa, audio wiring

 
Modules
       
btcopyright
buildprefs
commands
os
ossaudiodev
time

 
Functions
       
bktr_access()
-> bool, bool
 
Uses os.stat() to perform a stat() system call on BKTR_DEVICE and
TUNER_DEVICE and checks the user's group memberships. True if 
permissions, ownership, and group membership are as required. 
Likewise, False if not, or on failure. This for both devices.
 
The imposed requirements are: 
- RW permissions for owner and group, none for others
- Ownership by root:operator (UID 0, GID 5)
- User must be a member of the operator group
 
Note that by default FreeBSD creates these nodes owned by root:wheel.
The wheel group is undesirable if common practice is followed where
RW permissions are set for the group while making the user a member
of the group. The operator group is better suited and commonly used 
for this.
bktr_access_commit()
-> bool
 
Attempts to change and write the required permissions and ownership 
(see bktr_access()). Returns True on success, False on failure. You 
must have UID 0 (root). This function will write to DEVFS_CONF and 
then restart devfs.
 
Note that this function does not check if the rules in DEVFS_OWN_PERM
are already in the config file, and appends the same thing over and 
over if asked.
bktr_card_tuner()
-> (string, string)
 
Searches the message buffer (via sysctl kern.msgbuf or dmesg) to find 
out which card and tuner type was last reported by the driver. It 
returns a tuple of strings (card, tuner) which are in BKTR_CARDS and BKTR_TUNERS 
respectively. Only the *first* device (bktr0) is considered.
 
If any of the sysctls hw.bt848.card or hw.bt848.tuner are set, they
are assumed to override the driver detected defaults correctly. The 
string "<sysctl:N>" is appended, where N is the sysctl value.
 
Note that there is no guarantee that any sysctl settings are correct.
bktr_chip()
-> string
 
Retrieves the description string for the chip, e.g. "BrookTree 878".
Uses sysctl and only for the *first* bktr device: dev.bktr.0.%desc.
bktr_module_commit()
-> bool
 
Attempts to write the bktr_load directive to the loader config file
specified by LOADER_CONF. First bktr_module_loaded() is called and if
succesful, bktr_load="YES" is appended to the file. Returns True on
success, False in any other case. You must have UID 0 (root).
 
Note that this function does not check if the directive is already in
the config file, and appends the same thing over and over if asked.
bktr_module_loaded()
-> bool
 
Runs kldstat to see if bktr module is loaded. Returns True or False.
 
Note that the module not being loaded can also mean that bktr is 
built into the kernel, in which case you can't and shouldn't load it.
bktr_module_try()
-> bool
 
Attempts to kldload the bktr module, if not already loaded. If succesful
or if already loaded the return value is True. In all other cases, 
including when the caller has no root permissions, False is returned.
 
Note that the module not being loaded can also mean that bktr is
built into the kernel, in which case you can't and shouldn't load it.
Also note that quite a few TV cards need to have the tuner type set
with sysctl.
bktr_norm()
-> string
 
Returns the input norm, "NTSC", "PAL", "SECAM". Calls the function
bktr_card_tuner() to get the tuner string and extracts the norm
from that. The norms are also in NORMS. Returns "" on failure.
bktr_sysctls()
-> (int, int)
 
Retrieves the sysctls hw.bt848.card and hw.bt848.tuner and returns 
them as a tuple of integers (card, tuner) if the values are valid
(corresponding with the index of BKTR_CARDS and BKTR_TUNERS). If a value is
invalid it is changed to -1. If there are no devices (then there
are no sysctls), the value also becomes -1.
 
Note that there is no guarantee that any sysctl settings are correct.
bktr_sysctls_commit()
-> bool
 
Attempts to write the sysctls hw.bt848.card and hw.bt848.tuner to
the config file specified by SYSCTL_CONF. First getBktrSysctls() is
called and if not -1 they are appended to the file. Returns True on 
success, False in any other case. You must have UID 0 (root).
 
Note that this function does not check if the sysctls are already in
the config file, and appends the same thing over and over if asked.
bktr_sysctls_set(card, tuner)
-> (bool, bool)
 
Sets the sysctl hw.bt848.card and hw.bt848.tuner and returns a tuple
of booleans for card and tuner respectively; True on success, False on 
failure. Failure occurs if the caller has no root permissions, and if
a sysctl got set and then retrieved but turns out to be not equal to
the one it was supposed to be set to. If there is no hardware, the 
sysctls are invalid and False is returned.
 
Note that there is no guarantee that any sysctl settings are correct.
bktr_user_add(uid)
-> bool
 
Attempts to add uid (string or int) as an additional member of the 
operator group using PW_GROUPMOD. Returns True on success, False 
on failure. You must have UID 0 (root).
mixer_channels()
-> List
 
Returns a sublist of MIXER_CHANNELS that are actually valid on this box
(e.g. supported by soundcard and by ossmixer).
mixer_volume(chan)
-> int
 
Returns the volume for mixer channel chan, where chan is an index of 
MIXER_CHANNELS. It returns a tuple (left, right). If the channel 
does not exist on this mixer/card or if the mixer can't be opened it 
returns (-1, -1).
mixer_volume_set(chan, vol)
-> void
 
Sets the volume for mixer channel chan to vol [0..100], where chan
is an index of MIXER_CHANNELS. If not, it silently fails. The volume
should be a tuple (left, right).
pwc_access()
-> bool
 
Uses os.stat() to perform a stat() system call on PWC_DEVICE and
checks the user's group memberships. True if permissions, ownership, 
and group membership are as required. Likewise, False if not, or on 
failure.
 
The imposed requirements are: 
- RW permissions for owner and group, none for others
- Ownership by root:operator (UID 0, GID 5)
- User must be a member of the operator group
 
Note that by default the pwc driver creates this node owned by 
root:operator already, but with RW permissions for anyone. While
understandable, this is undesirable and potentially unsafe.
pwc_access_commit()
-> bool
 
Attempts to change and write the required permissions and ownership 
(see pwc_access()). Returns True on success, False on failure. You 
must have UID 0 (root). This function will write to DEVFS_CONF and 
then restart devfs.
 
Note that this function does not check if the rules in DEVFS_OWN_PERM
are already in the config file, and appends the same thing over and 
over if asked.
pwc_module_commit()
-> bool
 
Attempts to write the pwc_load directive to the loader config file
specified by LOADER_CONF. First pwc_module_loaded() is called and if
succesful, pwc_load="YES" is appended to the file. Returns True on
success, False in any other case. You must have UID 0 (root).
 
Note that this function does not check if the directive is already in
the config file, and appends the same thing over and over if asked.
pwc_module_loaded()
-> bool
 
Runs kldstat to see if pwc module is loaded. Returns True or False.
 
Note that unlike bktr, pwc is only used as a kld. So this can be used 
at runtime to determine availablity in an unambigueous way.
pwc_module_try()
-> bool
 
Attempts to kldload the pwc module, if not already loaded. If succesful
or if already loaded the return value is True. In all other cases, 
including when the caller has no root permissions, False is returned.
 
Note that the unlike bktr, the saa driver is always to be used as a kld.
pwc_user_add(uid)
-> bool
 
Calls bktr_user_add(uid), which is not bktr specific.
pwc_vendor_product()
-> (string, string)
 
Returns the vendor and product name as a tuple of strings. Uses sysctl 
dev.pwc.0%pnpinfo to find the vendor and product number, compares it to 
the numbers in PWC_VENDORS and PWC_PRODUCTS and if there's a match, 
returns the corresponding vendor and product strings as a tuple.
Only the *first* dev node (pwc.0) is considered. Informative only.
saa_access()
-> bool, bool, bool
 
Uses os.stat() to perform a stat() system call on SAA_DEVICE, SAU_DEVICE,
and IIC_DEVICE and checks the user's group memberships. True if 
permissions, ownership, and group membership are as required. 
Likewise, False if not, or on failure. This for all three devices.
 
The imposed requirements are: 
- RW permissions for owner and group, none for others
- Ownership by root:operator (UID 0, GID 5)
- User must be a member of the operator group
 
Note that by default FreeBSD creates these nodes owned by root:wheel.
The wheel group is undesirable if common practice is followed where
RW permissions are set for the group while making the user a member
of the group. The operator group is better suited and commonly used 
for this.
saa_access_commit()
-> bool
 
Attempts to change and write the required permissions and ownership 
(see saa_access()). Returns True on success, False on failure. You 
must have UID 0 (root). This function will write to DEVFS_CONF and 
then restart devfs. Same as the bktr_access_commit() function but
using DEVFS_OWN_PERM_SAA.
 
Note that this function does not check if the rules in DEVFS_OWN_PERM
are already in the config file, and appends the same thing over and 
over if asked.
saa_card_tuner()
-> (string, string)
 
Returns the card/vendor and tuner type as a tuple of strings. Saa does
not have tunable sysctls. Uses sysctl dev.saa.0%pnpinfo to find the
subvendor number, compares it to the numbers in SAA_VENDORS and if there's
a match, returns the corresponding Card/vendor string from SAA_CARDS.
Only the *first* device (saa0) is considered. Informative only, and
card/vendor string may not be what's expected (because of incomplete list,
rebranding, repackaging, etc), shouldn't matter though.
 
The tuner type must be set at saa compile time. Default: Philips. The
output of saa_norm() is appended to the tuner string.
saa_chip()
-> string
 
Retrieves the description string for the chip, e.g. "Philips SAA7134".
Uses sysctl and only for the *first* saa device: dev.saa.0.%desc.
saa_module_commit()
-> bool
 
Attempts to write the saa_load and iic_load directives to the loader 
config file specified by LOADER_CONF. First saa_module_loaded() is called 
and if succesful, saa_load="YES" and iic_load="YES" are appended to the 
file. Returns True on success, False in any other case. You must have UID 
0 (root).
 
Note that this function does not check if the directive is already in
the config file, and appends the same thing over and over if asked.
saa_module_loaded()
-> bool
 
Runs kldstat to see if saa module is loaded. Returns True or False.
 
Note that unlike bktr, saa is only used as a kld. So this can be used 
at runtime to determine availablity in an unambigueous way.
saa_module_try()
-> bool
 
Attempts to kldload the saa (and iic) module, if not already loaded. If 
succesful or if already loaded the return value is True. In all other 
cases, including when the caller has no root permissions, False.
 
Note that the unlike bktr, the saa driver is always to be used as a kld.
saa_norm()
-> string
 
Returns the input norm (broadcasting standard), one of "PAL B/G", 
"PAL I", "PAL D/K", "PAL L", "PAL L'", "NTSC M/N", "NTSC Japan", 
"SECAM B/G", "SECAM D/K", "SECAM L", or "SECAM L'". 
This reflects a compile time setting.
saa_user_add(uid)
-> bool
 
Calls bktr_user_add(uid), which is not bktr specific.
snd_chip()
-> string
 
Retrieves the description string for the chip, e.g. "Creative EMU10K1".
Uses sysctl and only for the *first* pcm device: dev.pcm.0.%desc.
snd_module_commit()
-> bool
 
Attempts to write the snd_*_load directive(s) to the loader config 
file specified by LOADER_CONF. First snd_module_loaded() is called 
and if succesful, snd_*_load="YES" is appended to the file for every 
snd module currently loaded. Returns True on success, or False 
otherwise. You must have UID 0 (root).
 
Note that this function does not check if the directive is already in
the config file, and appends the same thing over and over if asked.
snd_module_loaded()
-> bool
 
Runs kldstat to see if a sound module is loaded. Returns True if one 
or more snd_* modules are loaded, False if none is.
 
Note that the module not being loaded can also mean that it is built 
into the kernel, in which case you can't and shouldn't load it.
snd_module_try()
-> bool
 
Attempts to kldload the snd_driver umbrella module. If already loaded,
or if successfully loaded the return value is True. In all other cases, 
including when the caller has no root permissions, False is returned.
 
While it's possible to have the actual driver attach (providing a way
to look it up so that all the other modules can be unloaded), this 
proved to be not so simple as it sounds. Instead, the snd_driver 
provides all modules and they all remain loaded. The user probably 
doesn't care about them anyway.
 
Note that the module not being loaded can also mean that snd_foo is
built into the kernel, in which case you can't and shouldn't load it.

 
Data
        ADS = 'ADS Tech Instant TV'
ALPS_TSBH1 = 'ALPS TSBH1 NTSC'
ALPS_TSCH5 = 'ALPS TSCH5 NTSC FM'
AOPEN_VA1000 = 'AOpen VA1000'
API_ALPS = 'Alps'
API_LG = 'LG'
API_PHILIPS = 'Philips'
API_PHILIPS_MK3 = 'Philips MK3'
API_TEMIC = 'Temic'
ASKEY_DYNALINK_MAGIC_TVIEW = 'Askey/Dynalink Magic TView'
ASUS = 'ASUS TV-FM 713x'
AUDIO_DEVICE = '/dev/dsp'
AVERMEDIA = 'AverMedia AverTV series (also Medion)'
AVER_MEDIA = 'AVer Media TV/FM'
BEHOLDER = 'Beholder BeholdTV'
BKTR_CARDS = ['Unknown', 'Pinnacle/Miro TV', 'Hauppauge WinCast/TV', 'STB TV/PCI', 'Intel Smart Video III/VideoLogic Captivator PCI', 'IMS TV Turbo', 'AVer Media TV/FM', 'MMAC Osprey', 'I/O DATA GV-BCTV2/PCI', 'FlyVideo', 'Zoltrix', 'KISS TV/FM PCI', 'Video Highway Xtreme', 'Askey/Dynalink Magic TView', 'Leadtek Winfast TV 2000', 'TerraTVplus', 'I/O DATA GV-BCTV3/PCI', 'AOpen VA1000', 'Pinnacle PCTV Rave', 'PixelView PlayTV Pak', ...]
BKTR_DEVICE = '/dev/bktr'
BKTR_MODULE = 'bktr.ko'
BKTR_TUNERS = ['None', 'Temic NTSC', 'Temic PAL', 'Temic SECAM', 'Philips NTSC', 'Philips PAL', 'Philips SECAM', 'Temic PAL I', 'Philips PAL I', 'Philips FR1236 NTSC FM', 'Philips FR1216 PAL FM', 'Philips FR1236 SECAM FM', 'ALPS TSCH5 NTSC FM', 'ALPS TSBH1 NTSC', 'Microtune MT2032', 'LG TPI8PSB12P PAL']
COMPAL = 'LifeView FlyTV Platinum Mini2 (Compal)'
COMPRO = 'Compro VideoMate TV'
DEFS_OWN_PERM_PWC = '\n## BEGIN PWC\nown video0 root:operator\nperm video0 0660\n## END PWC\n'
DELTA_HEADER = '\n## Appended by btsetup (kbtv) '
DEVFS_CONF = '/etc/devfs.conf'
DEVFS_OWN_PERM = '\n## BEGIN BKTR\nown bktr0 root:operator\nown tu...or\nperm bktr0 0660\nperm tuner0 0660\n## END BKTR\n'
DEVFS_OWN_PERM_SAA = '\n## BEGIN SAA\nown iic0 root:operator\nown saa0 ...c0 0660\nperm saa0 0660\nperm sau0 0660\n## END SAA\n'
DEVFS_RESTART = '/etc/rc.d/devfs restart '
DMESG_BKTR = 'dmesg | grep bktr0 | grep tuner '
DMESG_BOOT_BKTR = 'cat /var/run/dmesg.boot | grep bktr0 | grep tuner '
ELITEGROUP = 'Elitegroup ECS TVP3XP'
ELSA = 'LSA EX-VISION'
FLYVIDEO = 'FlyVideo'
GOTVIEW = 'GoTView 7135 PCI'
HAUPPAUGE = 'Hauppauge WinCast/TV'
IIC_DEVICE = '/dev/iic0'
IIC_MODULE = 'iic.ko'
IMS_TURBO = 'IMS TV Turbo'
INTEL = 'Intel Smart Video III/VideoLogic Captivator PCI'
IO_BCTV2 = 'I/O DATA GV-BCTV2/PCI'
IO_BCTV3 = 'I/O DATA GV-BCTV3/PCI'
KISS = 'KISS TV/FM PCI'
KLDLOAD = 'kldload '
KLDSTAT_BKTR = "kldstat | grep bktr.ko | awk '{ print $5 }' "
KLDSTAT_IIC = "kldstat | grep iic.ko | awk '{ print $5 }' "
KLDSTAT_PWC = "kldstat | grep pwc.ko | awk '{ print $5 }' "
KLDSTAT_SAA = "kldstat | grep saa.ko | awk '{ print $5 }' "
KLDSTAT_SND = "kldstat | grep snd_ | awk '{ print $5 }' "
KLDUNLOAD = 'kldunload '
KNC_ONE = 'KNC One TV-Station DVR'
LEADTEK = 'Leadtek Winfast TV 2000'
LG_TPI8PSB12P_PAL = 'LG TPI8PSB12P PAL'
LIFEVIEW = 'LifeView FlyVideo'
LOADER_CONF = '/boot/loader.conf'
MATROX = 'Matrox CronosPlus'
MEDION = 'Medion 7134'
MIRO = 'Pinnacle/Miro TV'
MIXER_CHANNELS = [6, 14, 15, 16, 7, 22]
MIXER_CHANNEL_NAMES = ['line', 'line1', 'line2', 'line3', 'mic', 'video']
MIXER_DEVICE = '/dev/mixer'
MIXER_LINE = 6
MIXER_LINE1 = 14
MIXER_LINE2 = 15
MIXER_LINE3 = 16
MIXER_MIC = 7
MIXER_VIDEO = 22
MODULE_AUTHOR = 'Danny Pansters'
MODULE_AUTHOR_EMAIL = 'danny@ricin.com'
MODULE_COPYRIGHT = '(c) 2005-2007, Danny Pansters <danny@ricin.com>'
MODULE_LICENSE = 'BSD'
MODULE_LICENSE_TEXT = '(c) 2005-2007, Danny Pansters <danny@ricin.com>\n...EN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n'
MT2032 = 'Microtune MT2032'
NEC_PK = 'NEC PK-UG-X017'
NORMS = ['NTSC', 'PAL', 'SECAM']
NORM_NTSC = 'NTSC'
NORM_PAL = 'PAL'
NORM_SECAM = 'SECAM'
NO_TUNER = 'None'
OSPREY = 'MMAC Osprey'
PHILIPS = 'Philips (also Empress, SKNet, KNC/Typhoon, AOpen VA1000)'
PHILIPS_FR1216_PAL = 'Philips FR1216 PAL FM'
PHILIPS_FR1236_NTSC = 'Philips FR1236 NTSC FM'
PHILIPS_FR1236_SECAM = 'Philips FR1236 SECAM FM'
PHILIPS_NTSC = 'Philips NTSC'
PHILIPS_PAL = 'Philips PAL'
PHILIPS_PALI = 'Philips PAL I'
PHILIPS_SECAM = 'Philips SECAM'
PINNACLE = 'Pinnacle PCTV'
PINNACLE_PCTV_RAVE = 'Pinnacle PCTV Rave'
PIXELVIEW_PLAYTV_PAK = 'PixelView PlayTV Pak'
PIXELVIEW_PLAYTV_PRO_REV_4C = 'PixelView PlayTV Pro REV-4C'
PWC_DEVICE = '/dev/video0'
PWC_MODULE = 'pwc.ko'
PWC_PRODUCTS = [('0xffff', 'Unknown model'), ('0x0302', 'Philips PCA645VC'), ('0x0303', 'Philips PCA646VC'), ('0x0304', 'Askey VC010 type 2'), ('0x0307', 'Philips PCVC675K (Vesta)'), ('0x0308', 'Philips PCVC680K (Vesta Pro)'), ('0x030c', 'Philips PCVC690K (Vesta Pro Scan)'), ('0x0310', 'Philips PCVC730K (ToUCam Fun)/PCVC830 (ToUCam II)'), ('0x0311', 'Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II)'), ('0x0312', 'Philips PCVC750K (ToUCam Pro Scan)'), ('0x0313', 'Philips PCVC720K/40 (ToUCam XS)'), ('0x0329', 'Philips SPC900NC'), ('0x0001', 'Askey VC010 type 1'), ('0x08b0', 'Logitech QuickCam Pro 3000'), ('0x08b1', 'Logitech QuickCam Notebook Pro'), ('0x08b2', 'Logitech QuickCam Pro 4000'), ('0x08b3', 'Logitech QuickCam Zoom'), ('0x08b4', 'Logitech QuickCam Zoom (new model)'), ('0x08b5', 'Logitech QuickCam Orbit/Sphere'), ('0x08b6', 'Logitech QuickCam (reserved ID)'), ...]
PWC_VENDORS = [('0xffff', 'Unknown vendor'), ('0x06be', 'AME'), ('0x069a', 'Askey'), ('0x041b', 'Creative Labs'), ('0x046d', 'Logitech'), ('0x0471', 'Philips'), ('0x055d', 'Samsung'), ('0x04cc', 'Sotec'), ('0x0d81', 'Visionite')]
PW_GROUPMOD = 'pw groupmod operator -m '
RTD = 'RTD Embedded Technologies VFG73x0'
SAA_CARDS = ['Unknown card/vendor', 'ADS Tech Instant TV', 'ASUS TV-FM 713x', 'AverMedia AverTV series (also Medion)', 'Beholder BeholdTV', 'LifeView FlyTV Platinum Mini2 (Compal)', 'Compro VideoMate TV', 'Elitegroup ECS TVP3XP', 'LSA EX-VISION', 'GoTView 7135 PCI', 'KNC One TV-Station DVR', 'LifeView FlyVideo', 'Matrox CronosPlus', 'Medion 7134', 'Philips (also Empress, SKNet, KNC/Typhoon, AOpen VA1000)', 'Pinnacle PCTV', 'RTD Embedded Technologies VFG73x0', 'Terratec Cinergy', 'Upmost Purple TV']
SAA_DEVICE = '/dev/saa0'
SAA_MODULE = 'saa.ko'
SAA_TUNERS = ['Philips', 'Philips MK3', 'Temic', 'Alps', 'LG']
SAA_VENDORS = ['0xffff', '0x1421', '0x1043', '0x1461', '0x0000', '0x14c0', '0x185b', '0x1019', '0x1048', '0x5456', '0x1894', '0x5168', '0x102b', '0x16be', '0x1131', '0x153b', '0x11bd', '0x1435', '0x12ab']
SAMPLE_SIZE = 256
SAU_DEVICE = '/dev/sau0'
SND_DRIVER = 'snd_driver'
SOUND_MODULE_GLOB = 'snd_*'
STANDARDS = ['PAL B/G', 'PAL I', 'PAL D/K', 'PAL L', "PAL L'", 'NTSC M/N', 'NTSC Japan', 'SECAM B/G', 'SECAM D/K', 'SECAM L', "SECAM L'"]
STB = 'STB TV/PCI'
STD_NTSC = 'NTSC M/N'
STD_NTSC_JAPAN = 'NTSC Japan'
STD_PAL_B_G = 'PAL B/G'
STD_PAL_D_K = 'PAL D/K'
STD_PAL_I = 'PAL I'
STD_PAL_L = 'PAL L'
STD_PAL_LACCENT = "PAL L'"
STD_SECAM_B_G = 'SECAM B/G'
STD_SECAM_D_K = 'SECAM D/K'
STD_SECAM_L = 'SECAM L'
STD_SECAM_LACCENT = "SECAM L'"
SYSCTL = 'sysctl'
SYSCTL_BKTR_CARD = 'hw.bt848.card'
SYSCTL_BKTR_CARD_GET = 'sysctl -n hw.bt848.card'
SYSCTL_BKTR_CARD_SET = 'sysctl hw.bt848.card='
SYSCTL_BKTR_CHIP = 'sysctl -n dev.bktr.0.%desc '
SYSCTL_BKTR_MSGBUF = 'sysctl kern.msgbuf | grep bktr0 | grep tuner '
SYSCTL_BKTR_TUNER = 'hw.bt848.tuner'
SYSCTL_BKTR_TUNER_GET = 'sysctl -n hw.bt848.tuner'
SYSCTL_BKTR_TUNER_SET = 'sysctl hw.bt848.tuner='
SYSCTL_CONF = '/etc/sysctl.conf'
SYSCTL_OVERRIDE = ' <sysctl:'
SYSCTL_PWC_PRODUCT = "sysctl -n dev.pwc.0.%pnpinfo | awk '{ print $2 }' | sed s/product=//"
SYSCTL_PWC_VENDOR = "sysctl -n dev.pwc.0.%pnpinfo | awk '{ print $1 }' | sed s/vendor=//"
SYSCTL_SAA_CHIP = "sysctl -n dev.saa.0.%desc | awk '{ print $1, $2 }' | sed s/Phillips/Philips/"
SYSCTL_SAA_SUBVENDOR = "sysctl -n dev.saa.0.%pnpinfo | awk '{ print $3 }' | sed s/subvendor=// "
SYSCTL_SND_CHIP = 'sysctl -n dev.pcm.0.%desc '
TEMIC_NTSC = 'Temic NTSC'
TEMIC_PAL = 'Temic PAL'
TEMIC_PALI = 'Temic PAL I'
TEMIC_SECAM = 'Temic SECAM'
TERRATEC = 'Terratec Cinergy'
TERRATVALUE = 'TerraTec TValue'
TERRATVPLUS = 'TerraTVplus'
TUNER = 'tuner'
TUNER_DEVICE = '/dev/tuner'
UNKNOWN = 'Unknown'
UNKNOWN_SAA = 'Unknown card/vendor'
UPMOST = 'Upmost Purple TV'
VENDOR_ADS = '0x1421'
VENDOR_ASUS = '0x1043'
VENDOR_AVERMEDIA = '0x1461'
VENDOR_BEHOLDER = '0x0000'
VENDOR_COMPAL = '0x14c0'
VENDOR_COMPRO = '0x185b'
VENDOR_ELITEGROUP = '0x1019'
VENDOR_ELSA = '0x1048'
VENDOR_GOTVIEW = '0x5456'
VENDOR_KNC_ONE = '0x1894'
VENDOR_LIFEVIEW = '0x5168'
VENDOR_MATROX = '0x102b'
VENDOR_MEDION = '0x16be'
VENDOR_PHILIPS = '0x1131'
VENDOR_PINNACLE = '0x11bd'
VENDOR_RTD = '0x1435'
VENDOR_TERRATEC = '0x153b'
VENDOR_UNKNOWN = '0xffff'
VENDOR_UPMOST = '0x12ab'
VIDEO_HIGHWAY_XTREME = 'Video Highway Xtreme'
ZOLTRIX = 'Zoltrix'