Skip to content

Commit ceac017

Browse files
nprothHans Verkuil
authored andcommitted
media: em28xx: Add support for MyGica UTV3
The MyGica UTV3 Analog USB2.0 TV Box is a USB video capture card that has analog TV, composite video, and FM radio inputs, an IR remote, and provides audio only as Line Out, but not over USB. Mine is prepared for an FM tuner, but not equipped with one. Support for FM radio is therefore missing. The device contains: - Empia EM2860 USB bridge - Philips SAA7113 video decoder - NXP TDA9801T demodulator - Tena TNF931D-DFDR1 tuner - ST HCF4052 demux, switches input audio to Line Out Signed-off-by: Nils Rothaug <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent fbf657d commit ceac017

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

Documentation/admin-guide/media/em28xx-cardlist.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,3 +438,11 @@ EM28xx cards list
438438
- MyGica iGrabber
439439
- em2860
440440
- 1f4d:1abe
441+
* - 106
442+
- Hauppauge USB QuadHD ATSC
443+
- em28274
444+
- 2040:846d
445+
* - 107
446+
- MyGica UTV3 Analog USB2.0 TV Box
447+
- em2860
448+
- eb1a:2860

drivers/media/usb/em28xx/em28xx-cards.c

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,30 @@ static struct em28xx_reg_seq hauppauge_usb_quadhd_atsc_reg_seq[] = {
554554
{-1, -1, -1, -1},
555555
};
556556

557+
/*
558+
* MyGica USB TV Box
559+
* GPIO_1,0: 00=Composite audio
560+
* 01=Tuner audio
561+
* 10=Mute audio
562+
* 11=FM radio? (if equipped)
563+
* GPIO_2-6: Unused
564+
* GPIO_7: ??
565+
*/
566+
static const struct em28xx_reg_seq mygica_utv3_composite_audio_gpio[] = {
567+
{EM2820_R08_GPIO_CTRL, 0xfc, 0xff, 0},
568+
{ -1, -1, -1, -1},
569+
};
570+
571+
static const struct em28xx_reg_seq mygica_utv3_tuner_audio_gpio[] = {
572+
{EM2820_R08_GPIO_CTRL, 0xfd, 0xff, 0},
573+
{ -1, -1, -1, -1},
574+
};
575+
576+
static const struct em28xx_reg_seq mygica_utv3_suspend_gpio[] = {
577+
{EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 0},
578+
{ -1, -1, -1, -1},
579+
};
580+
557581
/*
558582
* Button definitions
559583
*/
@@ -2578,6 +2602,32 @@ const struct em28xx_board em28xx_boards[] = {
25782602
.tuner_gpio = hauppauge_usb_quadhd_atsc_reg_seq,
25792603
.leds = hauppauge_usb_quadhd_leds,
25802604
},
2605+
/*
2606+
* eb1a:2860 MyGica UTV3 Analog USB2.0 TV Box
2607+
* Empia EM2860, Philips SAA7113, NXP TDA9801T demod,
2608+
* Tena TNF931D-DFDR1 tuner (contains NXP TDA6509A),
2609+
* ST HCF4052 demux (switches audio to line out),
2610+
* no audio over USB
2611+
*/
2612+
[EM2860_BOARD_MYGICA_UTV3] = {
2613+
.name = "MyGica UTV3 Analog USB2.0 TV Box",
2614+
.xclk = EM28XX_XCLK_IR_RC5_MODE | EM28XX_XCLK_FREQUENCY_12MHZ,
2615+
.tuner_type = TUNER_TENA_TNF_931D_DFDR1,
2616+
.ir_codes = RC_MAP_MYGICA_UTV3,
2617+
.decoder = EM28XX_SAA711X,
2618+
.suspend_gpio = mygica_utv3_suspend_gpio,
2619+
.input = { {
2620+
.type = EM28XX_VMUX_COMPOSITE,
2621+
.vmux = SAA7115_COMPOSITE0,
2622+
.amux = EM28XX_AMUX_VIDEO,
2623+
.gpio = mygica_utv3_composite_audio_gpio,
2624+
}, {
2625+
.type = EM28XX_VMUX_TELEVISION,
2626+
.vmux = SAA7115_COMPOSITE2,
2627+
.amux = EM28XX_AMUX_VIDEO,
2628+
.gpio = mygica_utv3_tuner_audio_gpio,
2629+
} },
2630+
},
25812631
};
25822632
EXPORT_SYMBOL_GPL(em28xx_boards);
25832633

@@ -2819,6 +2869,7 @@ static const struct em28xx_hash_table em28xx_eeprom_hash[] = {
28192869
{0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
28202870
{0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
28212871
{0x85dd871e, EM2882_BOARD_ZOLID_HYBRID_TV_STICK, TUNER_XC2028},
2872+
{0x8f597549, EM2860_BOARD_MYGICA_UTV3, TUNER_TENA_TNF_931D_DFDR1},
28222873
};
28232874

28242875
/* I2C devicelist hash table for devices with generic USB IDs */
@@ -2831,6 +2882,7 @@ static const struct em28xx_hash_table em28xx_i2c_hash[] = {
28312882
{0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
28322883
{0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT},
28332884
{0x27e10080, EM2882_BOARD_ZOLID_HYBRID_TV_STICK, TUNER_XC2028},
2885+
{0x840d0484, EM2860_BOARD_MYGICA_UTV3, TUNER_TENA_TNF_931D_DFDR1},
28342886
};
28352887

28362888
/* NOTE: introduce a separate hash table for devices with 16 bit eeproms */

drivers/media/usb/em28xx/em28xx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
#define EM28178_BOARD_PCTV_461E_V2 104
144144
#define EM2860_BOARD_MYGICA_IGRABBER 105
145145
#define EM2874_BOARD_HAUPPAUGE_USB_QUADHD 106
146+
#define EM2860_BOARD_MYGICA_UTV3 107
146147

147148
/* Limits minimum and default number of buffers */
148149
#define EM28XX_MIN_BUF 4

0 commit comments

Comments
 (0)