Lines Matching +full:inactive +full:- +full:delay
1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/delay.h>
10 #include <media/v4l2-common.h>
12 #include "tuner-i2c.h"
44 /* ---------------------------------------------------------------------- */
46 #define UNSET (-1U)
56 /* ---------------------------------------------------------------------- */
135 /* ---------------------------------------------------------------------- */
140 .name = "PAL-BGHN",
151 .name = "PAL-I",
162 .name = "PAL-DK",
173 .name = "PAL-M/Nc",
184 .name = "SECAM-BGH",
192 .name = "SECAM-L",
201 .name = "SECAM-L'",
211 .name = "SECAM-DK",
222 .name = "NTSC-M",
233 .name = "NTSC-M-JP",
269 /* ---------------------------------------------------------------------- */
273 struct tda9887_priv *priv = fe->analog_demod_priv; in dump_read_message()
276 "- 12.5 kHz", in dump_read_message()
277 "- 37.5 kHz", in dump_read_message()
278 "- 62.5 kHz", in dump_read_message()
279 "- 87.5 kHz", in dump_read_message()
280 "-112.5 kHz", in dump_read_message()
281 "-137.5 kHz", in dump_read_message()
282 "-162.5 kHz", in dump_read_message()
283 "-187.5 kHz [min]", in dump_read_message()
303 struct tda9887_priv *priv = fe->analog_demod_priv; in dump_write_message()
312 "-16", "-15", "-14", "-13", "-12", "-11", "-10", "-9", in dump_write_message()
313 "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", in dump_write_message()
350 tuner_info(" B3-4 tv sound/radio : %s\n", in dump_write_message()
355 (buf[1] & 0x40) ? "high (inactive)" : "low (active)"); in dump_write_message()
357 (buf[1] & 0x80) ? "high (inactive)" : "low (active)"); in dump_write_message()
360 tuner_info(" C0-4 top adjustment : %s dB\n", in dump_write_message()
362 tuner_info(" C5-6 de-emphasis : %s\n", in dump_write_message()
365 (buf[2] & 0x80) ? "-6" : "0"); in dump_write_message()
368 tuner_info(" E0-1 sound carrier : %s\n", in dump_write_message()
375 tuner_info(" E2-4 video if : %s\n", in dump_write_message()
379 ? ((buf[3] & 0x10) ? "fm-agc radio" : in dump_write_message()
380 "sif-agc radio") in dump_write_message()
384 tuner_info(" E2-4 video if : %s\n", in dump_write_message()
396 tuner_info("--\n"); in dump_write_message()
399 /* ---------------------------------------------------------------------- */
403 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_set_tvnorm()
405 char *buf = priv->data; in tda9887_set_tvnorm()
408 if (priv->mode == V4L2_TUNER_RADIO) { in tda9887_set_tvnorm()
409 if (priv->audmode == V4L2_TUNER_MODE_MONO) in tda9887_set_tvnorm()
415 if (tvnorms[i].std & priv->std) { in tda9887_set_tvnorm()
422 tuner_dbg("Unsupported tvnorm entry - audio muted\n"); in tda9887_set_tvnorm()
423 return -1; in tda9887_set_tvnorm()
426 tuner_dbg("configure for: %s\n", norm->name); in tda9887_set_tvnorm()
427 buf[1] = norm->b; in tda9887_set_tvnorm()
428 buf[2] = norm->c; in tda9887_set_tvnorm()
429 buf[3] = norm->e; in tda9887_set_tvnorm()
445 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_set_insmod()
446 char *buf = priv->data; in tda9887_set_insmod()
477 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_do_config()
478 char *buf = priv->data; in tda9887_do_config()
480 if (priv->config & TDA9887_PORT1_ACTIVE) in tda9887_do_config()
482 if (priv->config & TDA9887_PORT1_INACTIVE) in tda9887_do_config()
484 if (priv->config & TDA9887_PORT2_ACTIVE) in tda9887_do_config()
486 if (priv->config & TDA9887_PORT2_INACTIVE) in tda9887_do_config()
489 if (priv->config & TDA9887_QSS) in tda9887_do_config()
491 if (priv->config & TDA9887_INTERCARRIER) in tda9887_do_config()
494 if (priv->config & TDA9887_AUTOMUTE) in tda9887_do_config()
496 if (priv->config & TDA9887_DEEMPHASIS_MASK) { in tda9887_do_config()
498 switch (priv->config & TDA9887_DEEMPHASIS_MASK) { in tda9887_do_config()
510 if (priv->config & TDA9887_TOP_SET) { in tda9887_do_config()
512 buf[2] |= (priv->config >> 8) & cTopMask; in tda9887_do_config()
514 if ((priv->config & TDA9887_INTERCARRIER_NTSC) && in tda9887_do_config()
515 (priv->std & V4L2_STD_NTSC)) in tda9887_do_config()
517 if (priv->config & TDA9887_GATING_18) in tda9887_do_config()
520 if (priv->mode == V4L2_TUNER_RADIO) { in tda9887_do_config()
521 if (priv->config & TDA9887_RIF_41_3) { in tda9887_do_config()
525 if (priv->config & TDA9887_GAIN_NORMAL) in tda9887_do_config()
532 /* ---------------------------------------------------------------------- */
536 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_status()
540 rc = tuner_i2c_xfer_recv(&priv->i2c_props, buf, 1); in tda9887_status()
549 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_configure()
552 memset(priv->data,0,sizeof(priv->data)); in tda9887_configure()
557 By default they are set to inactive (bit value 1) by this driver, in tda9887_configure()
562 SECAM-L, and port 2 should remain inactive (1) for SECAM-L'. in tda9887_configure()
568 priv->data[1] |= cOutputPort1Inactive; in tda9887_configure()
569 priv->data[1] |= cOutputPort2Inactive; in tda9887_configure()
574 if (priv->standby) in tda9887_configure()
575 priv->data[1] |= cForcedMuteAudioON; in tda9887_configure()
578 priv->data[1], priv->data[2], priv->data[3]); in tda9887_configure()
580 dump_write_message(fe, priv->data); in tda9887_configure()
582 if (4 != (rc = tuner_i2c_xfer_send(&priv->i2c_props,priv->data,4))) in tda9887_configure()
591 /* ---------------------------------------------------------------------- */
595 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_tuner_status()
597 priv->data[1], priv->data[2], priv->data[3]); in tda9887_tuner_status()
602 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_get_afc()
604 -12500, -37500, -62500, -97500, in tda9887_get_afc()
605 -112500, -137500, -162500, -187500, in tda9887_get_afc()
611 if (priv->mode != V4L2_TUNER_RADIO) in tda9887_get_afc()
613 if (1 == tuner_i2c_xfer_recv(&priv->i2c_props, ®, 1)) in tda9887_get_afc()
620 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_standby()
622 priv->standby = true; in tda9887_standby()
630 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_set_params()
632 priv->standby = false; in tda9887_set_params()
633 priv->mode = params->mode; in tda9887_set_params()
634 priv->audmode = params->audmode; in tda9887_set_params()
635 priv->std = params->std; in tda9887_set_params()
641 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_set_config()
643 priv->config = *(unsigned int *)priv_cfg; in tda9887_set_config()
651 struct tda9887_priv *priv = fe->analog_demod_priv; in tda9887_release()
660 fe->analog_demod_priv = NULL; in tda9887_release()
692 fe->analog_demod_priv = priv; in tda9887_attach()
693 priv->standby = true; in tda9887_attach()
697 fe->analog_demod_priv = priv; in tda9887_attach()
703 memcpy(&fe->ops.analog_ops, &tda9887_ops, in tda9887_attach()