Skip to content

Commit 88e4fcd

Browse files
committed
[media] em28xx: only enable PCTV 80e led when streaming
Instead of keeping the led always on, use it to indicate when DVB is streaming. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent ba38acb commit 88e4fcd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital[] = {
228228
7: LED on, active high */
229229
static struct em28xx_reg_seq em2874_pctv_80e_digital[] = {
230230
{EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/
231-
{EM2874_R80_GPIO_P0_CTRL, 0x80, 0xff, 100},/*Demod reset*/
232-
{EM2874_R80_GPIO_P0_CTRL, 0xc0, 0xff, 10},
231+
{EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 100},/*Demod reset*/
232+
{EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 10},
233233
{ -1, -1, -1, -1},
234234
};
235235

@@ -526,6 +526,16 @@ static struct em28xx_led kworld_ub435q_v3_leds[] = {
526526
{-1, 0, 0, 0},
527527
};
528528

529+
static struct em28xx_led pctv_80e_leds[] = {
530+
{
531+
.role = EM28XX_LED_DIGITAL_CAPTURING,
532+
.gpio_reg = EM2874_R80_GPIO_P0_CTRL,
533+
.gpio_mask = 0x80,
534+
.inverted = 0,
535+
},
536+
{-1, 0, 0, 0},
537+
};
538+
529539

530540
/*
531541
* Board definitions
@@ -2179,6 +2189,7 @@ struct em28xx_board em28xx_boards[] = {
21792189
.dvb_gpio = em2874_pctv_80e_digital,
21802190
.decoder = EM28XX_NODECODER,
21812191
.ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2192+
.leds = pctv_80e_leds,
21822193
},
21832194
/* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
21842195
* Empia EM2765 + OmniVision OV2640 */

0 commit comments

Comments
 (0)