uda1380.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) uda1380.c (5e518eddd11e8f71aaffc954dc7ee9572fc59808)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * uda1380.c - Philips UDA1380 ALSA SoC audio driver
4 *
5 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com>
6 *
7 * Modified by Richard Purdie <richard@openedhand.com> to fit into SoC
8 * codec model.

--- 96 unchanged lines hidden (view full) ---

105 data[1] = (value & 0xff00) >> 8;
106 data[2] = value & 0x00ff;
107
108 uda1380_write_reg_cache(component, reg, value);
109
110 /* the interpolator & decimator regs must only be written when the
111 * codec DAI is active.
112 */
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * uda1380.c - Philips UDA1380 ALSA SoC audio driver
4 *
5 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com>
6 *
7 * Modified by Richard Purdie <richard@openedhand.com> to fit into SoC
8 * codec model.

--- 96 unchanged lines hidden (view full) ---

105 data[1] = (value & 0xff00) >> 8;
106 data[2] = value & 0x00ff;
107
108 uda1380_write_reg_cache(component, reg, value);
109
110 /* the interpolator & decimator regs must only be written when the
111 * codec DAI is active.
112 */
113 if (!snd_soc_component_is_active(component) && (reg >= UDA1380_MVOL))
113 if (!snd_soc_component_active(component) && (reg >= UDA1380_MVOL))
114 return 0;
115 pr_debug("uda1380: hw write %x val %x\n", reg, value);
116 if (i2c_master_send(uda1380->i2c, data, 3) == 3) {
117 unsigned int val;
118 i2c_master_send(uda1380->i2c, data, 1);
119 i2c_master_recv(uda1380->i2c, data, 2);
120 val = (data[0]<<8) | data[1];
121 if (val != value) {

--- 690 unchanged lines hidden ---
114 return 0;
115 pr_debug("uda1380: hw write %x val %x\n", reg, value);
116 if (i2c_master_send(uda1380->i2c, data, 3) == 3) {
117 unsigned int val;
118 i2c_master_send(uda1380->i2c, data, 1);
119 i2c_master_recv(uda1380->i2c, data, 2);
120 val = (data[0]<<8) | data[1];
121 if (val != value) {

--- 690 unchanged lines hidden ---