mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 03:10:30 -04:00
ASoC: use inclusive language for
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: We have both (A) SND_SOC_DAIFMT_CB{M/S}_CF{M/S} : Master/Slave. (B) SND_SOC_DAIFMT_CB{P/C}_CF{P/S} : Provider/Consumer We should use (B), and want to remove (A). This patch-set do it.
This commit is contained in:
@@ -68,7 +68,7 @@ file:
|
||||
.codec_dai_name = "codec-2-dai_name",
|
||||
.platform_name = "samsung-i2s.0",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBM_CFM,
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.ignore_suspend = 1,
|
||||
.c2c_params = &dsp_codec_params,
|
||||
.num_c2c_params = 1,
|
||||
@@ -80,7 +80,7 @@ file:
|
||||
.codec_name = "codec-3,
|
||||
.codec_dai_name = "codec-3-dai_name",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBM_CFM,
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.ignore_suspend = 1,
|
||||
.c2c_params = &dsp_codec_params,
|
||||
.num_c2c_params = 1,
|
||||
|
||||
@@ -118,12 +118,6 @@ struct snd_compr_stream;
|
||||
#define SND_SOC_DAIFMT_CBP_CFC (3 << 12) /* codec clk provider & frame consumer */
|
||||
#define SND_SOC_DAIFMT_CBC_CFC (4 << 12) /* codec clk consumer & frame consumer */
|
||||
|
||||
/* previous definitions kept for backwards-compatibility, do not use in new contributions */
|
||||
#define SND_SOC_DAIFMT_CBM_CFM SND_SOC_DAIFMT_CBP_CFP
|
||||
#define SND_SOC_DAIFMT_CBS_CFM SND_SOC_DAIFMT_CBC_CFP
|
||||
#define SND_SOC_DAIFMT_CBM_CFS SND_SOC_DAIFMT_CBP_CFC
|
||||
#define SND_SOC_DAIFMT_CBS_CFS SND_SOC_DAIFMT_CBC_CFC
|
||||
|
||||
/* when passed to set_fmt directly indicate if the device is provider or consumer */
|
||||
#define SND_SOC_DAIFMT_BP_FP SND_SOC_DAIFMT_CBP_CFP
|
||||
#define SND_SOC_DAIFMT_BC_FP SND_SOC_DAIFMT_CBC_CFP
|
||||
|
||||
@@ -919,7 +919,7 @@ static int acp_max98388_hw_params(struct snd_pcm_substream *substream,
|
||||
int ret;
|
||||
|
||||
ret = snd_soc_dai_set_fmt(codec_dai,
|
||||
SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_I2S |
|
||||
SND_SOC_DAIFMT_CBC_CFC | SND_SOC_DAIFMT_I2S |
|
||||
SND_SOC_DAIFMT_NB_NF);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -1457,7 +1457,7 @@ static int arizona_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
break;
|
||||
case SND_SOC_DAIFMT_DSP_B:
|
||||
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK)
|
||||
!= SND_SOC_DAIFMT_CBM_CFM) {
|
||||
!= SND_SOC_DAIFMT_CBP_CFP) {
|
||||
arizona_aif_err(dai, "DSP_B not valid in slave mode\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1468,7 +1468,7 @@ static int arizona_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
break;
|
||||
case SND_SOC_DAIFMT_LEFT_J:
|
||||
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK)
|
||||
!= SND_SOC_DAIFMT_CBM_CFM) {
|
||||
!= SND_SOC_DAIFMT_CBP_CFP) {
|
||||
arizona_aif_err(dai, "LEFT_J not valid in slave mode\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1481,15 +1481,15 @@ static int arizona_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
lrclk |= ARIZONA_AIF1TX_LRCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
bclk |= ARIZONA_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
bclk |= ARIZONA_AIF1_BCLK_MSTR;
|
||||
lrclk |= ARIZONA_AIF1TX_LRCLK_MSTR;
|
||||
break;
|
||||
|
||||
@@ -153,12 +153,12 @@ static int cs35l32_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
snd_soc_component_update_bits(component, CS35L32_ADSP_CTL,
|
||||
CS35L32_ADSP_MASTER_MASK,
|
||||
CS35L32_ADSP_MASTER_MASK);
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
snd_soc_component_update_bits(component, CS35L32_ADSP_CTL,
|
||||
CS35L32_ADSP_MASTER_MASK, 0);
|
||||
break;
|
||||
|
||||
@@ -438,12 +438,12 @@ static int cs35l33_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
struct cs35l33_private *priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
regmap_update_bits(priv->regmap, CS35L33_ADSP_CTL,
|
||||
CS35L33_MS_MASK, CS35L33_MS_MASK);
|
||||
dev_dbg(component->dev, "Audio port in master mode\n");
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
regmap_update_bits(priv->regmap, CS35L33_ADSP_CTL,
|
||||
CS35L33_MS_MASK, 0);
|
||||
dev_dbg(component->dev, "Audio port in slave mode\n");
|
||||
|
||||
@@ -523,11 +523,11 @@ static int cs35l34_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
struct cs35l34_private *priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
regmap_update_bits(priv->regmap, CS35L34_ADSP_CLK_CTL,
|
||||
0x80, 0x80);
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
regmap_update_bits(priv->regmap, CS35L34_ADSP_CLK_CTL,
|
||||
0x80, 0x00);
|
||||
break;
|
||||
|
||||
@@ -307,9 +307,9 @@ static int cs4234_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int format
|
||||
}
|
||||
|
||||
switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
if (cs4234->format == SND_SOC_DAIFMT_DSP_A) {
|
||||
dev_err(component->dev, "Unsupported DSP A format in master mode\n");
|
||||
return -EINVAL;
|
||||
|
||||
@@ -344,12 +344,12 @@ static int cs4265_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
u8 iface = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
snd_soc_component_update_bits(component, CS4265_ADC_CTL,
|
||||
CS4265_ADC_MASTER,
|
||||
CS4265_ADC_MASTER);
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
snd_soc_component_update_bits(component, CS4265_ADC_CTL,
|
||||
CS4265_ADC_MASTER,
|
||||
0);
|
||||
|
||||
@@ -287,10 +287,10 @@ static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs4270->slave_mode = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs4270->slave_mode = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -209,10 +209,10 @@ static int cs4271_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
int ret;
|
||||
|
||||
switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs4271->master = false;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs4271->master = true;
|
||||
val |= CS4271_MODE1_MASTER;
|
||||
break;
|
||||
|
||||
@@ -830,11 +830,11 @@ static int cs42l42_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
u32 asp_cfg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
asp_cfg_val |= CS42L42_ASP_MASTER_MODE <<
|
||||
CS42L42_ASP_MODE_SHIFT;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
asp_cfg_val |= CS42L42_ASP_SLAVE_MODE <<
|
||||
CS42L42_ASP_MODE_SHIFT;
|
||||
break;
|
||||
|
||||
@@ -322,10 +322,10 @@ static int cs42l51_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
}
|
||||
|
||||
switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs42l51->func = MODE_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs42l51->func = MODE_SLAVE_AUTO;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -733,10 +733,10 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
u8 iface = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface = CS42L52_IFACE_CTL1_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
iface = CS42L52_IFACE_CTL1_SLAVE;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -757,10 +757,10 @@ static int cs42l56_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
struct cs42l56_private *cs42l56 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs42l56->iface = CS42L56_MASTER_MODE;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs42l56->iface = CS42L56_SLAVE_MODE;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -943,11 +943,11 @@ static int cs42l73_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
mmcc = snd_soc_component_read(component, CS42L73_MMCC(id));
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
mmcc |= CS42L73_MS_MASTER;
|
||||
break;
|
||||
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
mmcc &= ~CS42L73_MS_MASTER;
|
||||
break;
|
||||
|
||||
|
||||
@@ -242,10 +242,10 @@ static int cs42xx8_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* Set master/slave audio interface */
|
||||
switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs42xx8->slave_mode = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs42xx8->slave_mode = false;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -640,10 +640,10 @@ static int cs43130_set_sp_fmt(int dai_id, unsigned int bitwidth_sclk,
|
||||
}
|
||||
|
||||
switch (cs43130->dais[dai_id].dai_mode) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
dai_mode_val = 0;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
dai_mode_val = 1;
|
||||
break;
|
||||
default:
|
||||
@@ -851,7 +851,7 @@ static int cs43130_dsd_hw_params(struct snd_pcm_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (cs43130->dais[dai->id].dai_mode == SND_SOC_DAIFMT_CBM_CFM)
|
||||
if (cs43130->dais[dai->id].dai_mode == SND_SOC_DAIFMT_CBP_CFP)
|
||||
regmap_update_bits(cs43130->regmap, CS43130_DSD_INT_CFG,
|
||||
CS43130_DSD_MASTER, CS43130_DSD_MASTER);
|
||||
else
|
||||
@@ -951,7 +951,7 @@ static int cs43130_hw_params(struct snd_pcm_substream *substream,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!sclk && cs43130->dais[dai->id].dai_mode == SND_SOC_DAIFMT_CBM_CFM)
|
||||
if (!sclk && cs43130->dais[dai->id].dai_mode == SND_SOC_DAIFMT_CBP_CFP)
|
||||
/* Calculate SCLK in master mode if unassigned */
|
||||
sclk = params_rate(params) * bitwidth_dai *
|
||||
params_channels(params);
|
||||
@@ -1516,11 +1516,11 @@ static int cs43130_pcm_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBS_CFS;
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBC_CFC;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBM_CFM;
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBP_CFP;
|
||||
break;
|
||||
default:
|
||||
dev_err(cs43130->dev, "unsupported mode\n");
|
||||
@@ -1579,11 +1579,11 @@ static int cs43130_dsd_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBS_CFS;
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBC_CFC;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBM_CFM;
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBP_CFP;
|
||||
break;
|
||||
default:
|
||||
dev_err(cs43130->dev, "Unsupported DAI format.\n");
|
||||
|
||||
@@ -49,7 +49,7 @@ static int cs4341_set_fmt(struct snd_soc_dai *dai, unsigned int format)
|
||||
struct cs4341_priv *cs4341 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -557,9 +557,9 @@ static int cs530x_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int asp_fmt, asp_cfg = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
asp_cfg = CS530X_ASP_PRIMARY;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -572,10 +572,10 @@ static int cs53l30_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
u8 aspcfg = 0, aspctl1 = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aspcfg |= CS53L30_ASP_MS;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -882,11 +882,11 @@ static int da7210_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
|
||||
return -EINVAL;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
da7210->master = 1;
|
||||
dai_cfg1 |= DA7210_DAI_MODE_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
da7210->master = 0;
|
||||
dai_cfg1 |= DA7210_DAI_MODE_SLAVE;
|
||||
break;
|
||||
|
||||
@@ -1935,10 +1935,10 @@ static int da7218_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
u8 dai_clk_mode = 0, dai_ctrl = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
da7218->master = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
da7218->master = false;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1312,10 +1312,10 @@ static int da7219_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
u8 dai_clk_mode = 0, dai_ctrl = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
da7219->master = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
da7219->master = false;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1034,11 +1034,11 @@ static int da732x_set_dai_fmt(struct snd_soc_dai *dai, u32 fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
aif1 = DA732X_AIF_SLAVE;
|
||||
aif_mclk = DA732X_AIFM_FRAME_64 | DA732X_AIFM_SRC_SEL_AIFA;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif1 = DA732X_AIF_CLK_FROM_SRC;
|
||||
aif_mclk = DA732X_CLK_GENERATION_AIF_A;
|
||||
break;
|
||||
|
||||
@@ -1160,12 +1160,12 @@ static int da9055_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
u8 aif_clk_mode, aif_ctrl, mode;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
/* DA9055 in I2S Master Mode */
|
||||
mode = 1;
|
||||
aif_clk_mode = DA9055_AIF_CLK_EN_MASTER_MODE;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
/* DA9055 in I2S Slave Mode */
|
||||
mode = 0;
|
||||
aif_clk_mode = DA9055_AIF_CLK_EN_SLAVE_MODE;
|
||||
|
||||
@@ -129,12 +129,12 @@ static int lochnagar_sc_check_fmt(struct snd_soc_dai *dai, unsigned int fmt,
|
||||
|
||||
static int lochnagar_sc_set_line_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
{
|
||||
return lochnagar_sc_check_fmt(dai, fmt, SND_SOC_DAIFMT_CBS_CFS);
|
||||
return lochnagar_sc_check_fmt(dai, fmt, SND_SOC_DAIFMT_CBC_CFC);
|
||||
}
|
||||
|
||||
static int lochnagar_sc_set_usb_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
{
|
||||
return lochnagar_sc_check_fmt(dai, fmt, SND_SOC_DAIFMT_CBM_CFM);
|
||||
return lochnagar_sc_check_fmt(dai, fmt, SND_SOC_DAIFMT_CBP_CFP);
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops lochnagar_sc_line_ops = {
|
||||
|
||||
@@ -2776,7 +2776,7 @@ static int madera_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
break;
|
||||
case SND_SOC_DAIFMT_DSP_B:
|
||||
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) !=
|
||||
SND_SOC_DAIFMT_CBM_CFM) {
|
||||
SND_SOC_DAIFMT_CBP_CFP) {
|
||||
madera_aif_err(dai, "DSP_B not valid in slave mode\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -2787,7 +2787,7 @@ static int madera_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
break;
|
||||
case SND_SOC_DAIFMT_LEFT_J:
|
||||
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) !=
|
||||
SND_SOC_DAIFMT_CBM_CFM) {
|
||||
SND_SOC_DAIFMT_CBP_CFP) {
|
||||
madera_aif_err(dai, "LEFT_J not valid in slave mode\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -2800,15 +2800,15 @@ static int madera_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
lrclk |= MADERA_AIF1TX_LRCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
bclk |= MADERA_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
bclk |= MADERA_AIF1_BCLK_MSTR;
|
||||
lrclk |= MADERA_AIF1TX_LRCLK_MSTR;
|
||||
break;
|
||||
|
||||
@@ -482,10 +482,10 @@ static int nau8540_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int ctrl1_val = 0, ctrl2_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ctrl2_val |= NAU8540_I2S_MS_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -613,10 +613,10 @@ static int nau8810_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
u16 ctrl1_val = 0, ctrl2_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ctrl2_val |= NAU8810_CLKIO_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -806,10 +806,10 @@ static int nau8822_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
dev_dbg(component->dev, "%s\n", __func__);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ctrl2_val |= 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
ctrl2_val &= ~1;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1159,10 +1159,10 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int ctrl1_val = 0, ctrl2_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ctrl2_val |= NAU8824_I2S_MS_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1356,10 +1356,10 @@ static int nau8825_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
unsigned int ctrl1_val = 0, ctrl2_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ctrl2_val |= NAU8825_I2S_MS_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -303,10 +303,10 @@ static int rk817_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
unsigned int i2s_mst = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
i2s_mst |= RK817_I2S_MODE_SLV;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
i2s_mst |= RK817_I2S_MODE_MST;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1671,7 +1671,7 @@ static int rt1011_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
|
||||
snd_soc_dapm_mutex_lock(dapm);
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT1011_I2S_TDM_MS_S;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -753,10 +753,10 @@ static int rt1015_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0, reg_val2 = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
reg_val |= RT1015_TCON_TDM_MS_M;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT1015_TCON_TDM_MS_S;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -367,11 +367,11 @@ static int rt1016_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
reg_val |= RT1016_I2S_MS_M;
|
||||
rt1016->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT1016_I2S_MS_S;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -697,11 +697,11 @@ static int rt1305_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0, reg1_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
reg_val |= RT1305_SEL_I2S_OUT_MODE_M;
|
||||
rt1305->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT1305_SEL_I2S_OUT_MODE_S;
|
||||
rt1305->master = 0;
|
||||
break;
|
||||
|
||||
@@ -523,7 +523,7 @@ static int rt1308_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0, reg1_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
rt1308->master = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -706,12 +706,12 @@ static int rt274_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
snd_soc_component_update_bits(component,
|
||||
RT274_I2S_CTRL1, RT274_I2S_MODE_MASK, RT274_I2S_MODE_M);
|
||||
rt274->master = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
snd_soc_component_update_bits(component,
|
||||
RT274_I2S_CTRL1, RT274_I2S_MODE_MASK, RT274_I2S_MODE_S);
|
||||
rt274->master = false;
|
||||
|
||||
@@ -765,11 +765,11 @@ static int rt286_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
snd_soc_component_update_bits(component,
|
||||
RT286_I2S_CTRL1, 0x800, 0x800);
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
snd_soc_component_update_bits(component,
|
||||
RT286_I2S_CTRL1, 0x800, 0x0);
|
||||
break;
|
||||
|
||||
@@ -829,11 +829,11 @@ static int rt298_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
struct snd_soc_component *component = dai->component;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
snd_soc_component_update_bits(component,
|
||||
RT298_I2S_CTRL1, 0x800, 0x800);
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
snd_soc_component_update_bits(component,
|
||||
RT298_I2S_CTRL1, 0x800, 0x0);
|
||||
break;
|
||||
|
||||
@@ -1015,10 +1015,10 @@ static int rt5616_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5616->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5616_I2S_MS_S;
|
||||
rt5616->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -1411,10 +1411,10 @@ static int rt5631_hifi_codec_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
dev_dbg(component->dev, "enter %s\n", __func__);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5631->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
iface |= RT5631_SDP_MODE_SEL_SLAVE;
|
||||
rt5631->master = 0;
|
||||
break;
|
||||
|
||||
@@ -1773,10 +1773,10 @@ static int rt5640_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
int dai_sel;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5640->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5640_I2S_MS_S;
|
||||
rt5640->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -2841,10 +2841,10 @@ static int rt5645_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5645->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5645_I2S_MS_S;
|
||||
rt5645->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -1352,10 +1352,10 @@ static int rt5651_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5651->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5651_I2S_MS_S;
|
||||
rt5651->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -3363,10 +3363,10 @@ static int rt5659_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5659->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5659_I2S_MS_S;
|
||||
rt5659->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -905,11 +905,11 @@ static int rt5660_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5660->master[dai->id] = 1;
|
||||
break;
|
||||
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5660_I2S_MS_S;
|
||||
rt5660->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -2814,9 +2814,9 @@ static int rt5663_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5663_I2S_MS_S;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -4219,10 +4219,10 @@ static int rt5665_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5665->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5665_I2S_MS_S;
|
||||
rt5665->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -2010,10 +2010,10 @@ static int rt5668_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0, tdm_ctrl = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5668->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
rt5668->master[dai->id] = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -2439,10 +2439,10 @@ static int rt5670_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5670->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5670_I2S_MS_S;
|
||||
rt5670->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -4377,10 +4377,10 @@ static int rt5677_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5677->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg_val |= RT5677_I2S_MS_S;
|
||||
rt5677->master[dai->id] = 0;
|
||||
break;
|
||||
|
||||
@@ -2225,10 +2225,10 @@ static int rt5682_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0, tdm_ctrl = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5682->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
rt5682->master[dai->id] = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -2132,10 +2132,10 @@ static int rt5682s_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int reg_val = 0, tdm_ctrl = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
rt5682s->master[dai->id] = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
rt5682s->master[dai->id] = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -806,9 +806,9 @@ static int sgtl5000_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
* - clock and frame master
|
||||
*/
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
i2sctl |= SGTL5000_I2S_MASTER;
|
||||
sgtl5000->master = 1;
|
||||
break;
|
||||
|
||||
@@ -158,11 +158,11 @@ static int src4xxx_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int ctrl;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ctrl = SRC4XXX_BUS_MASTER;
|
||||
src4xxx->master[dai->id] = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
ctrl = 0;
|
||||
src4xxx->master[dai->id] = false;
|
||||
break;
|
||||
|
||||
@@ -2049,7 +2049,7 @@ static int twl4030_voice_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
format &= ~(TWL4030_VIF_SLAVE_EN);
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
format |= TWL4030_VIF_SLAVE_EN;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1576,15 +1576,15 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
lrclk |= WM2200_AIF1TX_LRCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
bclk |= WM2200_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
lrclk |= WM2200_AIF1TX_LRCLK_MSTR;
|
||||
bclk |= WM2200_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
|
||||
@@ -1303,15 +1303,15 @@ static int wm5100_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
lrclk |= WM5100_AIF1TX_LRCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
bclk |= WM5100_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
lrclk |= WM5100_AIF1TX_LRCLK_MSTR;
|
||||
bclk |= WM5100_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
|
||||
@@ -846,12 +846,12 @@ static int wm8350_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
master |= WM8350_BCLK_MSTR;
|
||||
dac_lrc |= WM8350_DACLRC_ENA;
|
||||
adc_lrc |= WM8350_ADCLRC_ENA;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -986,10 +986,10 @@ static int wm8400_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
audio3 &= ~WM8400_AIF_MSTR1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
audio3 |= WM8400_AIF_MSTR1;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -389,10 +389,10 @@ static int wm8510_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
clk |= 0x0001;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -264,10 +264,10 @@ static int wm8523_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
WM8523_FMT_MASK | WM8523_AIF_MSTR_MASK);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aifctrl1 |= WM8523_AIF_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -139,7 +139,7 @@ static int wm8524_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
SND_SOC_DAIFMT_MASTER_MASK);
|
||||
|
||||
if (fmt != (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
|
||||
SND_SOC_DAIFMT_CBS_CFS)) {
|
||||
SND_SOC_DAIFMT_CBC_CFC)) {
|
||||
dev_err(codec_dai->dev, "Invalid DAI format\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -614,10 +614,10 @@ static int wm8580_set_paif_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
aifb &= ~(WM8580_AIF_FMT_MASK | WM8580_AIF_LRP | WM8580_AIF_BCP);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
aifa &= ~WM8580_AIF_MS;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aifa |= WM8580_AIF_MS;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -243,10 +243,10 @@ static int wm8711_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface |= 0x0040;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -128,7 +128,7 @@ static int wm8728_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* The hardware only support full slave mode */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -404,10 +404,10 @@ static int wm8737_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
u16 af = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
af |= WM8737_MS;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -308,7 +308,7 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* check master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -522,10 +522,10 @@ static int wm8750_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface = 0x0040;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -963,12 +963,12 @@ static int wm8753_pcm_set_dai_fmt(struct snd_soc_component *component,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ioctl |= 0x2;
|
||||
fallthrough;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
voice |= 0x0040;
|
||||
break;
|
||||
default:
|
||||
@@ -1089,12 +1089,12 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_component *component,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ioctl |= 0x1;
|
||||
fallthrough;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
hifi |= 0x0040;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -349,10 +349,10 @@ static int wm8770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
component = dai->component;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
master = 0x100;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
master = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -182,9 +182,9 @@ static int wm8776_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
iface = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
master = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -243,10 +243,10 @@ static int wm8804_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
snd_soc_component_update_bits(component, WM8804_AIFRX, 0x3, format);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
master = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -867,22 +867,22 @@ static int wm8900_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
clocking1 &= ~WM8900_REG_CLOCKING1_BCLK_DIR;
|
||||
aif3 &= ~WM8900_REG_AUDIO3_ADCLRC_DIR;
|
||||
aif4 &= ~WM8900_REG_AUDIO4_DACLRC_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
clocking1 &= ~WM8900_REG_CLOCKING1_BCLK_DIR;
|
||||
aif3 |= WM8900_REG_AUDIO3_ADCLRC_DIR;
|
||||
aif4 |= WM8900_REG_AUDIO4_DACLRC_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
clocking1 |= WM8900_REG_CLOCKING1_BCLK_DIR;
|
||||
aif3 |= WM8900_REG_AUDIO3_ADCLRC_DIR;
|
||||
aif4 |= WM8900_REG_AUDIO4_DACLRC_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
clocking1 |= WM8900_REG_CLOCKING1_BCLK_DIR;
|
||||
aif3 &= ~WM8900_REG_AUDIO3_ADCLRC_DIR;
|
||||
aif4 &= ~WM8900_REG_AUDIO4_DACLRC_DIR;
|
||||
|
||||
@@ -1229,15 +1229,15 @@ static int wm8903_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
WM8903_AIF_LRCLK_INV | WM8903_AIF_BCLK_INV);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
aif1 |= WM8903_LRCLK_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif1 |= WM8903_LRCLK_DIR | WM8903_BCLK_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
aif1 |= WM8903_BCLK_DIR;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1424,15 +1424,15 @@ static int wm8904_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
unsigned int aif3 = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
aif3 |= WM8904_LRCLK_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
aif1 |= WM8904_BCLK_DIR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif1 |= WM8904_BCLK_DIR;
|
||||
aif3 |= WM8904_LRCLK_DIR;
|
||||
break;
|
||||
|
||||
@@ -343,10 +343,10 @@ static int wm8940_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
u16 clk = snd_soc_component_read(component, WM8940_CLOCK) & 0x1fe;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
clk |= 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -671,9 +671,9 @@ static int wm8955_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
u16 aif = 0;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif |= WM8955_MS;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -540,10 +540,10 @@ static int wm8960_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface |= 0x0040;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -627,10 +627,10 @@ static int wm8961_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
WM8961_MS | WM8961_FORMAT_MASK);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif |= WM8961_MS;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2762,10 +2762,10 @@ static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif0 |= WM8962_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -452,10 +452,10 @@ static int wm8971_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface = 0x0040;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -454,10 +454,10 @@ static int wm8974_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
clk |= 0x0001;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -660,10 +660,10 @@ static int wm8978_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
clk |= 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
clk &= ~1;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -594,10 +594,10 @@ static int wm8983_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
WM8983_FMT_MASK, format << WM8983_FMT_SHIFT);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
master = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -688,10 +688,10 @@ static int wm8985_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
WM8985_FMT_MASK, format << WM8985_FMT_SHIFT);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
master = 0;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -589,10 +589,10 @@ static int wm8988_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
iface = 0x0040;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -897,10 +897,10 @@ static int wm8990_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
audio3 &= ~WM8990_AIF_MSTR1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
audio3 |= WM8990_AIF_MSTR1;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -958,10 +958,10 @@ static int wm8991_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* set master/slave audio interface */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
audio3 &= ~WM8991_AIF_MSTR1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
audio3 |= WM8991_AIF_MSTR1;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1098,18 +1098,18 @@ static int wm8993_set_dai_fmt(struct snd_soc_dai *dai,
|
||||
aif4 &= ~WM8993_LRCLK_DIR;
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
wm8993->master = 0;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
aif4 |= WM8993_LRCLK_DIR;
|
||||
wm8993->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
aif1 |= WM8993_BCLK_DIR;
|
||||
wm8993->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif1 |= WM8993_BCLK_DIR;
|
||||
aif4 |= WM8993_LRCLK_DIR;
|
||||
wm8993->master = 1;
|
||||
|
||||
@@ -2783,9 +2783,9 @@ static int wm8994_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
ms = WM8994_AIF1_MSTR;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1448,9 +1448,9 @@ static int wm8995_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
|
||||
master = 0;
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
master = WM8995_AIF1_MSTR;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1672,16 +1672,16 @@ static int wm8996_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
lrclk_tx |= WM8996_AIF1TX_LRCLK_MSTR;
|
||||
lrclk_rx |= WM8996_AIF1RX_LRCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
bclk |= WM8996_AIF1_BCLK_MSTR;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
bclk |= WM8996_AIF1_BCLK_MSTR;
|
||||
lrclk_tx |= WM8996_AIF1TX_LRCLK_MSTR;
|
||||
lrclk_rx |= WM8996_AIF1RX_LRCLK_MSTR;
|
||||
|
||||
@@ -907,18 +907,18 @@ static int wm9081_set_dai_fmt(struct snd_soc_dai *dai,
|
||||
WM9081_BCLK_DIR | WM9081_LRCLK_DIR | WM9081_AIF_FMT_MASK);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
wm9081->master = 0;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
aif2 |= WM9081_LRCLK_DIR;
|
||||
wm9081->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
aif2 |= WM9081_BCLK_DIR;
|
||||
wm9081->master = 1;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
aif2 |= WM9081_LRCLK_DIR | WM9081_BCLK_DIR;
|
||||
wm9081->master = 1;
|
||||
break;
|
||||
|
||||
@@ -944,19 +944,19 @@ static int wm9713_set_dai_fmt(struct snd_soc_dai *codec_dai,
|
||||
|
||||
/* clock masters */
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
case SND_SOC_DAIFMT_CBP_CFP:
|
||||
reg |= 0x4000;
|
||||
gpio |= 0x0010;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
case SND_SOC_DAIFMT_CBP_CFC:
|
||||
reg |= 0x6000;
|
||||
gpio |= 0x0018;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
case SND_SOC_DAIFMT_CBC_CFC:
|
||||
reg |= 0x2000;
|
||||
gpio |= 0x001a;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
case SND_SOC_DAIFMT_CBC_CFP:
|
||||
gpio |= 0x0012;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
|
||||
} else if (of_device_is_compatible(np, "fsl,imx-audio-tlv320aic31xx")) {
|
||||
codec_dai_name[0] = "tlv320dac31xx-hifi";
|
||||
priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
|
||||
priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC;
|
||||
priv->dai_link[1].playback_only = 1;
|
||||
priv->dai_link[2].playback_only = 1;
|
||||
priv->cpu_priv.sysclk_dir[TX] = SND_SOC_CLOCK_OUT;
|
||||
@@ -818,7 +818,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
priv->codec_priv[0].mclk_id = NAU8822_CLK_MCLK;
|
||||
priv->codec_priv[0].fll_id = NAU8822_CLK_PLL;
|
||||
priv->codec_priv[0].pll_id = NAU8822_CLK_PLL;
|
||||
priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
|
||||
priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
|
||||
if (codec_dev[0])
|
||||
priv->codec_priv[0].mclk = devm_clk_get(codec_dev[0], NULL);
|
||||
} else if (of_device_is_compatible(np, "fsl,imx-audio-wm8904")) {
|
||||
|
||||
@@ -198,7 +198,7 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
|
||||
dl->platforms = platform;
|
||||
dl->num_platforms = 1;
|
||||
dl->id = 0;
|
||||
dl->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS;
|
||||
dl->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC;
|
||||
dl->be_hw_params_fixup = avs_da7219_be_fixup;
|
||||
dl->init = avs_da7219_codec_init;
|
||||
dl->exit = avs_da7219_codec_exit;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user