inno_rk3036.c (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) | inno_rk3036.c (58d858ae1c44e23ff48077b60b575359e81bb0ea) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Driver of Inno codec for rk3036 by Rockchip Inc. 4 * 5 * Author: Rockchip Inc. 6 * Author: Zheng ShunQian<zhengsq@rock-chips.com> 7 */ 8 --- 186 unchanged lines hidden (view full) --- 195 196static int rk3036_codec_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) 197{ 198 struct snd_soc_component *component = dai->component; 199 unsigned int reg01_val = 0, reg02_val = 0, reg03_val = 0; 200 201 dev_dbg(component->dev, "rk3036_codec dai set fmt : %08x\n", fmt); 202 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Driver of Inno codec for rk3036 by Rockchip Inc. 4 * 5 * Author: Rockchip Inc. 6 * Author: Zheng ShunQian<zhengsq@rock-chips.com> 7 */ 8 --- 186 unchanged lines hidden (view full) --- 195 196static int rk3036_codec_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) 197{ 198 struct snd_soc_component *component = dai->component; 199 unsigned int reg01_val = 0, reg02_val = 0, reg03_val = 0; 200 201 dev_dbg(component->dev, "rk3036_codec dai set fmt : %08x\n", fmt); 202 |
203 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 204 case SND_SOC_DAIFMT_CBS_CFS: | 203 switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { 204 case SND_SOC_DAIFMT_CBC_CFC: |
205 reg01_val |= INNO_R01_PINDIR_IN_SLAVE | 206 INNO_R01_I2SMODE_SLAVE; 207 break; | 205 reg01_val |= INNO_R01_PINDIR_IN_SLAVE | 206 INNO_R01_I2SMODE_SLAVE; 207 break; |
208 case SND_SOC_DAIFMT_CBM_CFM: | 208 case SND_SOC_DAIFMT_CBP_CFP: |
209 reg01_val |= INNO_R01_PINDIR_OUT_MASTER | 210 INNO_R01_I2SMODE_MASTER; 211 break; 212 default: 213 dev_err(component->dev, "invalid fmt\n"); 214 return -EINVAL; 215 } 216 --- 273 unchanged lines hidden --- | 209 reg01_val |= INNO_R01_PINDIR_OUT_MASTER | 210 INNO_R01_I2SMODE_MASTER; 211 break; 212 default: 213 dev_err(component->dev, "invalid fmt\n"); 214 return -EINVAL; 215 } 216 --- 273 unchanged lines hidden --- |