Lines Matching +full:high +full:- +full:vt
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2005-2006 Micronas USA Inc.
11 #include <media/v4l2-common.h>
12 #include <media/v4l2-ioctl.h>
13 #include <media/v4l2-device.h>
16 MODULE_DESCRIPTION("sony-btf-mpx driver");
28 * AS(IF/MPX) pin: LOW HIGH/OPEN
33 static int force_mpx_mode = -1;
57 msg.addr = client->addr; in mpx_write()
61 i2c_transfer(client->adapter, &msg, 1); in mpx_write()
66 * MPX register values for the BTF-PG472Z:
71 * ---------------------------------------------------------------
85 * A2-1 1003 0020 0100 2601 5000 XXXX 0004 7500
86 * A2-2 1003 0020 0100 2601 5000 XXXX 0005 7500
87 * A2-3 1003 0020 0100 2601 5000 XXXX 0007 7500
101 * High byte of SOURCE Left chan Right chan
106 * Force mono in NICAM by setting the high byte of SOURCE to 0x02 (L/L') or
111 * --------
141 /* D/K A2-1 */ { AUD_A2, 0x1003, 0x0020, 0x0100, 0x2601,
143 /* D/K A2-2 */ { AUD_A2, 0x1003, 0x0020, 0x0100, 0x2601,
145 /* D/K A2-3 */ { AUD_A2, 0x1003, 0x0020, 0x0100, 0x2601,
159 struct i2c_client *client = v4l2_get_subdevdata(&t->sd); in mpx_setup()
163 int mode = t->mpxmode; in mpx_setup()
169 msg.addr = client->addr; in mpx_setup()
173 i2c_transfer(client->adapter, &msg, 1); in mpx_setup()
175 i2c_transfer(client->adapter, &msg, 1); in mpx_setup()
177 if (t->audmode != V4L2_TUNER_MODE_MONO) in mpx_setup()
181 switch (t->audmode) { in mpx_setup()
224 t->audmode == V4L2_TUNER_MODE_MONO ? 0x07f0 : 0x0190); in mpx_setup()
244 msgs[0].addr = client->addr; in mpx_setup()
248 msgs[1].addr = client->addr; in mpx_setup()
252 i2c_transfer(client->adapter, msgs, 2); in mpx_setup()
258 i2c_transfer(client->adapter, msgs, 2); in mpx_setup()
281 if (default_mpx_mode != t->mpxmode) { in sony_btf_mpx_s_std()
282 t->mpxmode = default_mpx_mode; in sony_btf_mpx_s_std()
288 static int sony_btf_mpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) in sony_btf_mpx_g_tuner() argument
292 vt->capability = V4L2_TUNER_CAP_NORM | in sony_btf_mpx_g_tuner()
295 vt->rxsubchans = V4L2_TUNER_SUB_MONO | in sony_btf_mpx_g_tuner()
298 vt->audmode = t->audmode; in sony_btf_mpx_g_tuner()
302 static int sony_btf_mpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) in sony_btf_mpx_s_tuner() argument
306 if (vt->type != V4L2_TUNER_ANALOG_TV) in sony_btf_mpx_s_tuner()
307 return -EINVAL; in sony_btf_mpx_s_tuner()
309 if (vt->audmode != t->audmode) { in sony_btf_mpx_s_tuner()
310 t->audmode = vt->audmode; in sony_btf_mpx_s_tuner()
316 /* --------------------------------------------------------------------------*/
332 /* --------------------------------------------------------------------------*/
340 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) in sony_btf_mpx_probe()
341 return -ENODEV; in sony_btf_mpx_probe()
344 client->addr << 1, client->adapter->name); in sony_btf_mpx_probe()
346 t = devm_kzalloc(&client->dev, sizeof(*t), GFP_KERNEL); in sony_btf_mpx_probe()
348 return -ENOMEM; in sony_btf_mpx_probe()
350 sd = &t->sd; in sony_btf_mpx_probe()
354 t->mpxmode = 0; in sony_btf_mpx_probe()
355 t->audmode = V4L2_TUNER_MODE_STEREO; in sony_btf_mpx_probe()
369 /* ----------------------------------------------------------------------- */
372 { "sony-btf-mpx", 0 },
379 .name = "sony-btf-mpx",