Хоть сегодня и новый год, но подвернулась задача — заставить работать в Debian Squeeze ТВ-тюнер AverMedia MCE 116. Решение оказалось довольно простым на первый взгляд.
Поставим недостающие пакеты:
apt-get install firmware-ivtv ivtv-utils
Теперь, чтобы изменения подхватились, выгрузим и загрузим модуль снова:
rmmod ivtv
modprobe ivtv
Вот, собственно, и всё Проверяем, всё ли установилось, командой dmesg и видим:
[ 1186.829113] xc2028 0-0061: destroying instance
[ 1186.829732] ivtv 0000:04:00.0: PCI INT A disabled
[ 1186.829742] ivtv: Removed AVerTV MCE 116 Plus
[ 1198.362002] ivtv: Start initialization, version 1.4.1
[ 1198.362170] ivtv0: Initializing card 0
[ 1198.362185] ivtv0: Autodetected AVerTV MCE 116 Plus card (cx23416 based)
[ 1198.362366] ivtv 0000:04:00.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 1198.372144] cx25840 0-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #0)
[ 1198.393955] tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)
[ 1198.397849] i2c i2c-0: Failed to register i2c client wm8739 at 0x1a (-16)
[ 1198.398130] xc2028 0-0061: creating new instance
[ 1198.398140] xc2028 0-0061: type set to XCeive xc2028/xc3028 tuner
[ 1198.398155] IRQ 21/ivtv0: IRQF_DISABLED is not guaranteed on shared IRQs
[ 1198.398955] ivtv0: Registered device video1 for encoder MPG (4096 kB)
[ 1198.399059] ivtv0: Registered device video33 for encoder YUV (2048 kB)
[ 1198.399152] ivtv0: Registered device vbi1 for encoder VBI (1024 kB)
[ 1198.399248] ivtv0: Registered device video25 for encoder PCM (320 kB)
[ 1198.399258] ivtv0: Initialized card: AVerTV MCE 116 Plus
[ 1198.399322] ivtv: End initialization
[ 1199.024027] ivtv 0000:04:00.0: firmware: requesting v4l-cx2341x-enc.fw
[ 1199.044288] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
[ 1199.244171] ivtv0: Encoder revision: 0x02060039
[ 1199.261445] cx25840 0-0044: firmware: requesting v4l-cx25840.fw
[ 1202.777958] cx25840 0-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
[ 1202.959007] ivtv 0000:04:00.0: firmware: requesting xc3028-v27.fw
[ 1202.963498] xc2028 0-0061: Error: firmware xc3028-v27.fw not found.
[ 1202.997289] ivtv 0000:04:00.0: firmware: requesting xc3028-v27.fw
[ 1203.001939] xc2028 0-0061: Error: firmware xc3028-v27.fw not found.
Не хватает прошивки (firmware) xc3028-v27.fw. Дальнейшее гугление привело к следующему решению:
1. Скачиваем драйвер:
wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
2. Извлекаем файл hcw85bda.sys из архива в текущую папку:
unzip -j HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys
3. Скачиваем распаковывающий скрипт:
wget http://linuxtv.org/hg/v4l-dvb/raw-file/3919b17dc88e/linux/Documentation/video4linux/extract_xc3028.pl
4. Запускаем скрипт:
perl extract_xc3028.pl
5. Копируем получившуюся прошивку в папку /lib/firmware:
cp xc3028-v27.fw /lib/firmware/xc3028-v27.fw
Теперь снова выгрузим и загрузим модуль ivtv, и смотрим что будет в dmesg:
[ 3087.937087] xc2028 0-0061: destroying instance
[ 3087.937711] ivtv 0000:04:00.0: PCI INT A disabled
[ 3087.937722] ivtv: Removed AVerTV MCE 116 Plus
[ 3092.102678] ivtv: Start initialization, version 1.4.1
[ 3092.102846] ivtv0: Initializing card 0
[ 3092.102860] ivtv0: Autodetected AVerTV MCE 116 Plus card (cx23416 based)
[ 3092.103055] ivtv 0000:04:00.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 3092.111616] cx25840 0-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #0)
[ 3092.134966] tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)
[ 3092.138774] i2c i2c-0: Failed to register i2c client wm8739 at 0x1a (-16)
[ 3092.139064] xc2028 0-0061: creating new instance
[ 3092.139075] xc2028 0-0061: type set to XCeive xc2028/xc3028 tuner
[ 3092.139090] IRQ 21/ivtv0: IRQF_DISABLED is not guaranteed on shared IRQs
[ 3092.141147] ivtv0: Registered device video1 for encoder MPG (4096 kB)
[ 3092.143290] ivtv0: Registered device video33 for encoder YUV (2048 kB)
[ 3092.143877] ivtv0: Registered device vbi1 for encoder VBI (1024 kB)
[ 3092.144477] ivtv0: Registered device video25 for encoder PCM (320 kB)
[ 3092.144489] ivtv0: Initialized card: AVerTV MCE 116 Plus
[ 3092.145535] ivtv: End initialization
[ 3092.768038] ivtv 0000:04:00.0: firmware: requesting v4l-cx2341x-enc.fw
[ 3092.788994] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
[ 3092.988410] ivtv0: Encoder revision: 0x02060039
[ 3093.005665] cx25840 0-0044: firmware: requesting v4l-cx25840.fw
[ 3096.533239] cx25840 0-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
[ 3096.719443] ivtv 0000:04:00.0: firmware: requesting xc3028-v27.fw
[ 3096.727614] xc2028 0-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 firmware, ver 2.7
[ 3096.736524] xc2028 0-0061: Loading firmware for type=BASE (1), id 0000000000000000.
[ 3098.475179] xc2028 0-0061: Loading firmware for type=(0), id 000000000000b700.
[ 3098.504129] SCODE (20000000), id 000000000000b700:
[ 3098.504140] xc2028 0-0061: Loading SCODE for type=MONO SCODE HAS_IF_4320 (60008000), id 0000000000008000.
[ 3098.721311] xc2028 0-0061: Loading firmware for type=(0), id 000000000000b700.
[ 3098.750302] SCODE (20000000), id 000000000000b700:
[ 3098.750314] xc2028 0-0061: Loading SCODE for type=MONO SCODE HAS_IF_4320 (60008000), id 0000000000008000.
Теперь возникает вопрос, чем смотреть ТВ программы? Можно воспользоваться, например, kdetv или MythTV (в репозитории нет, ставится отдельно с сайта).