Specify clock provider directly to CPU DAIs
Subsystems (30)
cover Specify clock provider directly to CPU DAIs
Currently the set_fmt callback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. However, as things are now broken down into components which can be connected as either the CPU or CODEC side of a DAI link it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. Making this change allows us to remove one of the last parts of the ASoC core that needs to know if a driver is a CODEC driver, where it flips the clock format specifier if a CODEC driver is used on the CPU side of a DAI link, as well as just being conceptually more consistent with componentisation.
The basic idea of this patch chain is to change the set_fmt callback from specifying if the CODEC is provider/consumer into directly specifying if the component is provider/consumer. To do this we add some new defines, and then to preserve bisectability, the migration is done by adding a new callback, converting over all existing CPU side drivers, converting the core, and then finally reverting back to the old callback.
Converting the platform drivers makes sense as the existing defines are from the perspective of the CODEC and there are more CODEC drivers than platform drivers.
Obviously a fair amount of this patch chain I was only able to build test, so any testing that can be done would be greatly appreciated.
Thanks,
Charles
Charles Keepax (56):
ASoC: core: Add set_fmt_new callback that directly specifies provider
ASoC: amd: vangogh: Update to use set_fmt_new callback
ASoC: atmel: Update to use set_fmt_new callback
ASoC: au1x: Update to use set_fmt_new callback
ASoC: bcm: Update to use set_fmt_new callback
ASoC: ep93xx: Update to use set_fmt_new callback
ASoC: dwc: Update to use set_fmt_new callback
ASoC: fsl: Update to use set_fmt_new callback
ASoC: hisilicon: Update to use set_fmt_new callback
ASoC: img: Update to use set_fmt_new callback
ASoC: Intel: Update to use set_fmt_new callback
ASoC: js4740-i2s: Update to use set_fmt_new callback
ASoC: mediatek: Update to use set_fmt_new callback
ASoC: meson: Update to use set_fmt_new callback
ASoC: mxs-saif: Update to use set_fmt_new callback
ASoC: pxa: Update to use set_fmt_new callback
ASoC: qcom: Update to use set_fmt_new callback
ASoC: rockchip: Update to use set_fmt_new callback
ASoC: samsung: Update to use set_fmt_new callback
ASoC: sh: Update to use set_fmt_new callback
ASoC: stm: Update to use set_fmt_new callback
ASoC: sunxi: Update to use set_fmt_new callback
ASoC: tegra: Update to use set_fmt_new callback
ASoC: test-component: Update to use set_fmt_new callback
ASoC: ti: Update to use set_fmt_new callback
ASoC: ux500: Update to use set_fmt_new callback
ASoC: xtensa: Update to use set_fmt_new callback
ASoC: core: Always send the CPU DAI a direct clock specifier
ASoC: amd: vangogh: Rename set_fmt_new back to set_fmt
ASoC: atmel: Rename set_fmt_new back to set_fmt
ASoC: au1x: Rename set_fmt_new back to set_fmt
ASoC: bcm: Rename set_fmt_new back to set_fmt
ASoC: ep93xx: Rename set_fmt_new back to set_fmt
ASoC: dwc: Rename set_fmt_new back to set_fmt
ASoC: fsl: Rename set_fmt_new back to set_fmt
ASoC: hisilicon: Rename set_fmt_new back to set_fmt
ASoC: img: Rename set_fmt_new back to set_fmt
ASoC: Intel: Rename set_fmt_new back to set_fmt
ASoC: jz4740-i2s: Rename set_fmt_new back to set_fmt
ASoC: mediatek: Rename set_fmt_new back to set_fmt
ASoC: meson: Rename set_fmt_new back to set_fmt
ASoC: mxs-saif: Rename set_fmt_new back to set_fmt
ASoC: pxa: Rename set_fmt_new back to set_fmt
ASoC: qcom: Rename set_fmt_new back to set_fmt
ASoC: rockchip: Rename set_fmt_new back to set_fmt
ASoC: samsung: Rename set_fmt_new back to set_fmt
ASoC: sh: Rename set_fmt_new back to set_fmt
ASoC: stm: Rename set_fmt_new back to set_fmt
ASoC: sunxi: Rename set_fmt_new back to set_fmt
ASoC: tegra: Rename set_fmt_new back to set_fmt
ASoC: test-component: Rename set_fmt_new back to set_fmt
ASoC: ti: Rename set_fmt_new back to set_fmt
ASoC: ux500: Rename set_fmt_new back to set_fmt
ASoC: xtensa: Rename set_fmt_new back to set_fmt
ASoC: soc-dai: Remove set_fmt_new callback
ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local
include/sound/soc-component.h | 5 --- include/sound/soc-dai.h | 6 ++++ sound/soc/amd/vangogh/acp5x-i2s.c | 4 +-- sound/soc/atmel/atmel-i2s.c | 4 +-- sound/soc/atmel/atmel_ssc_dai.c | 18 +++++----- sound/soc/atmel/mchp-i2s-mcc.c | 8 ++--- sound/soc/atmel/mchp-pdmc.c | 4 +-- sound/soc/au1x/i2sc.c | 2 +- sound/soc/au1x/psc-i2s.c | 4 +-- sound/soc/bcm/bcm2835-i2s.c | 20 +++++------ sound/soc/bcm/cygnus-ssp.c | 4 +-- sound/soc/cirrus/ep93xx-i2s.c | 4 +-- sound/soc/dwc/dwc-i2s.c | 8 ++--- sound/soc/fsl/fsl_audmix.c | 6 ++-- sound/soc/fsl/fsl_esai.c | 8 ++--- sound/soc/fsl/fsl_mqs.c | 2 +- sound/soc/fsl/fsl_sai.c | 8 ++--- sound/soc/fsl/fsl_ssi.c | 22 ++++++------ sound/soc/fsl/imx-audmix.c | 4 +-- sound/soc/fsl/imx-card.c | 2 +- sound/soc/generic/simple-card-utils.c | 7 +++- sound/soc/generic/test-component.c | 18 +++++----- sound/soc/hisilicon/hi6210-i2s.c | 18 +++++----- sound/soc/img/img-i2s-in.c | 4 +-- sound/soc/img/img-i2s-out.c | 6 ++-- sound/soc/intel/atom/sst-atom-controls.c | 4 +-- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 2 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcht_nocodec.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 3 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++-- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/keembay/kmb_platform.c | 4 +-- sound/soc/jz4740/jz4740-i2s.c | 10 +++--- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 6 ++-- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 6 ++-- sound/soc/meson/aiu-encoder-i2s.c | 2 +- sound/soc/meson/axg-tdm-interface.c | 14 ++++---- sound/soc/mxs/mxs-saif.c | 4 +-- sound/soc/pxa/magician.c | 8 ++--- sound/soc/pxa/mmp-sspa.c | 6 ++-- sound/soc/pxa/pxa-ssp.c | 22 ++++++------ sound/soc/pxa/pxa2xx-i2s.c | 6 ++-- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/qdsp6/audioreach.c | 4 +-- sound/soc/qcom/qdsp6/q6afe.c | 6 ++-- sound/soc/qcom/sc7180.c | 2 +- sound/soc/qcom/sdm845.c | 6 ++-- sound/soc/qcom/sm8250.c | 4 +-- sound/soc/rockchip/rockchip_i2s.c | 6 ++-- sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++-- sound/soc/samsung/i2s.c | 6 ++-- sound/soc/samsung/pcm.c | 4 +-- sound/soc/samsung/s3c-i2s-v2.c | 6 ++-- sound/soc/samsung/s3c24xx-i2s.c | 6 ++-- sound/soc/sh/fsi.c | 6 ++-- sound/soc/sh/rcar/core.c | 4 +-- sound/soc/sh/rz-ssi.c | 2 +- sound/soc/sh/ssi.c | 10 +++--- sound/soc/soc-core.c | 14 ++------ sound/soc/soc-dai.c | 3 +- sound/soc/stm/stm32_i2s.c | 8 ++--- sound/soc/stm/stm32_sai_sub.c | 8 ++--- sound/soc/sunxi/sun4i-i2s.c | 18 +++++----- sound/soc/sunxi/sun8i-codec.c | 6 ++-- sound/soc/tegra/tegra20_i2s.c | 6 ++-- sound/soc/tegra/tegra210_i2s.c | 6 ++-- sound/soc/tegra/tegra30_i2s.c | 6 ++-- sound/soc/ti/davinci-i2s.c | 32 ++++++++--------- sound/soc/ti/davinci-mcasp.c | 10 +++--- sound/soc/ti/omap-mcbsp.c | 12 +++---- sound/soc/ux500/ux500_msp_dai.c | 36 ++++++++++---------- sound/soc/xtensa/xtfpga-i2s.c | 4 +-- 77 files changed, 279 insertions(+), 283 deletions(-)
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 1/56 ASoC: core: Add set_fmt_new callback that directly specifies provider
The original set_fmt callback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. Now everything is componentised it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. To start this migration add a new callback that can be used to receive a direct specification of clocking. As there are more CODEC drivers than platform drivers, we make the new flags identical to the old CODEC flags meaning CODEC drivers will not require an update.
--- include/sound/soc-dai.h | 7 +++++++ sound/soc/soc-core.c | 3 ++- sound/soc/soc-dai.c | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-)
include/sound/soc-dai.h +7 -0
@@ -124,6 +124,12 @@ struct snd_compr_stream;#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 +#define SND_SOC_DAIFMT_BP_FC SND_SOC_DAIFMT_CBP_CFC +#define SND_SOC_DAIFMT_BC_FC SND_SOC_DAIFMT_CBC_CFC +/* Describes the possible PCM format */ #define SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT 48#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_MASK (0xFFFFULL << SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT)
@@ -282,6 +288,7 @@ struct snd_soc_dai_ops {* Called by soc_card drivers, normally in their hw_params. */ int (*set_fmt)(struct snd_soc_dai *dai,unsigned int fmt); +int (*set_fmt_new)(struct snd_soc_dai *dai,unsigned int fmt);int (*xlate_tdm_slot_mask)(unsigned int slots,unsigned int *tx_mask,unsigned int *rx_mask); int (*set_tdm_slot)(struct snd_soc_dai *dai,
sound/soc/soc-core.c +2 -1
@@ -1235,7 +1235,8 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,for_each_rtd_cpu_dais (rtd, i, cpu_dai) {unsigned int fmt = dai_fmt; -if (snd_soc_component_is_codec (cpu_dai->component)) +if (cpu_dai->driver->ops->set_fmt_new || +snd_soc_component_is_codec (cpu_dai->component)) fmt = inv_dai_fmt; ret =snd_soc_dai_set_fmt (cpu_dai, fmt);
sound/soc/soc-dai.c +4 -1
@@ -209,7 +209,10 @@ int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)int ret = -ENOTSUPP ;if (dai->driver->ops && - dai->driver->ops->set_fmt) + dai->driver->ops->set_fmt_new) + ret = dai->driver->ops->set_fmt_new (dai, fmt); +else if (dai->driver->ops && + dai->driver->ops->set_fmt) ret = dai->driver->ops->set_fmt (dai, fmt);return soc_dai_ret (dai, ret);
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 2/56 ASoC: amd: vangogh: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/amd/vangogh/acp5x-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/amd/vangogh/acp5x-i2s.c +3 -3
@@ -37,10 +37,10 @@ static int acp5x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, } mode = fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ;switch (mode) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : adata->master_mode =I2S_MASTER_MODE_ENABLE ;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : adata->master_mode =I2S_MASTER_MODE_DISABLE ;break ; }
@@ -339,7 +339,7 @@ static int acp5x_i2s_trigger(struct snd_pcm_substream *substream,static const struct snd_soc_dai_ops acp5x_i2s_dai_ops = { .hw_params = acp5x_i2s_hwparams, .trigger = acp5x_i2s_trigger, - .set_fmt = acp5x_i2s_set_fmt, + .set_fmt_new = acp5x_i2s_set_fmt, .set_tdm_slot = acp5x_i2s_set_tdm_slot, };
Signature · 1 line
2.30.2
PATCH 3/56 ASoC: atmel: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/atmel/atmel-i2s.c | 6 +++--- sound/soc/atmel/atmel_ssc_dai.c | 20 ++++++++++---------- sound/soc/atmel/mchp-i2s-mcc.c | 10 +++++----- sound/soc/atmel/mchp-pdmc.c | 6 +++--- 4 files changed, 21 insertions(+), 21 deletions(-)
sound/soc/atmel/atmel-i2s.c +3 -3
@@ -343,7 +343,7 @@ static int atmel_i2s_hw_params(struct snd_pcm_substream *substream, }switch (dev->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :/* codec is slave, so cpu is master */ mr |=ATMEL_I2SC_MR_MODE_MASTER ; ret =atmel_i2s_get_gck_param (dev,params_rate (params));
@@ -351,7 +351,7 @@ static int atmel_i2s_hw_params(struct snd_pcm_substream *substream,return ret;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :/* codec is master, so cpu is slave */ mr |=ATMEL_I2SC_MR_MODE_SLAVE ; dev->gck_param =NULL ;
@@ -533,7 +533,7 @@ static const struct snd_soc_dai_ops atmel_i2s_dai_ops = { .prepare = atmel_i2s_prepare, .trigger = atmel_i2s_trigger, .hw_params = atmel_i2s_hw_params, - .set_fmt = atmel_i2s_set_dai_fmt, + .set_fmt_new = atmel_i2s_set_dai_fmt, };static int atmel_i2s_dai_probe (struct snd_soc_dai *dai)
sound/soc/atmel/atmel_ssc_dai.c +10 -10
@@ -210,7 +210,7 @@ static int atmel_ssc_hw_rule_rate(struct snd_pcm_hw_params *params,return frame_size;switch (ssc_p->daifmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BC_FP :if ((ssc_p->dir_mask &SSC_DIR_MASK_CAPTURE ) && ssc->clk_from_rk_pin)/* Receiver Frame Synchro (i.e. capture)
@@ -220,7 +220,7 @@ static int atmel_ssc_hw_rule_rate(struct snd_pcm_hw_params *params, mck_div =3 ;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :if ((ssc_p->dir_mask &SSC_DIR_MASK_PLAYBACK ) && !ssc->clk_from_rk_pin)/* Transmit Frame Synchro (i.e. playback)
@@ -233,7 +233,7 @@ static int atmel_ssc_hw_rule_rate(struct snd_pcm_hw_params *params, }switch (ssc_p->daifmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : r.num = ssc_p->mck_rate / mck_div / frame_size; ret =snd_interval_ratnum (i,1 , &r, &num, &den);
@@ -243,8 +243,8 @@ static int atmel_ssc_hw_rule_rate(struct snd_pcm_hw_params *params, }break ; -case SND_SOC_DAIFMT_CBP_CFC : -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FP : +case SND_SOC_DAIFMT_BC_FC : t.min =8000 ; t.max = ssc_p->mck_rate / mck_div / frame_size; t.openmin = t.openmax =0 ;
@@ -433,8 +433,8 @@ static int atmel_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,static int atmel_ssc_cfs (struct atmel_ssc_info *ssc_p) {switch (ssc_p->daifmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFC : -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BC_FP : +case SND_SOC_DAIFMT_BP_FP :return 1 ; }return 0 ;
@@ -444,8 +444,8 @@ static int atmel_ssc_cfs(struct atmel_ssc_info *ssc_p)static int atmel_ssc_cbs (struct atmel_ssc_info *ssc_p) {switch (ssc_p->daifmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFP : -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FC : +case SND_SOC_DAIFMT_BP_FP :return 1 ; }return 0 ;
@@ -835,7 +835,7 @@ static const struct snd_soc_dai_ops atmel_ssc_dai_ops = { .prepare = atmel_ssc_prepare, .trigger = atmel_ssc_trigger, .hw_params = atmel_ssc_hw_params, - .set_fmt = atmel_ssc_set_dai_fmt, + .set_fmt_new = atmel_ssc_set_dai_fmt, .set_clkdiv = atmel_ssc_set_dai_clkdiv, };
sound/soc/atmel/mchp-i2s-mcc.c +5 -5
@@ -350,7 +350,7 @@ static int mchp_i2s_mcc_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ;/* We can't generate only FSYNC */ -if ((fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) ==SND_SOC_DAIFMT_CBP_CFC ) +if ((fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) ==SND_SOC_DAIFMT_BC_FP )return -EINVAL ;/* We can only reconfigure the IP when it's stopped */
@@ -547,19 +547,19 @@ static int mchp_i2s_mcc_hw_params(struct snd_pcm_substream *substream, }switch (dev->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :/* cpu is BCLK and LRC master */ mra |=MCHP_I2SMCC_MRA_MODE_MASTER ;if (dev->sysclk) mra |=MCHP_I2SMCC_MRA_IMCKMODE_GEN ; set_divs =1 ;break ; -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BP_FC :/* cpu is BCLK master */ mrb |=MCHP_I2SMCC_MRB_CLKSEL_INT ; set_divs =1 ; fallthrough; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :/* cpu is slave */ mra |=MCHP_I2SMCC_MRA_MODE_SLAVE ;if (dev->sysclk)
@@ -877,7 +877,7 @@ static const struct snd_soc_dai_ops mchp_i2s_mcc_dai_ops = { .trigger = mchp_i2s_mcc_trigger, .hw_params = mchp_i2s_mcc_hw_params, .hw_free = mchp_i2s_mcc_hw_free, - .set_fmt = mchp_i2s_mcc_set_dai_fmt, + .set_fmt_new = mchp_i2s_mcc_set_dai_fmt, .set_tdm_slot = mchp_i2s_mcc_set_dai_tdm_slot, };
sound/soc/atmel/mchp-pdmc.c +3 -3
@@ -492,8 +492,8 @@ static int mchp_pdmc_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)unsigned int fmt_format = fmt &SND_SOC_DAIFMT_FORMAT_MASK ;/* IP needs to be bitclock master */ -if (fmt_master !=SND_SOC_DAIFMT_CBS_CFS && - fmt_master !=SND_SOC_DAIFMT_CBS_CFM ) +if (fmt_master !=SND_SOC_DAIFMT_BP_FP && + fmt_master !=SND_SOC_DAIFMT_BP_FC )return -EINVAL ;/* IP supports only PDM interface */
@@ -708,7 +708,7 @@ static int mchp_pdmc_trigger(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops mchp_pdmc_dai_ops = { - .set_fmt = mchp_pdmc_set_fmt, + .set_fmt_new = mchp_pdmc_set_fmt, .startup = mchp_pdmc_startup, .shutdown = mchp_pdmc_shutdown, .hw_params = mchp_pdmc_hw_params,
Signature · 1 line
2.30.2
PATCH 4/56 ASoC: au1x: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/au1x/i2sc.c | 4 ++-- sound/soc/au1x/psc-i2s.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/au1x/i2sc.c +2 -2
@@ -121,7 +121,7 @@ static int au1xi2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)/* I2S controller only supports provider */ switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC :/* CODEC consumer */ +case SND_SOC_DAIFMT_BP_FP :/* CODEC consumer */ break ;default : goto out;
@@ -206,7 +206,7 @@ static const struct snd_soc_dai_ops au1xi2s_dai_ops = { .startup = au1xi2s_startup, .trigger = au1xi2s_trigger, .hw_params = au1xi2s_hw_params, - .set_fmt = au1xi2s_set_fmt, + .set_fmt_new = au1xi2s_set_fmt, };static struct snd_soc_dai_driver au1xi2s_dai_driver = {
sound/soc/au1x/psc-i2s.c +3 -3
@@ -91,10 +91,10 @@ static int au1xpsc_i2s_set_fmt(struct snd_soc_dai *cpu_dai, }switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP :/* CODEC provider */ +case SND_SOC_DAIFMT_BC_FC :/* CODEC provider */ ct |=PSC_I2SCFG_MS ;/* PSC I2S consumer mode */ break ; -case SND_SOC_DAIFMT_CBC_CFC :/* CODEC consumer */ +case SND_SOC_DAIFMT_BP_FP :/* CODEC consumer */ ct &= ~PSC_I2SCFG_MS ;/* PSC I2S provider mode */ break ;default :
@@ -266,7 +266,7 @@ static const struct snd_soc_dai_ops au1xpsc_i2s_dai_ops = { .startup = au1xpsc_i2s_startup, .trigger = au1xpsc_i2s_trigger, .hw_params = au1xpsc_i2s_hw_params, - .set_fmt = au1xpsc_i2s_set_fmt, + .set_fmt_new = au1xpsc_i2s_set_fmt, };static const struct snd_soc_dai_driver au1xpsc_i2s_dai_template = {
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 5/56 ASoC: bcm: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/bcm/bcm2835-i2s.c | 22 +++++++++++----------- sound/soc/bcm/cygnus-ssp.c | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-)
sound/soc/bcm/bcm2835-i2s.c +11 -11
@@ -133,8 +133,8 @@ static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev)return ;switch (provider) { -case SND_SOC_DAIFMT_CBC_CFC : -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BP_FC :clk_prepare_enable (dev->clk); dev->clk_prepared = true;break ;
@@ -385,12 +385,12 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,/* Check if CPU is bit clock provider */ switch (dev->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BP_FC : bit_clock_provider = true;break ; -case SND_SOC_DAIFMT_CBP_CFC : -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FP : +case SND_SOC_DAIFMT_BC_FC : bit_clock_provider = false;break ;default :
@@ -399,12 +399,12 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,/* Check if CPU is frame sync provider */ switch (dev->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BC_FP : frame_sync_provider = true;break ; -case SND_SOC_DAIFMT_CBC_CFP : -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BP_FC : +case SND_SOC_DAIFMT_BC_FC : frame_sync_provider = false;break ;default :
@@ -743,7 +743,7 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = { .prepare = bcm2835_i2s_prepare, .trigger = bcm2835_i2s_trigger, .hw_params = bcm2835_i2s_hw_params, - .set_fmt = bcm2835_i2s_set_dai_fmt, + .set_fmt_new = bcm2835_i2s_set_dai_fmt, .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio, .set_tdm_slot = bcm2835_i2s_set_dai_tdm_slot, };
sound/soc/bcm/cygnus-ssp.c +3 -3
@@ -849,11 +849,11 @@ static int cygnus_ssp_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) ssp_newcfg =0 ;switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : ssp_newcfg |=BIT (I2S_OUT_CFGX_SLAVE_MODE ); aio->is_slave =1 ;break ; -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : ssp_newcfg &= ~BIT (I2S_OUT_CFGX_SLAVE_MODE ); aio->is_slave =0 ;break ;
@@ -1148,7 +1148,7 @@ static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = { .shutdown = cygnus_ssp_shutdown, .trigger = cygnus_ssp_trigger, .hw_params = cygnus_ssp_hw_params, - .set_fmt = cygnus_ssp_set_fmt, + .set_fmt_new = cygnus_ssp_set_fmt, .set_sysclk = cygnus_ssp_set_sysclk, .set_tdm_slot = cygnus_set_dai_tdm_slot, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 6/56 ASoC: ep93xx: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/cirrus/ep93xx-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/cirrus/ep93xx-i2s.c +3 -3
@@ -246,12 +246,12 @@ static int ep93xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, }switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :/* CPU is provider */ clk_cfg |=EP93XX_I2S_CLKCFG_MASTER ;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :/* Codec is provider */ clk_cfg &= ~EP93XX_I2S_CLKCFG_MASTER ;break ;
@@ -398,7 +398,7 @@ static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { .shutdown = ep93xx_i2s_shutdown, .hw_params = ep93xx_i2s_hw_params, .set_sysclk = ep93xx_i2s_set_sysclk, - .set_fmt = ep93xx_i2s_set_dai_fmt, + .set_fmt_new = ep93xx_i2s_set_dai_fmt, };#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
Signature · 1 line
2.30.2
PATCH 7/56 ASoC: dwc: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/dwc/dwc-i2s.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/dwc/dwc-i2s.c +5 -5
@@ -357,20 +357,20 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)int ret =0 ;switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :if (dev->capability &DW_I2S_SLAVE ) ret =0 ;else ret = -EINVAL ;break ; -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :if (dev->capability &DW_I2S_MASTER ) ret =0 ;else ret = -EINVAL ;break ; -case SND_SOC_DAIFMT_CBP_CFC : -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BC_FP : +case SND_SOC_DAIFMT_BP_FC : ret = -EINVAL ;break ;default :
@@ -387,7 +387,7 @@ static const struct snd_soc_dai_ops dw_i2s_dai_ops = { .hw_params = dw_i2s_hw_params, .prepare = dw_i2s_prepare, .trigger = dw_i2s_trigger, - .set_fmt = dw_i2s_set_fmt, + .set_fmt_new = dw_i2s_set_fmt, };#ifdef CONFIG_PM
Signature · 1 line
2.30.2
PATCH 8/56 ASoC: fsl: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/fsl/fsl_audmix.c | 6 +++--- sound/soc/fsl/fsl_esai.c | 10 +++++----- sound/soc/fsl/fsl_mqs.c | 4 ++-- sound/soc/fsl/fsl_sai.c | 10 +++++----- sound/soc/fsl/fsl_ssi.c | 24 ++++++++++++------------ sound/soc/fsl/imx-audmix.c | 4 ++-- sound/soc/fsl/imx-card.c | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-)
sound/soc/fsl/fsl_audmix.c +3 -3
@@ -259,8 +259,8 @@ static int fsl_audmix_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)/* For playback the AUDMIX is consumer, and for record is provider */ switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP : -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BP_FP :break ;default :return -EINVAL ;
@@ -317,7 +317,7 @@ static int fsl_audmix_dai_trigger(struct snd_pcm_substream *substream, int cmd, }static const struct snd_soc_dai_ops fsl_audmix_dai_ops = { - .set_fmt = fsl_audmix_dai_set_fmt, + .set_fmt_new = fsl_audmix_dai_set_fmt, .trigger = fsl_audmix_dai_trigger, };
sound/soc/fsl/fsl_esai.c +5 -5
@@ -480,16 +480,16 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)/* DAI clock provider masks */ switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : esai_priv->consumer_mode = true;break ; -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BP_FC : xccr |= ESAI_xCCR_xCKD;break ; -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BC_FP : xccr |= ESAI_xCCR_xFSD;break ; -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : xccr |= ESAI_xCCR_xFSD | ESAI_xCCR_xCKD;break ;default :
@@ -790,7 +790,7 @@ static const struct snd_soc_dai_ops fsl_esai_dai_ops = { .trigger = fsl_esai_trigger, .hw_params = fsl_esai_hw_params, .set_sysclk = fsl_esai_set_dai_sysclk, - .set_fmt = fsl_esai_set_dai_fmt, + .set_fmt_new = fsl_esai_set_dai_fmt, .set_tdm_slot = fsl_esai_set_dai_tdm_slot, };
sound/soc/fsl/fsl_mqs.c +2 -2
@@ -103,7 +103,7 @@ static int fsl_mqs_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) }switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :break ;default :return -EINVAL ;
@@ -152,7 +152,7 @@ static const struct snd_soc_dai_ops fsl_mqs_dai_ops = { .startup = fsl_mqs_startup, .shutdown = fsl_mqs_shutdown, .hw_params = fsl_mqs_hw_params, - .set_fmt = fsl_mqs_set_dai_fmt, + .set_fmt_new = fsl_mqs_set_dai_fmt, };static struct snd_soc_dai_driver fsl_mqs_dai = {
sound/soc/fsl/fsl_sai.c +5 -5
@@ -292,19 +292,19 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,/* DAI clock provider masks */ switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : val_cr2 |=FSL_SAI_CR2_BCD_MSTR ; val_cr4 |=FSL_SAI_CR4_FSD_MSTR ; sai->is_consumer_mode = false;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : sai->is_consumer_mode = true;break ; -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BP_FC : val_cr2 |=FSL_SAI_CR2_BCD_MSTR ; sai->is_consumer_mode = false;break ; -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BC_FP : val_cr4 |=FSL_SAI_CR4_FSD_MSTR ; sai->is_consumer_mode = true;break ;
@@ -704,7 +704,7 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = { .set_bclk_ratio = fsl_sai_set_dai_bclk_ratio, .set_sysclk = fsl_sai_set_dai_sysclk, - .set_fmt = fsl_sai_set_dai_fmt, + .set_fmt_new = fsl_sai_set_dai_fmt, .set_tdm_slot = fsl_sai_set_dai_tdm_slot, .hw_params = fsl_sai_hw_params, .hw_free = fsl_sai_hw_free,
sound/soc/fsl/fsl_ssi.c +12 -12
@@ -93,7 +93,7 @@*/ #define FSLSSI_AC97_DAIFMT \ (SND_SOC_DAIFMT_AC97 | \ - SND_SOC_DAIFMT_CBM_CFS | \ + SND_SOC_DAIFMT_BC_FP | \ SND_SOC_DAIFMT_NB_NF)#define FSLSSI_SIER_DBG_RX_FLAGS \
@@ -358,13 +358,13 @@ static bool fsl_ssi_is_ac97(struct fsl_ssi *ssi)static bool fsl_ssi_is_i2s_clock_provider (struct fsl_ssi *ssi) {return (ssi->dai_fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) == -SND_SOC_DAIFMT_CBC_CFC ; +SND_SOC_DAIFMT_BP_FP ; } -static bool fsl_ssi_is_i2s_cbp_cfc (struct fsl_ssi *ssi) +static bool fsl_ssi_is_i2s_bc_fp (struct fsl_ssi *ssi) {return (ssi->dai_fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) == -SND_SOC_DAIFMT_CBP_CFC ; +SND_SOC_DAIFMT_BC_FP ; }/**
@@ -847,7 +847,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,u8 i2s_net = ssi->i2s_net;/* Normal + Network mode to send 16-bit data in 32-bit frames */ -if (fsl_ssi_is_i2s_cbp_cfc (ssi) && sample_size ==16 ) +if (fsl_ssi_is_i2s_bc_fp (ssi) && sample_size ==16 ) i2s_net =SSI_SCR_I2S_MODE_NORMAL |SSI_SCR_NET ;/* Use Normal mode to send mono data at 1st slot of 2 slots */
@@ -920,17 +920,17 @@ static int _fsl_ssi_set_dai_fmt(struct fsl_ssi *ssi, unsigned int fmt)switch (fmt &SND_SOC_DAIFMT_FORMAT_MASK ) {case SND_SOC_DAIFMT_I2S :switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :if (IS_ERR (ssi->baudclk)) {dev_err (ssi->dev,"missing baudclk for master mode\n" );return -EINVAL ; } fallthrough; -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BC_FP : ssi->i2s_net |=SSI_SCR_I2S_MODE_MASTER ;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : ssi->i2s_net |=SSI_SCR_I2S_MODE_SLAVE ;break ;default :
@@ -992,15 +992,15 @@ static int _fsl_ssi_set_dai_fmt(struct fsl_ssi *ssi, unsigned int fmt)/* DAI clock provider masks */ switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :/* Output bit and frame sync clocks */ strcr |=SSI_STCR_TFDIR |SSI_STCR_TXDIR ; scr |=SSI_SCR_SYS_CLK_EN ;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :/* Input bit or frame sync clocks */ break ; -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BC_FP :/* Input bit clock but output frame sync clock */ strcr |=SSI_STCR_TFDIR ;break ;
@@ -1156,7 +1156,7 @@ static const struct snd_soc_dai_ops fsl_ssi_dai_ops = { .shutdown = fsl_ssi_shutdown, .hw_params = fsl_ssi_hw_params, .hw_free = fsl_ssi_hw_free, - .set_fmt = fsl_ssi_set_dai_fmt, + .set_fmt_new = fsl_ssi_set_dai_fmt, .set_tdm_slot = fsl_ssi_set_dai_tdm_slot, .trigger = fsl_ssi_trigger, };
sound/soc/fsl/imx-audmix.c +2 -2
@@ -81,7 +81,7 @@ static int imx_audmix_fe_hw_params(struct snd_pcm_substream *substream,int ret, dir;/* For playback the AUDMIX is consumer, and for record is provider */ - fmt |= tx ?SND_SOC_DAIFMT_CBC_CFC :SND_SOC_DAIFMT_CBP_CFP ; + fmt |= tx ?SND_SOC_DAIFMT_BP_FP :SND_SOC_DAIFMT_BC_FC ; dir = tx ?SND_SOC_CLOCK_OUT :SND_SOC_CLOCK_IN ;/* set DAI configuration */
@@ -122,7 +122,7 @@ static int imx_audmix_be_hw_params(struct snd_pcm_substream *substream,return 0 ;/* For playback the AUDMIX is consumer */ - fmt |=SND_SOC_DAIFMT_CBP_CFP ; + fmt |=SND_SOC_DAIFMT_BC_FC ;/* set AUDMIX DAI configuration */ ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ), fmt);
sound/soc/fsl/imx-card.c +1 -1
@@ -317,7 +317,7 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream, } } - ret =snd_soc_dai_set_fmt (cpu_dai, fmt); + ret =snd_soc_dai_set_fmt (cpu_dai,snd_soc_daifmt_clock_provider_flipped (fmt));if (ret && ret != -ENOTSUPP ) {dev_err (dev,"failed to set cpu dai fmt: %d\n" , ret);return ret;
Signature · 1 line
2.30.2
PATCH 9/56 ASoC: hisilicon: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/hisilicon/hi6210-i2s.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
sound/soc/hisilicon/hi6210-i2s.c +10 -10
@@ -227,9 +227,9 @@ static int hi6210_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)* We don't actually set the hardware until the hw_params * call, but we need to validate the user input here. */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BP_FP :break ;default :return -EINVAL ;
@@ -245,8 +245,8 @@ static int hi6210_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) } i2s->format = fmt; - i2s->master = (i2s->format &SND_SOC_DAIFMT_MASTER_MASK ) == -SND_SOC_DAIFMT_CBS_CFS ; + i2s->master = (i2s->format &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) == +SND_SOC_DAIFMT_BP_FP ;return 0 ; }
@@ -375,21 +375,21 @@ static int hi6210_i2s_hw_params(struct snd_pcm_substream *substream,hi6210_write_reg (i2s,HII2S_MUX_TOP_MODULE_CFG , val); -switch (i2s->format &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (i2s->format &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : i2s->master = false; val =hi6210_read_reg (i2s,HII2S_I2S_CFG ); val |=HII2S_I2S_CFG__S2_MST_SLV ;hi6210_write_reg (i2s,HII2S_I2S_CFG , val);break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : i2s->master = true; val =hi6210_read_reg (i2s,HII2S_I2S_CFG ); val &= ~HII2S_I2S_CFG__S2_MST_SLV ;hi6210_write_reg (i2s,HII2S_I2S_CFG , val);break ;default : -WARN_ONCE (1 ,"Invalid i2s->fmt MASTER_MASK. This shouldn't happen\n" ); +WARN_ONCE (1 ,"Invalid i2s->fmt CLOCK_PROVIDER_MASK. This shouldn't happen\n" );return -EINVAL ; }
@@ -513,7 +513,7 @@ static int hi6210_i2s_dai_probe(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops hi6210_i2s_dai_ops = { .trigger = hi6210_i2s_trigger, .hw_params = hi6210_i2s_hw_params, - .set_fmt = hi6210_i2s_set_fmt, + .set_fmt_new = hi6210_i2s_set_fmt, .startup = hi6210_i2s_startup, .shutdown = hi6210_i2s_shutdown, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 10/56 ASoC: img: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/img/img-i2s-in.c | 6 +++--- sound/soc/img/img-i2s-out.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
sound/soc/img/img-i2s-in.c +3 -3
@@ -333,8 +333,8 @@ static int img_i2s_in_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC :break ;default :return -EINVAL ;
@@ -373,7 +373,7 @@ static int img_i2s_in_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)static const struct snd_soc_dai_ops img_i2s_in_dai_ops = { .trigger = img_i2s_in_trigger, .hw_params = img_i2s_in_hw_params, - .set_fmt = img_i2s_in_set_fmt + .set_fmt_new = img_i2s_in_set_fmt };static int img_i2s_in_dai_probe (struct snd_soc_dai *dai)
sound/soc/img/img-i2s-out.c +4 -4
@@ -302,10 +302,10 @@ static int img_i2s_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)if (force_clk_active) control_set |=IMG_I2S_OUT_CTL_CLK_EN_MASK ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC :break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : control_set |=IMG_I2S_OUT_CTL_MASTER_MASK ;break ;default :
@@ -381,7 +381,7 @@ static int img_i2s_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)static const struct snd_soc_dai_ops img_i2s_out_dai_ops = { .trigger = img_i2s_out_trigger, .hw_params = img_i2s_out_hw_params, - .set_fmt = img_i2s_out_set_fmt + .set_fmt_new = img_i2s_out_set_fmt };static int img_i2s_out_dai_probe (struct snd_soc_dai *dai)
Signature · 1 line
2.30.2
PATCH 11/56 ASoC: Intel: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/intel/atom/sst-atom-controls.c | 4 ++-- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 2 +- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 2 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcht_nocodec.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 3 +-- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 +++--- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/keembay/kmb_platform.c | 6 +++--- 13 files changed, 18 insertions(+), 19 deletions(-)
sound/soc/intel/atom/sst-atom-controls.c +2 -2
@@ -831,9 +831,9 @@ static int sst_get_ssp_mode(struct snd_soc_dai *dai, unsigned int fmt)dev_dbg (dai->dev,"Enter:%s, format=%x\n" , __func__, format);switch (format) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :return SSP_MODE_PROVIDER ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :return SSP_MODE_CONSUMER ;default :dev_err (dai->dev,"Invalid ssp protocol: %d\n" , format);
sound/soc/intel/atom/sst-mfld-platform-pcm.c +1 -1
@@ -473,7 +473,7 @@ static const struct snd_soc_dai_ops sst_compr_dai_ops = {static const struct snd_soc_dai_ops sst_be_dai_ops = { .startup = sst_enable_ssp, .hw_params = sst_be_hw_params, - .set_fmt = sst_set_format, + .set_fmt_new = sst_set_format, .set_tdm_slot = sst_platform_set_ssp_slot, .shutdown = sst_disable_ssp, };
sound/soc/intel/boards/bytcht_cx2072x.c +1 -1
@@ -126,7 +126,7 @@ static int byt_cht_cx2072x_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);return ret;
sound/soc/intel/boards/bytcht_da7213.c +1 -1
@@ -81,7 +81,7 @@ static int codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);return ret;
sound/soc/intel/boards/bytcht_es8316.c +1 -1
@@ -265,7 +265,7 @@ static int byt_cht_es8316_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);
sound/soc/intel/boards/bytcht_nocodec.c +1 -1
@@ -61,7 +61,7 @@ static int codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);
sound/soc/intel/boards/bytcr_rt5640.c +1 -1
@@ -1411,7 +1411,7 @@ static int byt_rt5640_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);return ret;
sound/soc/intel/boards/bytcr_rt5651.c +1 -1
@@ -706,7 +706,7 @@ static int byt_rt5651_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {
sound/soc/intel/boards/bytcr_wm5102.c +1 -1
@@ -265,7 +265,7 @@ static int byt_wm5102_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BP_FP );if (ret) {dev_err (rtd->dev,"Error setting format to I2S: %d\n" , ret);return ret;
sound/soc/intel/boards/cht_bsw_max98090_ti.c +1 -2
@@ -264,8 +264,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,return ret; } - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF - |SND_SOC_DAIFMT_CBC_CFC ; + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_BP_FP ; ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ), fmt);if (ret <0 ) {
sound/soc/intel/boards/cht_bsw_rt5645.c +3 -3
@@ -362,7 +362,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);
@@ -372,7 +372,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_codec (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC +SND_SOC_DAIFMT_BC_FC );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);
@@ -396,7 +396,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_codec (rtd,0 ),SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_IB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BC_FC );if (ret <0 ) {dev_err (rtd->dev,"can't set format to TDM %d\n" , ret);return ret;
sound/soc/intel/boards/cht_bsw_rt5672.c +1 -1
@@ -300,7 +300,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, ret =snd_soc_dai_set_fmt (asoc_rtd_to_cpu (rtd,0 ),SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBC_CFC ); +SND_SOC_DAIFMT_BP_FP );if (ret <0 ) {dev_err (rtd->dev,"can't set format to I2S, err %d\n" , ret);return ret;
sound/soc/intel/keembay/kmb_platform.c +3 -3
@@ -497,11 +497,11 @@ static int kmb_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)int ret;switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : kmb_i2s->clock_provider = false; ret =0 ;break ; -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :writel (CLOCK_PROVIDER_MODE , kmb_i2s->pss_base +I2S_GEN_CFG_0 ); ret =clk_prepare_enable (kmb_i2s->clk_i2s);
@@ -736,7 +736,7 @@ static const struct snd_soc_dai_ops kmb_dai_ops = { .hw_params = kmb_dai_hw_params, .hw_free = kmb_dai_hw_free, .prepare = kmb_dai_prepare, - .set_fmt = kmb_set_dai_fmt, + .set_fmt_new = kmb_set_dai_fmt, };static struct snd_soc_dai_driver intel_kmb_hdmi_dai[] = {
Signature · 1 line
2.30.2
PATCH 12/56 ASoC: js4740-i2s: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/jz4740/jz4740-i2s.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/jz4740/jz4740-i2s.c +6 -6
@@ -206,18 +206,18 @@ static int jz4740_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) conf &= ~(JZ_AIC_CONF_BIT_CLK_MASTER |JZ_AIC_CONF_SYNC_CLK_MASTER ); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : conf |=JZ_AIC_CONF_BIT_CLK_MASTER |JZ_AIC_CONF_SYNC_CLK_MASTER ; format |=JZ_AIC_I2S_FMT_ENABLE_SYS_CLK ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : conf |=JZ_AIC_CONF_SYNC_CLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FC : conf |=JZ_AIC_CONF_BIT_CLK_MASTER ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :break ;default :return -EINVAL ;
@@ -433,7 +433,7 @@ static const struct snd_soc_dai_ops jz4740_i2s_dai_ops = { .shutdown = jz4740_i2s_shutdown, .trigger = jz4740_i2s_trigger, .hw_params = jz4740_i2s_hw_params, - .set_fmt = jz4740_i2s_set_fmt, + .set_fmt_new = jz4740_i2s_set_fmt, .set_sysclk = jz4740_i2s_set_sysclk, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 13/56 ASoC: mediatek: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 10 +++++----- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-)
sound/soc/mediatek/mt8195/mt8195-dai-etdm.c +5 -5
@@ -2172,11 +2172,11 @@ static int mtk_dai_etdm_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : etdm_data->slave_mode = true;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : etdm_data->slave_mode = false;break ;default :
@@ -2346,7 +2346,7 @@ static const struct snd_soc_dai_ops mtk_dai_etdm_ops = { .hw_params = mtk_dai_etdm_hw_params, .trigger = mtk_dai_etdm_trigger, .set_sysclk = mtk_dai_etdm_set_sysclk, - .set_fmt = mtk_dai_etdm_set_fmt, + .set_fmt_new = mtk_dai_etdm_set_fmt, .set_tdm_slot = mtk_dai_etdm_set_tdm_slot, };
@@ -2356,7 +2356,7 @@ static const struct snd_soc_dai_ops mtk_dai_hdmitx_dptx_ops = { .hw_params = mtk_dai_hdmitx_dptx_hw_params, .trigger = mtk_dai_hdmitx_dptx_trigger, .set_sysclk = mtk_dai_hdmitx_dptx_set_sysclk, - .set_fmt = mtk_dai_etdm_set_fmt, + .set_fmt_new = mtk_dai_etdm_set_fmt, };/* dai driver */
sound/soc/mediatek/mt8195/mt8195-dai-pcm.c +4 -4
@@ -266,11 +266,11 @@ static int mtk_dai_pcm_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : pcmif_priv->slave_mode =1 ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : pcmif_priv->slave_mode =0 ;break ;default :
@@ -282,7 +282,7 @@ static int mtk_dai_pcm_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)static const struct snd_soc_dai_ops mtk_dai_pcm_ops = { .prepare = mtk_dai_pcm_prepare, - .set_fmt = mtk_dai_pcm_set_fmt, + .set_fmt_new = mtk_dai_pcm_set_fmt, };/* dai driver */
Signature · 1 line
2.30.2
PATCH 14/56 ASoC: meson: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/meson/aiu-encoder-i2s.c | 4 ++-- sound/soc/meson/axg-tdm-interface.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-)
sound/soc/meson/aiu-encoder-i2s.c +2 -2
@@ -229,7 +229,7 @@ static int aiu_encoder_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)unsigned int skew;/* Only CPU Master / Codec Slave supported ATM */ -if ((fmt &SND_SOC_DAIFMT_MASTER_MASK ) !=SND_SOC_DAIFMT_CBS_CFS ) +if ((fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) !=SND_SOC_DAIFMT_BP_FP )return -EINVAL ; if (inv == SND_SOC_DAIFMT_NB_IF ||
@@ -323,7 +323,7 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream,const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = { .hw_params = aiu_encoder_i2s_hw_params, .hw_free = aiu_encoder_i2s_hw_free, - .set_fmt = aiu_encoder_i2s_set_fmt, + .set_fmt_new = aiu_encoder_i2s_set_fmt, .set_sysclk = aiu_encoder_i2s_set_sysclk, .startup = aiu_encoder_i2s_startup, .shutdown = aiu_encoder_i2s_shutdown,
sound/soc/meson/axg-tdm-interface.c +8 -8
@@ -119,19 +119,19 @@ static int axg_tdm_iface_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) {struct axg_tdm_iface *iface =snd_soc_dai_get_drvdata (dai); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :if (!iface->mclk) {dev_err (dai->dev,"cpu clock master: mclk missing\n" );return -ENODEV ; }break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :break ; -case SND_SOC_DAIFMT_CBS_CFM : -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BP_FC : +case SND_SOC_DAIFMT_BC_FP :dev_err (dai->dev,"only CBS_CFS and CBM_CFM are supported\n" ); fallthrough;default :
@@ -326,8 +326,8 @@ static int axg_tdm_iface_hw_params(struct snd_pcm_substream *substream,if (ret)return ret; -if ((iface->fmt &SND_SOC_DAIFMT_MASTER_MASK ) == -SND_SOC_DAIFMT_CBS_CFS ) { +if ((iface->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) == +SND_SOC_DAIFMT_BP_FP ) { ret =axg_tdm_iface_set_sclk (dai, params);if (ret)return ret;
@@ -394,7 +394,7 @@ static int axg_tdm_iface_probe_dai(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops axg_tdm_iface_ops = { .set_sysclk = axg_tdm_iface_set_sysclk, - .set_fmt = axg_tdm_iface_set_fmt, + .set_fmt_new = axg_tdm_iface_set_fmt, .startup = axg_tdm_iface_startup, .hw_params = axg_tdm_iface_hw_params, .prepare = axg_tdm_iface_prepare,
Signature · 1 line
2.30.2
PATCH 15/56 ASoC: mxs-saif: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/mxs/mxs-saif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/mxs/mxs-saif.c +3 -3
@@ -358,8 +358,8 @@ static int mxs_saif_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)* Saif internally could be slave when working on EXTMASTER mode. * We just hide this to machine driver. */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :if (saif->id == saif->master_id) scr &= ~BM_SAIF_CTRL_SLAVE_MODE ;else
@@ -642,7 +642,7 @@ static const struct snd_soc_dai_ops mxs_saif_dai_ops = { .prepare = mxs_saif_prepare, .hw_params = mxs_saif_hw_params, .set_sysclk = mxs_saif_set_dai_sysclk, - .set_fmt = mxs_saif_set_dai_fmt, + .set_fmt_new = mxs_saif_set_dai_fmt, };static struct snd_soc_dai_driver mxs_saif_dai = {
Signature · 1 line
2.30.2
PATCH 16/56 ASoC: pxa: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/pxa/magician.c | 8 ++++---- sound/soc/pxa/mmp-sspa.c | 8 ++++---- sound/soc/pxa/pxa-ssp.c | 24 ++++++++++++------------ sound/soc/pxa/pxa2xx-i2s.c | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-)
sound/soc/pxa/magician.c +4 -4
@@ -90,13 +90,13 @@ static int magician_playback_hw_params(struct snd_pcm_substream *substream,/* set codec DAI configuration */ ret =snd_soc_dai_set_fmt (codec_dai,SND_SOC_DAIFMT_MSB | -SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBS_CFS ); +SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_BC_FC );if (ret <0 )return ret;/* set cpu DAI configuration */ ret =snd_soc_dai_set_fmt (cpu_dai,SND_SOC_DAIFMT_DSP_A | -SND_SOC_DAIFMT_NB_IF |SND_SOC_DAIFMT_CBS_CFS ); +SND_SOC_DAIFMT_NB_IF |SND_SOC_DAIFMT_BP_FP );if (ret <0 )return ret;
@@ -128,14 +128,14 @@ static int magician_capture_hw_params(struct snd_pcm_substream *substream,/* set codec DAI configuration */ ret =snd_soc_dai_set_fmt (codec_dai,SND_SOC_DAIFMT_MSB |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBS_CFS ); +SND_SOC_DAIFMT_BC_FC );if (ret <0 )return ret;/* set cpu DAI configuration */ ret =snd_soc_dai_set_fmt (cpu_dai,SND_SOC_DAIFMT_MSB |SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBS_CFS ); +SND_SOC_DAIFMT_BP_FP );if (ret <0 )return ret;
sound/soc/pxa/mmp-sspa.c +4 -4
@@ -171,11 +171,11 @@ static int mmp_sspa_set_dai_fmt(struct snd_soc_dai *cpu_dai, sspa->sp =SSPA_SP_WEN |SSPA_SP_S_RST |SSPA_SP_FFLUSH ; sspa->ctrl =0 ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : sspa->sp |=SSPA_SP_MSL ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :break ;default :return -EINVAL ;
@@ -346,7 +346,7 @@ static const struct snd_soc_dai_ops mmp_sspa_dai_ops = { .hw_params = mmp_sspa_hw_params, .set_sysclk = mmp_sspa_set_dai_sysclk, .set_pll = mmp_sspa_set_dai_pll, - .set_fmt = mmp_sspa_set_dai_fmt, + .set_fmt_new = mmp_sspa_set_dai_fmt, };static struct snd_soc_dai_driver mmp_sspa_dai = {
sound/soc/pxa/pxa-ssp.c +12 -12
@@ -372,10 +372,10 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, {struct ssp_priv *priv =snd_soc_dai_get_drvdata (cpu_dai); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBM_CFS : -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BC_FP : +case SND_SOC_DAIFMT_BP_FP :break ;default :return -EINVAL ;
@@ -432,14 +432,14 @@ static int pxa_ssp_configure_dai_fmt(struct ssp_priv *priv) sscr1 |=SSCR1_RxTresh (8 ) |SSCR1_TxTresh (7 ); -switch (priv->dai_fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (priv->dai_fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : sscr1 |=SSCR1_SCLKDIR |SSCR1_SFRMDIR |SSCR1_SCFR ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : sscr1 |=SSCR1_SCLKDIR |SSCR1_SCFR ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP :break ;default :return -EINVAL ;
@@ -484,9 +484,9 @@ static int pxa_ssp_configure_dai_fmt(struct ssp_priv *priv)pxa_ssp_write_reg (ssp,SSCR1 , sscr1);pxa_ssp_write_reg (ssp,SSPSP , sspsp); -switch (priv->dai_fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBM_CFS : +switch (priv->dai_fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BC_FP : scfr =pxa_ssp_read_reg (ssp,SSCR1 ) |SSCR1_SCFR ;pxa_ssp_write_reg (ssp,SSCR1 , scfr);
@@ -824,7 +824,7 @@ static const struct snd_soc_dai_ops pxa_ssp_dai_ops = { .trigger = pxa_ssp_trigger, .hw_params = pxa_ssp_hw_params, .set_sysclk = pxa_ssp_set_dai_sysclk, - .set_fmt = pxa_ssp_set_dai_fmt, + .set_fmt_new = pxa_ssp_set_dai_fmt, .set_tdm_slot = pxa_ssp_set_dai_tdm_slot, .set_tristate = pxa_ssp_set_dai_tristate, };
sound/soc/pxa/pxa2xx-i2s.c +4 -4
@@ -131,11 +131,11 @@ static int pxa2xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,break ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : pxa_i2s.master =1 ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : pxa_i2s.master =0 ;break ;default :
@@ -335,7 +335,7 @@ static const struct snd_soc_dai_ops pxa_i2s_dai_ops = { .shutdown = pxa2xx_i2s_shutdown, .trigger = pxa2xx_i2s_trigger, .hw_params = pxa2xx_i2s_hw_params, - .set_fmt = pxa2xx_i2s_set_dai_fmt, + .set_fmt_new = pxa2xx_i2s_set_dai_fmt, .set_sysclk = pxa2xx_i2s_set_dai_sysclk, };
Signature · 1 line
2.30.2
PATCH 17/56 ASoC: qcom: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/qdsp6/audioreach.c | 4 ++-- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6afe.c | 6 +++--- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +- sound/soc/qcom/sc7180.c | 2 +- sound/soc/qcom/sdm845.c | 6 +++--- sound/soc/qcom/sm8250.c | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-)
sound/soc/qcom/apq8016_sbc.c +1 -1
@@ -172,7 +172,7 @@ static int msm8916_qdsp6_dai_init(struct snd_soc_pcm_runtime *rtd) {struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtd,0 ); -snd_soc_dai_set_fmt (cpu_dai,SND_SOC_DAIFMT_CBS_CFS ); +snd_soc_dai_set_fmt (cpu_dai,SND_SOC_DAIFMT_BP_FP );return apq8016_dai_init (rtd,qdsp6_dai_get_lpass_id (cpu_dai)); }
sound/soc/qcom/qdsp6/audioreach.c +2 -2
@@ -732,10 +732,10 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph, intf_cfg->cfg.sd_line_idx = module->sd_line_idx;switch (cfg->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : intf_cfg->cfg.ws_src =CONFIG_I2S_WS_SRC_INTERNAL ;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC :/* CPU is slave */ intf_cfg->cfg.ws_src =CONFIG_I2S_WS_SRC_EXTERNAL ;break ;
sound/soc/qcom/qdsp6/q6afe-dai.c +1 -1
@@ -648,7 +648,7 @@ static const struct snd_soc_dai_ops q6hdmi_ops = {static const struct snd_soc_dai_ops q6i2s_ops = { .prepare = q6afe_dai_prepare, .hw_params = q6i2s_hw_params, - .set_fmt = q6i2s_set_fmt, + .set_fmt_new = q6i2s_set_fmt, .shutdown = q6afe_dai_shutdown, .set_sysclk = q6afe_mi2s_set_sysclk, };
sound/soc/qcom/qdsp6/q6afe.c +3 -3
@@ -1328,11 +1328,11 @@ int q6afe_i2s_port_prepare(struct q6afe_port *port, struct q6afe_i2s_cfg *cfg) pcfg->i2s_cfg.bit_width = cfg->bit_width; pcfg->i2s_cfg.data_format =AFE_LINEAR_PCM_DATA ; -switch (cfg->fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (cfg->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : pcfg->i2s_cfg.ws_src =AFE_PORT_CONFIG_I2S_WS_SRC_INTERNAL ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* CPU is slave */ pcfg->i2s_cfg.ws_src =AFE_PORT_CONFIG_I2S_WS_SRC_EXTERNAL ;break ;
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +1 -1
@@ -207,7 +207,7 @@ static const struct snd_soc_dai_ops q6i2s_ops = { .shutdown = q6apm_lpass_dai_shutdown, .set_channel_map = q6dma_set_channel_map, .hw_params = q6dma_hw_params, - .set_fmt = q6i2s_set_fmt, + .set_fmt_new = q6i2s_set_fmt, };static const struct snd_soc_component_driver q6apm_lpass_dai_component = {
sound/soc/qcom/sc7180.c +1 -1
@@ -155,7 +155,7 @@ static int sc7180_snd_startup(struct snd_pcm_substream *substream) }snd_soc_dai_set_fmt (codec_dai, -SND_SOC_DAIFMT_CBS_CFS | +SND_SOC_DAIFMT_BC_FC |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_I2S );
sound/soc/qcom/sdm845.c +3 -3
@@ -316,8 +316,8 @@ static int sdm845_dai_init(struct snd_soc_pcm_runtime *rtd)static int sdm845_snd_startup (struct snd_pcm_substream *substream) { -unsigned int fmt =SND_SOC_DAIFMT_CBS_CFS ; -unsigned int codec_dai_fmt =SND_SOC_DAIFMT_CBS_CFS ; +unsigned int fmt =SND_SOC_DAIFMT_BP_FP ; +unsigned int codec_dai_fmt =SND_SOC_DAIFMT_BC_FC ;struct snd_soc_pcm_runtime *rtd =asoc_substream_to_rtd (substream);struct snd_soc_card *card = rtd->card;struct sdm845_snd_data *data =snd_soc_card_get_drvdata (card);
@@ -356,7 +356,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)snd_soc_dai_set_sysclk (cpu_dai,Q6AFE_LPASS_CLK_ID_QUAD_MI2S_IBIT ,MI2S_BCLK_RATE ,SNDRV_PCM_STREAM_PLAYBACK ); -snd_soc_dai_set_fmt (cpu_dai,SND_SOC_DAIFMT_CBS_CFS ); +snd_soc_dai_set_fmt (cpu_dai, fmt);break ;
sound/soc/qcom/sm8250.c +2 -2
@@ -96,8 +96,8 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,static int sm8250_snd_startup (struct snd_pcm_substream *substream) { -unsigned int fmt =SND_SOC_DAIFMT_CBS_CFS ; -unsigned int codec_dai_fmt =SND_SOC_DAIFMT_CBS_CFS ; +unsigned int fmt =SND_SOC_DAIFMT_BP_FP ; +unsigned int codec_dai_fmt =SND_SOC_DAIFMT_BC_FC ;struct snd_soc_pcm_runtime *rtd = substream->private_data;struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtd,0 );struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtd,0 );
Signature · 1 line
2.30.2
PATCH 18/56 ASoC: rockchip: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/rockchip/rockchip_i2s.c | 8 ++++---- sound/soc/rockchip/rockchip_i2s_tdm.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)
sound/soc/rockchip/rockchip_i2s.c +4 -4
@@ -199,13 +199,13 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,pm_runtime_get_sync (cpu_dai->dev); mask =I2S_CKR_MSS_MASK ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* Set source clock in Master mode */ val =I2S_CKR_MSS_MASTER ; i2s->is_master_mode = true;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC : val =I2S_CKR_MSS_SLAVE ; i2s->is_master_mode = false;break ;
@@ -486,7 +486,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_dai_ops = { .hw_params = rockchip_i2s_hw_params, .set_bclk_ratio = rockchip_i2s_set_bclk_ratio, .set_sysclk = rockchip_i2s_set_sysclk, - .set_fmt = rockchip_i2s_set_fmt, + .set_fmt_new = rockchip_i2s_set_fmt, .trigger = rockchip_i2s_trigger, };
sound/soc/rockchip/rockchip_i2s_tdm.c +4 -4
@@ -411,12 +411,12 @@ static int rockchip_i2s_tdm_set_fmt(struct snd_soc_dai *cpu_dai, } mask =I2S_CKR_MSS_MASK ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : val =I2S_CKR_MSS_MASTER ; i2s_tdm->is_master_mode = true;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : val =I2S_CKR_MSS_SLAVE ; i2s_tdm->is_master_mode = false;break ;
@@ -1113,7 +1113,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_tdm_dai_ops = { .hw_params = rockchip_i2s_tdm_hw_params, .set_bclk_ratio = rockchip_i2s_tdm_set_bclk_ratio, .set_sysclk = rockchip_i2s_tdm_set_sysclk, - .set_fmt = rockchip_i2s_tdm_set_fmt, + .set_fmt_new = rockchip_i2s_tdm_set_fmt, .set_tdm_slot = rockchip_dai_tdm_slot, .trigger = rockchip_i2s_tdm_trigger, };
Signature · 1 line
2.30.2
Re: [PATCH 18/56] ASoC: rockchip: Update to use set_fmt_new callback
Quoted 62 lines · On Donnerstag, 19. Mai 2022 17:42:40 CEST Charles Keepax wrote:
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
Signed-off-by Charles Keepax <[email protected]>--- sound/soc/rockchip/rockchip_i2s.c | 8 ++++---- sound/soc/rockchip/rockchip_i2s_tdm.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)sound/soc/rockchip/rockchip_i2s.c +4
-4@@ -199,13 +199,13 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,pm_runtime_get_sync (cpu_dai->dev); mask =I2S_CKR_MSS_MASK ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* Set source clock in Master mode */ val =I2S_CKR_MSS_MASTER ; i2s->is_master_mode = true;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC : val =I2S_CKR_MSS_SLAVE ; i2s->is_master_mode = false;break ;@@ -486,7 +486,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_dai_ops = { .hw_params = rockchip_i2s_hw_params, .set_bclk_ratio = rockchip_i2s_set_bclk_ratio, .set_sysclk = rockchip_i2s_set_sysclk, - .set_fmt = rockchip_i2s_set_fmt, + .set_fmt_new = rockchip_i2s_set_fmt, .trigger = rockchip_i2s_trigger, };sound/soc/rockchip/rockchip_i2s_tdm.c +3
-3@@ -411,12 +411,12 @@ static int rockchip_i2s_tdm_set_fmt(struct snd_soc_dai *cpu_dai, } mask =I2S_CKR_MSS_MASK ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : val =I2S_CKR_MSS_MASTER ; i2s_tdm->is_master_mode = true;break ; -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : val =I2S_CKR_MSS_SLAVE ; i2s_tdm->is_master_mode = false;break ;
sound/soc/rockchip/rockchip_i2s_tdm.c static const struct snd_soc_dai_ops rockchip_i2s_tdm_dai_ops = { · line 1119
Quoted 8 lines
sound/soc/rockchip/rockchip_i2s_tdm.c +1
-1@@ -1113,7 +1113,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_tdm_dai_ops = { .hw_params = rockchip_i2s_tdm_hw_params, .set_bclk_ratio = rockchip_i2s_tdm_set_bclk_ratio, .set_sysclk = rockchip_i2s_tdm_set_sysclk, - .set_fmt = rockchip_i2s_tdm_set_fmt, + .set_fmt_new = rockchip_i2s_tdm_set_fmt, .set_tdm_slot = rockchip_dai_tdm_slot, .trigger = rockchip_i2s_tdm_trigger, };
Please run ./scripts/get_maintainer.pl against the individual patches so that I'm included in the recipients of the e-mail as well.
Anyway, for the i2s-tdm parts:
Tested on a RK3566 connected to an RK817 codec.
Regards,
Nicolas Frattaroli
PATCH 19/56 ASoC: samsung: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/samsung/i2s.c | 8 ++++---- sound/soc/samsung/pcm.c | 6 +++--- sound/soc/samsung/s3c-i2s-v2.c | 8 ++++---- sound/soc/samsung/s3c24xx-i2s.c | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-)
sound/soc/samsung/i2s.c +4 -4
@@ -671,11 +671,11 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : tmp |= mod_slave;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP :/* * Set default source clock in Master mode, only when the * CLK_I2S_RCLK_SRC clock is not exposed so we ensure any
@@ -1107,7 +1107,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops samsung_i2s_dai_ops = { .trigger = i2s_trigger, .hw_params = i2s_hw_params, - .set_fmt = i2s_set_fmt, + .set_fmt_new = i2s_set_fmt, .set_clkdiv = i2s_set_clkdiv, .set_sysclk = i2s_set_sysclk, .startup = i2s_startup,
sound/soc/samsung/pcm.c +3 -3
@@ -340,8 +340,8 @@ static int s3c_pcm_set_fmt(struct snd_soc_dai *cpu_dai, goto exit; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* Nothing to do, Master by default */ break ;default :
@@ -437,7 +437,7 @@ static const struct snd_soc_dai_ops s3c_pcm_dai_ops = { .set_clkdiv = s3c_pcm_set_clkdiv, .trigger = s3c_pcm_trigger, .hw_params = s3c_pcm_hw_params, - .set_fmt = s3c_pcm_set_fmt, + .set_fmt_new = s3c_pcm_set_fmt, };static int s3c_pcm_dai_probe (struct snd_soc_dai *dai)
sound/soc/samsung/s3c-i2s-v2.c +4 -4
@@ -252,12 +252,12 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai, iismod =readl (i2s->regs +S3C2412_IISMOD );pr_debug ("hw_params r: IISMOD: %x \n" , iismod); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : i2s->master =0 ; iismod |=S3C2412_IISMOD_SLAVE ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : i2s->master =1 ; iismod &= ~S3C2412_IISMOD_SLAVE ;break ;
@@ -666,7 +666,7 @@ int s3c_i2sv2_register_component(struct device *dev, int id, ops->trigger = s3c2412_i2s_trigger;if (!ops->hw_params) ops->hw_params = s3c_i2sv2_hw_params; - ops->set_fmt = s3c2412_i2s_set_fmt; + ops->set_fmt_new = s3c2412_i2s_set_fmt; ops->set_clkdiv = s3c2412_i2s_set_clkdiv; ops->set_sysclk = s3c_i2sv2_set_sysclk;
sound/soc/samsung/s3c24xx-i2s.c +4 -4
@@ -169,11 +169,11 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, iismod =readl (s3c24xx_i2s.regs +S3C2410_IISMOD );pr_debug ("hw_params r: IISMOD: %x \n" , iismod); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_CFC : iismod |=S3C2410_IISMOD_SLAVE ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : iismod &= ~S3C2410_IISMOD_SLAVE ;break ;default :
@@ -394,7 +394,7 @@ static int s3c24xx_i2s_resume(struct snd_soc_component *component)static const struct snd_soc_dai_ops s3c24xx_i2s_dai_ops = { .trigger = s3c24xx_i2s_trigger, .hw_params = s3c24xx_i2s_hw_params, - .set_fmt = s3c24xx_i2s_set_fmt, + .set_fmt_new = s3c24xx_i2s_set_fmt, .set_clkdiv = s3c24xx_i2s_set_clkdiv, .set_sysclk = s3c24xx_i2s_set_sysclk, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 20/56 ASoC: sh: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/sh/fsi.c | 8 ++++---- sound/soc/sh/rcar/core.c | 6 +++--- sound/soc/sh/rz-ssi.c | 4 ++-- sound/soc/sh/ssi.c | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-)
sound/soc/sh/fsi.c +4 -4
@@ -1646,10 +1646,10 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)int ret;/* set clock master audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC :break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : fsi->clk_master =1 ;/* cpu is master */ break ;default :
@@ -1724,7 +1724,7 @@ static const struct snd_soc_dai_ops fsi_dai_ops = { .startup = fsi_dai_startup, .shutdown = fsi_dai_shutdown, .trigger = fsi_dai_trigger, - .set_fmt = fsi_dai_set_fmt, + .set_fmt_new = fsi_dai_set_fmt, .hw_params = fsi_dai_hw_params, .auto_selectable_formats = &fsi_dai_formats, .num_auto_selectable_formats = 1,
sound/soc/sh/rcar/core.c +3 -3
@@ -756,10 +756,10 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)/* set clock master for audio interface */ switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BC_FC : rdai->clk_master =0 ;break ; -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP : rdai->clk_master =1 ;/* cpu is master */ break ;default :
@@ -1068,7 +1068,7 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { .startup = rsnd_soc_dai_startup, .shutdown = rsnd_soc_dai_shutdown, .trigger = rsnd_soc_dai_trigger, - .set_fmt = rsnd_soc_dai_set_fmt, + .set_fmt_new = rsnd_soc_dai_set_fmt, .set_tdm_slot = rsnd_soc_set_dai_tdm_slot, .prepare = rsnd_soc_dai_prepare, .auto_selectable_formats = rsnd_soc_dai_formats,
sound/soc/sh/rz-ssi.c +2 -2
@@ -767,7 +767,7 @@ static int rz_ssi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)struct rz_ssi_priv *ssi =snd_soc_dai_get_drvdata (dai);switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BP_FP :break ;default :dev_err (ssi->dev,"Codec should be clk and frame consumer\n" );
@@ -840,7 +840,7 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,static const struct snd_soc_dai_ops rz_ssi_dai_ops = { .trigger = rz_ssi_dai_trigger, - .set_fmt = rz_ssi_dai_set_fmt, + .set_fmt_new = rz_ssi_dai_set_fmt, .hw_params = rz_ssi_dai_hw_params, };
sound/soc/sh/ssi.c +6 -6
@@ -291,16 +291,16 @@ static int ssi_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC :break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FC : ssicr |=CR_SCK_MASTER ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : ssicr |=CR_SWS_MASTER ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : ssicr |=CR_SWS_MASTER |CR_SCK_MASTER ;break ;default :
@@ -336,7 +336,7 @@ static const struct snd_soc_dai_ops ssi_dai_ops = { .hw_params = ssi_hw_params, .set_sysclk = ssi_set_sysclk, .set_clkdiv = ssi_set_clkdiv, - .set_fmt = ssi_set_fmt, + .set_fmt_new = ssi_set_fmt, };static struct snd_soc_dai_driver sh4_ssi_dai[] = {
Signature · 1 line
2.30.2
Re: [PATCH 20/56] ASoC: sh: Update to use set_fmt_new callback
Hi
Quoted 5 lines
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
Signed-off-by Charles Keepax <[email protected]>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
PATCH 21/56 ASoC: stm: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/stm/stm32_i2s.c | 10 +++++----- sound/soc/stm/stm32_sai_sub.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-)
sound/soc/stm/stm32_i2s.c +5 -5
@@ -593,16 +593,16 @@ static int stm32_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) }/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC : i2s->ms_flg =I2S_MS_SLAVE ;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : i2s->ms_flg =I2S_MS_MASTER ;break ;default :dev_err (cpu_dai->dev,"Unsupported mode %#x\n" , - fmt &SND_SOC_DAIFMT_MASTER_MASK ); + fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK );return -EINVAL ; }
@@ -954,7 +954,7 @@ static const struct regmap_config stm32_h7_i2s_regmap_conf = {static const struct snd_soc_dai_ops stm32_i2s_pcm_dai_ops = { .set_sysclk = stm32_i2s_set_sysclk, - .set_fmt = stm32_i2s_set_dai_fmt, + .set_fmt_new = stm32_i2s_set_dai_fmt, .startup = stm32_i2s_startup, .hw_params = stm32_i2s_hw_params, .trigger = stm32_i2s_trigger,
sound/soc/stm/stm32_sai_sub.c +5 -5
@@ -719,18 +719,18 @@ static int stm32_sai_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)stm32_sai_sub_reg_up (sai,STM_SAI_FRCR_REGX , frcr_mask, frcr);/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC :/* codec is master */ cr1 |=SAI_XCR1_SLAVE ; sai->master = false;break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : sai->master = true;break ;default :dev_err (cpu_dai->dev,"Unsupported mode %#x\n" , - fmt &SND_SOC_DAIFMT_MASTER_MASK ); + fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK );return -EINVAL ; }
@@ -1225,7 +1225,7 @@ static int stm32_sai_dai_probe(struct snd_soc_dai *cpu_dai)static const struct snd_soc_dai_ops stm32_sai_pcm_dai_ops = { .set_sysclk = stm32_sai_set_sysclk, - .set_fmt = stm32_sai_set_dai_fmt, + .set_fmt_new = stm32_sai_set_dai_fmt, .set_tdm_slot = stm32_sai_set_dai_tdm_slot, .startup = stm32_sai_startup, .hw_params = stm32_sai_hw_params,
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 22/56 ASoC: sunxi: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/sunxi/sun4i-i2s.c | 20 ++++++++++---------- sound/soc/sunxi/sun8i-codec.c | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-)
sound/soc/sunxi/sun4i-i2s.c +10 -10
@@ -702,13 +702,13 @@ static int sun4i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN4I_I2S_FMT0_FMT_MASK, val);/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* BCLK and LRCLK master */ val =SUN4I_I2S_CTRL_MODE_MASTER ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* BCLK and LRCLK slave */ val =SUN4I_I2S_CTRL_MODE_SLAVE ;break ;
@@ -802,13 +802,13 @@ static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN8I_I2S_TX_CHAN_OFFSET(offset));/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* BCLK and LRCLK master */ val =SUN8I_I2S_CTRL_BCLK_OUT |SUN8I_I2S_CTRL_LRCK_OUT ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* BCLK and LRCLK slave */ val =0 ;break ;
@@ -909,13 +909,13 @@ static int sun50i_h6_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset));/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* BCLK and LRCLK master */ val =SUN8I_I2S_CTRL_BCLK_OUT |SUN8I_I2S_CTRL_LRCK_OUT ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* BCLK and LRCLK slave */ val =0 ;break ;
@@ -1081,7 +1081,7 @@ static int sun4i_i2s_set_tdm_slot(struct snd_soc_dai *dai,static const struct snd_soc_dai_ops sun4i_i2s_dai_ops = { .hw_params = sun4i_i2s_hw_params, - .set_fmt = sun4i_i2s_set_fmt, + .set_fmt_new = sun4i_i2s_set_fmt, .set_sysclk = sun4i_i2s_set_sysclk, .set_tdm_slot = sun4i_i2s_set_tdm_slot, .trigger = sun4i_i2s_trigger,
sound/soc/sunxi/sun8i-codec.c +4 -4
@@ -286,11 +286,11 @@ static int sun8i_codec_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)u32 dsp_format, format, invert, value;/* clock masters */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS :/* Codec slave, DAI master */ +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* Codec slave, DAI master */ value =0x1 ;break ; -case SND_SOC_DAIFMT_CBM_CFM :/* Codec Master, DAI slave */ +case SND_SOC_DAIFMT_BC_FC :/* Codec Master, DAI slave */ value =0x0 ;break ;default :
@@ -630,7 +630,7 @@ static int sun8i_codec_hw_free(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops sun8i_codec_dai_ops = { - .set_fmt = sun8i_codec_set_fmt, + .set_fmt_new = sun8i_codec_set_fmt, .set_tdm_slot = sun8i_codec_set_tdm_slot, .startup = sun8i_codec_startup, .hw_params = sun8i_codec_hw_params,
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Samuel Holland
maintainerRe: [PATCH 22/56] ASoC: sunxi: Update to use set_fmt_new callback
Quoted 79 lines · Charles Keepax
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
Signed-off-by Charles Keepax <[email protected]>--- sound/soc/sunxi/sun4i-i2s.c | 20 ++++++++++---------- sound/soc/sunxi/sun8i-codec.c | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-)sound/soc/sunxi/sun4i-i2s.c +10
-10@@ -702,13 +702,13 @@ static int sun4i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN4I_I2S_FMT0_FMT_MASK, val);/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* BCLK and LRCLK master */ val =SUN4I_I2S_CTRL_MODE_MASTER ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* BCLK and LRCLK slave */ val =SUN4I_I2S_CTRL_MODE_SLAVE ;break ;@@ -802,13 +802,13 @@ static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN8I_I2S_TX_CHAN_OFFSET(offset));/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* BCLK and LRCLK master */ val =SUN8I_I2S_CTRL_BCLK_OUT |SUN8I_I2S_CTRL_LRCK_OUT ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* BCLK and LRCLK slave */ val =0 ;break ;@@ -909,13 +909,13 @@ static int sun50i_h6_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset));/* DAI clock master masks */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* BCLK and LRCLK master */ val =SUN8I_I2S_CTRL_BCLK_OUT |SUN8I_I2S_CTRL_LRCK_OUT ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* BCLK and LRCLK slave */ val =0 ;break ;@@ -1081,7 +1081,7 @@ static int sun4i_i2s_set_tdm_slot(struct snd_soc_dai *dai,static const struct snd_soc_dai_ops sun4i_i2s_dai_ops = { .hw_params = sun4i_i2s_hw_params, - .set_fmt = sun4i_i2s_set_fmt, + .set_fmt_new = sun4i_i2s_set_fmt, .set_sysclk = sun4i_i2s_set_sysclk, .set_tdm_slot = sun4i_i2s_set_tdm_slot, .trigger = sun4i_i2s_trigger,sound/soc/sunxi/sun8i-codec.c +0
-0
sound/soc/sunxi/sun8i-codec.c static int sun8i_codec_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) · line 290
Quoted 7 lines
sound/soc/sunxi/sun8i-codec.c +2
-2@@ -286,11 +286,11 @@ static int sun8i_codec_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)u32 dsp_format, format, invert, value;/* clock masters */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS :/* Codec slave, DAI master */ +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* Codec slave, DAI master */
This is a codec driver, and it is only ever used on the codec end of a link, so I would not expect it to be changed.
Regards,
Samuel
Quoted 17 lines
sound/soc/sunxi/sun8i-codec.c +2
-2value =0x1 ;break ; -case SND_SOC_DAIFMT_CBM_CFM :/* Codec Master, DAI slave */ +case SND_SOC_DAIFMT_BC_FC :/* Codec Master, DAI slave */ value =0x0 ;break ;default :@@ -630,7 +630,7 @@ static int sun8i_codec_hw_free(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops sun8i_codec_dai_ops = { - .set_fmt = sun8i_codec_set_fmt, + .set_fmt_new = sun8i_codec_set_fmt, .set_tdm_slot = sun8i_codec_set_tdm_slot, .startup = sun8i_codec_startup, .hw_params = sun8i_codec_hw_params,
Re: [PATCH 22/56] ASoC: sunxi: Update to use set_fmt_new callback
Quoted 17 lines · Samuel Holland
Quoted 16 lines · Charles Keepax
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
Signed-off-by Charles Keepax <[email protected]>--- sound/soc/sunxi/sun4i-i2s.c | 20 ++++++++++---------- sound/soc/sunxi/sun8i-codec.c | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-)sound/soc/sunxi/sun8i-codec.c +0
-0@@ -286,11 +286,11 @@ static int sun8i_codec_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)u32 dsp_format, format, invert, value;
Quoted 9 lines
sound/soc/sunxi/sun8i-codec.c static int sun8i_codec_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) · line 290
Quoted 5 lines
sound/soc/sunxi/sun8i-codec.c +2
-2/* clock masters */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS :/* Codec slave, DAI master */ +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* Codec slave, DAI master */ This is a codec driver, and it is only ever used on the codec end of a link, so I would not expect it to be changed.
Thanks for spotting that, silly mistake on my part. Will fix for a rev 2.
Thanks,
Charles
PATCH 23/56 ASoC: tegra: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/tegra/tegra20_i2s.c | 8 ++++---- sound/soc/tegra/tegra210_i2s.c | 8 ++++---- sound/soc/tegra/tegra30_i2s.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-)
sound/soc/tegra/tegra20_i2s.c +4 -4
@@ -95,11 +95,11 @@ static int tegra20_i2s_set_fmt(struct snd_soc_dai *dai, } mask |=TEGRA20_I2S_CTRL_MASTER_ENABLE ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : val |=TEGRA20_I2S_CTRL_MASTER_ENABLE ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :break ;default :return -EINVAL ;
@@ -311,7 +311,7 @@ static int tegra20_i2s_startup(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops tegra20_i2s_dai_ops = { - .set_fmt = tegra20_i2s_set_fmt, + .set_fmt_new = tegra20_i2s_set_fmt, .hw_params = tegra20_i2s_hw_params, .trigger = tegra20_i2s_trigger, .startup = tegra20_i2s_startup,
sound/soc/tegra/tegra210_i2s.c +4 -4
@@ -214,11 +214,11 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,unsigned int mask, val; mask =I2S_CTRL_MASTER_EN_MASK ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : val =0 ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC : val =I2S_CTRL_MASTER_EN ;break ;default :
@@ -678,7 +678,7 @@ static int tegra210_i2s_hw_params(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops tegra210_i2s_dai_ops = { - .set_fmt = tegra210_i2s_set_fmt, + .set_fmt_new = tegra210_i2s_set_fmt, .hw_params = tegra210_i2s_hw_params, .set_bclk_ratio = tegra210_i2s_set_dai_bclk_ratio, .set_tdm_slot = tegra210_i2s_set_tdm_slot,
sound/soc/tegra/tegra30_i2s.c +4 -4
@@ -87,11 +87,11 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, } mask |=TEGRA30_I2S_CTRL_MASTER_ENABLE ; -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP : val |=TEGRA30_I2S_CTRL_MASTER_ENABLE ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :break ;default :return -EINVAL ;
@@ -304,7 +304,7 @@ static int tegra30_i2s_probe(struct snd_soc_dai *dai) }static const struct snd_soc_dai_ops tegra30_i2s_dai_ops = { - .set_fmt = tegra30_i2s_set_fmt, + .set_fmt_new = tegra30_i2s_set_fmt, .hw_params = tegra30_i2s_hw_params, .trigger = tegra30_i2s_trigger, .set_tdm_slot = tegra30_i2s_set_tdm,
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 24/56 ASoC: test-component: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/generic/test-component.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
sound/soc/generic/test-component.c +11 -11
@@ -66,7 +66,7 @@ static int test_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)unsigned int format = fmt &SND_SOC_DAIFMT_FORMAT_MASK ;unsigned int clock = fmt &SND_SOC_DAIFMT_CLOCK_MASK ;unsigned int inv = fmt &SND_SOC_DAIFMT_INV_MASK ; -unsigned int master = fmt &SND_SOC_DAIFMT_MASTER_MASK ; +unsigned int master = fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ;char *str;dev_info (dai->dev,"name : %s" , dai->name);
@@ -105,16 +105,16 @@ static int test_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) str ="unknown" ;switch (master) { -case SND_SOC_DAIFMT_CBP_CFP : +case SND_SOC_DAIFMT_BP_FP : str ="clk provider, frame provider" ;break ; -case SND_SOC_DAIFMT_CBC_CFP : +case SND_SOC_DAIFMT_BC_FP : str ="clk consumer, frame provider" ;break ; -case SND_SOC_DAIFMT_CBP_CFC : +case SND_SOC_DAIFMT_BP_FC : str ="clk provider, frame consumer" ;break ; -case SND_SOC_DAIFMT_CBC_CFC : +case SND_SOC_DAIFMT_BC_FC : str ="clk consumer, frame consumer" ;break ; }
@@ -192,10 +192,10 @@ static int test_dai_bespoke_trigger(struct snd_pcm_substream *substream,static u64 test_dai_formats =/* * Select below from Sound Card, not auto -* SND_SOC_POSSIBLE_DAIFMT_CBP_CFP -* SND_SOC_POSSIBLE_DAIFMT_CBC_CFP -* SND_SOC_POSSIBLE_DAIFMT_CBP_CFC -* SND_SOC_POSSIBLE_DAIFMT_CBC_CFC +* SND_SOC_POSSIBLE_DAIFMT_BP_FP +* SND_SOC_POSSIBLE_DAIFMT_BC_FP +* SND_SOC_POSSIBLE_DAIFMT_BP_FC +* SND_SOC_POSSIBLE_DAIFMT_BC_FC */ SND_SOC_POSSIBLE_DAIFMT_I2S | SND_SOC_POSSIBLE_DAIFMT_RIGHT_J |
@@ -210,7 +210,7 @@ static u64 test_dai_formats =SND_SOC_POSSIBLE_DAIFMT_IB_IF ;static const struct snd_soc_dai_ops test_ops = { - .set_fmt = test_dai_set_fmt, + .set_fmt_new = test_dai_set_fmt, .startup = test_dai_startup, .shutdown = test_dai_shutdown, .auto_selectable_formats = &test_dai_formats,
@@ -221,7 +221,7 @@ static const struct snd_soc_dai_ops test_verbose_ops = { .set_sysclk = test_dai_set_sysclk, .set_pll = test_dai_set_pll, .set_clkdiv = test_dai_set_clkdiv, - .set_fmt = test_dai_set_fmt, + .set_fmt_new = test_dai_set_fmt, .mute_stream = test_dai_mute_stream, .startup = test_dai_startup, .shutdown = test_dai_shutdown,
Signature · 1 line
2.30.2
Re: [PATCH 24/56] ASoC: test-component: Update to use set_fmt_new callback
Hi
Quoted 6 lines
As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
Signed-off-by Charles Keepax <[email protected]>---
Thank you for your help !!
Best regards
---
Kuninori Morimoto
PATCH 25/56 ASoC: ti: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
--- sound/soc/ti/davinci-i2s.c | 34 +++++++++++++++++----------------- sound/soc/ti/davinci-mcasp.c | 12 ++++++------ sound/soc/ti/omap-mcbsp.c | 14 +++++++------- 3 files changed, 30 insertions(+), 30 deletions(-)
sound/soc/ti/davinci-i2s.c +17 -17
@@ -230,15 +230,15 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, dev->fmt = fmt;/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* cpu is master */ pcr =DAVINCI_MCBSP_PCR_FSXM |DAVINCI_MCBSP_PCR_FSRM |DAVINCI_MCBSP_PCR_CLKXM |DAVINCI_MCBSP_PCR_CLKRM ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : pcr =DAVINCI_MCBSP_PCR_FSRM |DAVINCI_MCBSP_PCR_FSXM ;/* * Selection of the clock input pin that is the
@@ -260,7 +260,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, }break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* codec is master */ pcr =0 ;break ;
@@ -395,12 +395,12 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,davinci_mcbsp_write_reg (dev,DAVINCI_MCBSP_SPCR_REG , spcr); } - master = dev->fmt &SND_SOC_DAIFMT_MASTER_MASK ; + master = dev->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ; fmt =params_format (params); mcbsp_word_length = asp_word_length[fmt];switch (master) { -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : freq =clk_get_rate (dev->clk); srgr =DAVINCI_MCBSP_SRGR_FSGM |DAVINCI_MCBSP_SRGR_CLKSM ;
@@ -426,7 +426,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, clk_div &=0xFF ; srgr |= clk_div;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : srgr =DAVINCI_MCBSP_SRGR_FSGM ; clk_div = dev->clk_div -1 ; srgr |=DAVINCI_MCBSP_SRGR_FWID (mcbsp_word_length *8 -1 );
@@ -434,7 +434,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, clk_div &=0xFF ; srgr |= clk_div;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* Clock and frame sync given from external sources */ i =hw_param_interval (params,SNDRV_PCM_HW_PARAM_SAMPLE_BITS ); srgr =DAVINCI_MCBSP_SRGR_FSGM ;
@@ -473,15 +473,15 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, fmt = double_fmt[fmt]; }switch (master) { -case SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BP_FC : rcr |=DAVINCI_MCBSP_RCR_RFRLEN2 (0 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN2 (0 ); rcr |=DAVINCI_MCBSP_RCR_RPHASE ; xcr |=DAVINCI_MCBSP_XCR_XPHASE ;break ; -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BC_FP : rcr |=DAVINCI_MCBSP_RCR_RFRLEN2 (element_cnt -1 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN2 (element_cnt -1 );break ;
@@ -492,13 +492,13 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, mcbsp_word_length = asp_word_length[fmt];switch (master) { -case SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BP_FC : rcr |=DAVINCI_MCBSP_RCR_RFRLEN1 (0 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN1 (0 );break ; -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BC_FP : rcr |=DAVINCI_MCBSP_RCR_RFRLEN1 (element_cnt -1 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN1 (element_cnt -1 );break ;
@@ -606,7 +606,7 @@ static const struct snd_soc_dai_ops davinci_i2s_dai_ops = { .prepare = davinci_i2s_prepare, .trigger = davinci_i2s_trigger, .hw_params = davinci_i2s_hw_params, - .set_fmt = davinci_i2s_set_dai_fmt, + .set_fmt_new = davinci_i2s_set_dai_fmt, .set_clkdiv = davinci_i2s_dai_set_clkdiv, };
sound/soc/ti/davinci-mcasp.c +6 -6
@@ -492,8 +492,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,mcasp_mod_bits (mcasp,DAVINCI_MCASP_RXFMT_REG ,FSRDLY (data_delay),FSRDLY (3 )); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* codec is clock and frame slave */ mcasp_set_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_set_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );
@@ -510,7 +510,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp->bclk_master =1 ;break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FC :/* codec is clock slave and frame master */ mcasp_set_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_clr_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );
@@ -527,7 +527,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp->bclk_master =1 ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP :/* codec is clock master and frame slave */ mcasp_clr_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_set_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );
@@ -544,7 +544,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp->bclk_master =0 ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* codec is clock and frame master */ mcasp_clr_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_clr_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );
@@ -1620,7 +1620,7 @@ static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = { .trigger = davinci_mcasp_trigger, .delay = davinci_mcasp_delay, .hw_params = davinci_mcasp_hw_params, - .set_fmt = davinci_mcasp_set_dai_fmt, + .set_fmt_new = davinci_mcasp_set_dai_fmt, .set_clkdiv = davinci_mcasp_set_clkdiv, .set_sysclk = davinci_mcasp_set_sysclk, .set_tdm_slot = davinci_mcasp_set_tdm_slot,
sound/soc/ti/omap-mcbsp.c +7 -7
@@ -1036,8 +1036,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,/* In McBSP master modes, FRAME (i.e. sample rate) is generated * by _counting_ BCLKs. Calculate frame size in BCLKs */ - master = mcbsp->fmt &SND_SOC_DAIFMT_MASTER_MASK ; -if (master ==SND_SOC_DAIFMT_CBS_CFS ) { + master = mcbsp->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ; +if (master ==SND_SOC_DAIFMT_BP_FP ) { div = mcbsp->clk_div ? mcbsp->clk_div :1 ; framesize = (mcbsp->in_freq / div) /params_rate (params);
@@ -1136,20 +1136,20 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* McBSP master. Set FS and bit clocks as outputs */ regs->pcr0 |=FSXM |FSRM |CLKXM |CLKRM ;/* Sample rate generator drives the FS */ regs->srgr2 |=FSGM ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP :/* McBSP slave. FS clock as output */ regs->srgr2 |=FSGM ; regs->pcr0 |=FSXM |FSRM ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* McBSP slave */ break ;default :
@@ -1271,7 +1271,7 @@ static const struct snd_soc_dai_ops mcbsp_dai_ops = { .trigger = omap_mcbsp_dai_trigger, .delay = omap_mcbsp_dai_delay, .hw_params = omap_mcbsp_dai_hw_params, - .set_fmt = omap_mcbsp_dai_set_dai_fmt, + .set_fmt_new = omap_mcbsp_dai_set_dai_fmt, .set_clkdiv = omap_mcbsp_dai_set_clkdiv, .set_sysclk = omap_mcbsp_dai_set_dai_sysclk, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Re: [PATCH 25/56] ASoC: ti: Update to use set_fmt_new callback
Quoted 3 lines · Charles Keepax
As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback.
looks good, thanks Charles,
Quoted 220 lines
Signed-off-by Charles Keepax <[email protected]>--- sound/soc/ti/davinci-i2s.c | 34 +++++++++++++++++----------------- sound/soc/ti/davinci-mcasp.c | 12 ++++++------ sound/soc/ti/omap-mcbsp.c | 14 +++++++------- 3 files changed, 30 insertions(+), 30 deletions(-)sound/soc/ti/davinci-i2s.c +17
-17@@ -230,15 +230,15 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, dev->fmt = fmt;/* set master/slave audio interface */ -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* cpu is master */ pcr =DAVINCI_MCBSP_PCR_FSXM |DAVINCI_MCBSP_PCR_FSRM |DAVINCI_MCBSP_PCR_CLKXM |DAVINCI_MCBSP_PCR_CLKRM ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : pcr =DAVINCI_MCBSP_PCR_FSRM |DAVINCI_MCBSP_PCR_FSXM ;/* * Selection of the clock input pin that is the @@ -260,7 +260,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, }break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* codec is master */ pcr =0 ;break ;@@ -395,12 +395,12 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,davinci_mcbsp_write_reg (dev,DAVINCI_MCBSP_SPCR_REG , spcr); } - master = dev->fmt &SND_SOC_DAIFMT_MASTER_MASK ; + master = dev->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ; fmt =params_format (params); mcbsp_word_length = asp_word_length[fmt];switch (master) { -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP : freq =clk_get_rate (dev->clk); srgr =DAVINCI_MCBSP_SRGR_FSGM |DAVINCI_MCBSP_SRGR_CLKSM ;@@ -426,7 +426,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, clk_div &=0xFF ; srgr |= clk_div;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP : srgr =DAVINCI_MCBSP_SRGR_FSGM ; clk_div = dev->clk_div -1 ; srgr |=DAVINCI_MCBSP_SRGR_FWID (mcbsp_word_length *8 -1 );@@ -434,7 +434,7 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, clk_div &=0xFF ; srgr |= clk_div;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* Clock and frame sync given from external sources */ i =hw_param_interval (params,SNDRV_PCM_HW_PARAM_SAMPLE_BITS ); srgr =DAVINCI_MCBSP_SRGR_FSGM ;@@ -473,15 +473,15 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, fmt = double_fmt[fmt]; }switch (master) { -case SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BP_FC : rcr |=DAVINCI_MCBSP_RCR_RFRLEN2 (0 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN2 (0 ); rcr |=DAVINCI_MCBSP_RCR_RPHASE ; xcr |=DAVINCI_MCBSP_XCR_XPHASE ;break ; -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BC_FP : rcr |=DAVINCI_MCBSP_RCR_RFRLEN2 (element_cnt -1 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN2 (element_cnt -1 );break ;@@ -492,13 +492,13 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, mcbsp_word_length = asp_word_length[fmt];switch (master) { -case SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_BP_FC : rcr |=DAVINCI_MCBSP_RCR_RFRLEN1 (0 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN1 (0 );break ; -case SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_BC_FP : rcr |=DAVINCI_MCBSP_RCR_RFRLEN1 (element_cnt -1 ); xcr |=DAVINCI_MCBSP_XCR_XFRLEN1 (element_cnt -1 );break ;@@ -606,7 +606,7 @@ static const struct snd_soc_dai_ops davinci_i2s_dai_ops = { .prepare = davinci_i2s_prepare, .trigger = davinci_i2s_trigger, .hw_params = davinci_i2s_hw_params, - .set_fmt = davinci_i2s_set_dai_fmt, + .set_fmt_new = davinci_i2s_set_dai_fmt, .set_clkdiv = davinci_i2s_dai_set_clkdiv, };sound/soc/ti/davinci-mcasp.c +6
-6@@ -492,8 +492,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,mcasp_mod_bits (mcasp,DAVINCI_MCASP_RXFMT_REG ,FSRDLY (data_delay),FSRDLY (3 )); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* codec is clock and frame slave */ mcasp_set_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_set_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );@@ -510,7 +510,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp->bclk_master =1 ;break ; -case SND_SOC_DAIFMT_CBS_CFM : +case SND_SOC_DAIFMT_BP_FC :/* codec is clock slave and frame master */ mcasp_set_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_clr_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );@@ -527,7 +527,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp->bclk_master =1 ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP :/* codec is clock master and frame slave */ mcasp_clr_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_set_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );@@ -544,7 +544,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp->bclk_master =0 ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* codec is clock and frame master */ mcasp_clr_bits (mcasp,DAVINCI_MCASP_ACLKXCTL_REG ,ACLKXE );mcasp_clr_bits (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE );@@ -1620,7 +1620,7 @@ static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = { .trigger = davinci_mcasp_trigger, .delay = davinci_mcasp_delay, .hw_params = davinci_mcasp_hw_params, - .set_fmt = davinci_mcasp_set_dai_fmt, + .set_fmt_new = davinci_mcasp_set_dai_fmt, .set_clkdiv = davinci_mcasp_set_clkdiv, .set_sysclk = davinci_mcasp_set_sysclk, .set_tdm_slot = davinci_mcasp_set_tdm_slot,sound/soc/ti/omap-mcbsp.c +7
-7@@ -1036,8 +1036,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,/* In McBSP master modes, FRAME (i.e. sample rate) is generated * by _counting_ BCLKs. Calculate frame size in BCLKs */ - master = mcbsp->fmt &SND_SOC_DAIFMT_MASTER_MASK ; -if (master ==SND_SOC_DAIFMT_CBS_CFS ) { + master = mcbsp->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ; +if (master ==SND_SOC_DAIFMT_BP_FP ) { div = mcbsp->clk_div ? mcbsp->clk_div :1 ; framesize = (mcbsp->in_freq / div) /params_rate (params);@@ -1136,20 +1136,20 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBS_CFS : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BP_FP :/* McBSP master. Set FS and bit clocks as outputs */ regs->pcr0 |=FSXM |FSRM |CLKXM |CLKRM ;/* Sample rate generator drives the FS */ regs->srgr2 |=FSGM ;break ; -case SND_SOC_DAIFMT_CBM_CFS : +case SND_SOC_DAIFMT_BC_FP :/* McBSP slave. FS clock as output */ regs->srgr2 |=FSGM ; regs->pcr0 |=FSXM |FSRM ;break ; -case SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_BC_FC :/* McBSP slave */ break ;default :@@ -1271,7 +1271,7 @@ static const struct snd_soc_dai_ops mcbsp_dai_ops = { .trigger = omap_mcbsp_dai_trigger, .delay = omap_mcbsp_dai_delay, .hw_params = omap_mcbsp_dai_hw_params, - .set_fmt = omap_mcbsp_dai_set_dai_fmt, + .set_fmt_new = omap_mcbsp_dai_set_dai_fmt, .set_clkdiv = omap_mcbsp_dai_set_clkdiv, .set_sysclk = omap_mcbsp_dai_set_dai_sysclk, };
Signature · 1 line
Péter
PATCH 26/56 ASoC: ux500: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/ux500/ux500_msp_dai.c | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-)
sound/soc/ux500/ux500_msp_dai.c +19 -19
@@ -191,8 +191,8 @@ static int setup_clocking(struct snd_soc_dai *dai,return -EINVAL ; } -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { -case SND_SOC_DAIFMT_CBM_CFM : +switch (fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) { +case SND_SOC_DAIFMT_BC_FC :dev_dbg (dai->dev,"%s: Codec is master.\n" , __func__); msp_config->iodelay =0x20 ;
@@ -204,7 +204,7 @@ static int setup_clocking(struct snd_soc_dai *dai,break ; -case SND_SOC_DAIFMT_CBS_CFS : +case SND_SOC_DAIFMT_BP_FP :dev_dbg (dai->dev,"%s: Codec is slave.\n" , __func__); msp_config->tx_clk_sel =TX_CLK_SEL_SRG ;
@@ -328,15 +328,15 @@ static int setup_msp_config(struct snd_pcm_substream *substream,dev_dbg (dai->dev,"%s: rate: %u, channels: %d.\n" , __func__, runtime->rate, runtime->channels);switch (fmt & - (SND_SOC_DAIFMT_FORMAT_MASK |SND_SOC_DAIFMT_MASTER_MASK )) { -case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_CBS_CFS : + (SND_SOC_DAIFMT_FORMAT_MASK |SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK )) { +case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_BP_FP :dev_dbg (dai->dev,"%s: SND_SOC_DAIFMT_I2S.\n" , __func__); msp_config->default_protdesc =1 ; msp_config->protocol =MSP_I2S_PROTOCOL ;break ; -case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_BC_FC :dev_dbg (dai->dev,"%s: SND_SOC_DAIFMT_I2S.\n" , __func__); msp_config->data_size =MSP_DATA_BITS_16 ;
@@ -348,10 +348,10 @@ static int setup_msp_config(struct snd_pcm_substream *substream,break ; -case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_CBM_CFM : +case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_BC_FC :dev_dbg (dai->dev,"%s: PCM format.\n" , __func__); msp_config->data_size =MSP_DATA_BITS_16 ;
@@ -477,7 +477,7 @@ static int ux500_msp_dai_prepare(struct snd_pcm_substream *substream, }/* Set OPP-level */ -if ((drvdata->fmt &SND_SOC_DAIFMT_MASTER_MASK ) && +if ((drvdata->fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) && (drvdata->msp->f_bitclk >19200000 )) {/* If the bit-clock is higher than 19.2MHz, Vape should be * run in 100% OPP. Only when bit-clock is used (MSP master)
@@ -544,13 +544,13 @@ static int ux500_msp_dai_set_dai_fmt(struct snd_soc_dai *dai,dev_dbg (dai->dev,"%s: MSP %d: Enter.\n" , __func__, dai->id);switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | -SND_SOC_DAIFMT_MASTER_MASK )) { -case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_CBM_CFM : -case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_CBS_CFS : -case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_CBM_CFM : +SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK )) { +case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_BC_FC : +case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_BP_FP : +case SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_BC_FC :break ;default :
@@ -707,7 +707,7 @@ static int ux500_msp_dai_probe(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops ux500_msp_dai_ops[] = { { .set_sysclk = ux500_msp_dai_set_dai_sysclk, - .set_fmt = ux500_msp_dai_set_dai_fmt, + .set_fmt_new = ux500_msp_dai_set_dai_fmt, .set_tdm_slot = ux500_msp_dai_set_tdm_slot, .startup = ux500_msp_dai_startup, .shutdown = ux500_msp_dai_shutdown,
Signature · 1 line
2.30.2
PATCH 27/56 ASoC: xtensa: Update to use set_fmt_new callback
In reply to Charles KeepaxAs part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback.
--- sound/soc/xtensa/xtfpga-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/xtensa/xtfpga-i2s.c +2 -2
@@ -339,7 +339,7 @@ static int xtfpga_i2s_set_fmt(struct snd_soc_dai *cpu_dai, {if ((fmt &SND_SOC_DAIFMT_INV_MASK ) !=SND_SOC_DAIFMT_NB_NF )return -EINVAL ; -if ((fmt &SND_SOC_DAIFMT_MASTER_MASK ) !=SND_SOC_DAIFMT_CBS_CFS ) +if ((fmt &SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK ) !=SND_SOC_DAIFMT_BP_FP )return -EINVAL ;if ((fmt &SND_SOC_DAIFMT_FORMAT_MASK ) !=SND_SOC_DAIFMT_I2S )return -EINVAL ;
@@ -487,7 +487,7 @@ static const struct snd_soc_component_driver xtfpga_i2s_component = {static const struct snd_soc_dai_ops xtfpga_i2s_dai_ops = { .startup = xtfpga_i2s_startup, .hw_params = xtfpga_i2s_hw_params, - .set_fmt = xtfpga_i2s_set_fmt, + .set_fmt_new = xtfpga_i2s_set_fmt, };static struct snd_soc_dai_driver xtfpga_i2s_dai[] = {
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 28/56 ASoC: core: Always send the CPU DAI a direct clock specifier
In reply to Charles KeepaxAll CPU drivers are now updated to accept a direct indication of whether they are clock provider or consumer, rather than being told if the CODEC is clock provider. As such update the core to always pass this direct indication rather than only if the new set_fmt_new callback is defined. Note this makes no difference to the CODEC side of the DAI link as it was already being directly told if it was clock provider under the old system.
--- sound/soc/soc-core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
sound/soc/soc-core.c +3 -12
@@ -1214,7 +1214,6 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd, {struct snd_soc_dai *cpu_dai;struct snd_soc_dai *codec_dai; -unsigned int inv_dai_fmt;unsigned int i;int ret;
@@ -1227,19 +1226,11 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,return ret; } -/* -* Flip the polarity for the "CPU" end of a CODEC<->CODEC link -*/ - inv_dai_fmt =snd_soc_daifmt_clock_provider_flipped (dai_fmt); +/* Flip the polarity for the "CPU" end of link */ + dai_fmt =snd_soc_daifmt_clock_provider_flipped (dai_fmt);for_each_rtd_cpu_dais (rtd, i, cpu_dai) { -unsigned int fmt = dai_fmt; - -if (cpu_dai->driver->ops->set_fmt_new || -snd_soc_component_is_codec (cpu_dai->component)) - fmt = inv_dai_fmt; - - ret =snd_soc_dai_set_fmt (cpu_dai, fmt); + ret =snd_soc_dai_set_fmt (cpu_dai, dai_fmt);if (ret !=0 && ret != -ENOTSUPP )return ret; }
Signature · 1 line
2.30.2
PATCH 29/56 ASoC: amd: vangogh: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/amd/vangogh/acp5x-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/vangogh/acp5x-i2s.c +1 -1
@@ -339,7 +339,7 @@ static int acp5x_i2s_trigger(struct snd_pcm_substream *substream,static const struct snd_soc_dai_ops acp5x_i2s_dai_ops = { .hw_params = acp5x_i2s_hwparams, .trigger = acp5x_i2s_trigger, - .set_fmt_new = acp5x_i2s_set_fmt, + .set_fmt = acp5x_i2s_set_fmt, .set_tdm_slot = acp5x_i2s_set_tdm_slot, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 30/56 ASoC: atmel: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/atmel/atmel-i2s.c | 2 +- sound/soc/atmel/atmel_ssc_dai.c | 2 +- sound/soc/atmel/mchp-i2s-mcc.c | 2 +- sound/soc/atmel/mchp-pdmc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/atmel/atmel-i2s.c +1 -1
@@ -533,7 +533,7 @@ static const struct snd_soc_dai_ops atmel_i2s_dai_ops = { .prepare = atmel_i2s_prepare, .trigger = atmel_i2s_trigger, .hw_params = atmel_i2s_hw_params, - .set_fmt_new = atmel_i2s_set_dai_fmt, + .set_fmt = atmel_i2s_set_dai_fmt, };static int atmel_i2s_dai_probe (struct snd_soc_dai *dai)
sound/soc/atmel/atmel_ssc_dai.c +1 -1
@@ -835,7 +835,7 @@ static const struct snd_soc_dai_ops atmel_ssc_dai_ops = { .prepare = atmel_ssc_prepare, .trigger = atmel_ssc_trigger, .hw_params = atmel_ssc_hw_params, - .set_fmt_new = atmel_ssc_set_dai_fmt, + .set_fmt = atmel_ssc_set_dai_fmt, .set_clkdiv = atmel_ssc_set_dai_clkdiv, };
sound/soc/atmel/mchp-i2s-mcc.c +1 -1
@@ -877,7 +877,7 @@ static const struct snd_soc_dai_ops mchp_i2s_mcc_dai_ops = { .trigger = mchp_i2s_mcc_trigger, .hw_params = mchp_i2s_mcc_hw_params, .hw_free = mchp_i2s_mcc_hw_free, - .set_fmt_new = mchp_i2s_mcc_set_dai_fmt, + .set_fmt = mchp_i2s_mcc_set_dai_fmt, .set_tdm_slot = mchp_i2s_mcc_set_dai_tdm_slot, };
sound/soc/atmel/mchp-pdmc.c +1 -1
@@ -708,7 +708,7 @@ static int mchp_pdmc_trigger(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops mchp_pdmc_dai_ops = { - .set_fmt_new = mchp_pdmc_set_fmt, + .set_fmt = mchp_pdmc_set_fmt, .startup = mchp_pdmc_startup, .shutdown = mchp_pdmc_shutdown, .hw_params = mchp_pdmc_hw_params,
Signature · 1 line
2.30.2
PATCH 31/56 ASoC: au1x: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/au1x/i2sc.c | 2 +- sound/soc/au1x/psc-i2s.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/au1x/i2sc.c +1 -1
@@ -206,7 +206,7 @@ static const struct snd_soc_dai_ops au1xi2s_dai_ops = { .startup = au1xi2s_startup, .trigger = au1xi2s_trigger, .hw_params = au1xi2s_hw_params, - .set_fmt_new = au1xi2s_set_fmt, + .set_fmt = au1xi2s_set_fmt, };static struct snd_soc_dai_driver au1xi2s_dai_driver = {
sound/soc/au1x/psc-i2s.c +1 -1
@@ -266,7 +266,7 @@ static const struct snd_soc_dai_ops au1xpsc_i2s_dai_ops = { .startup = au1xpsc_i2s_startup, .trigger = au1xpsc_i2s_trigger, .hw_params = au1xpsc_i2s_hw_params, - .set_fmt_new = au1xpsc_i2s_set_fmt, + .set_fmt = au1xpsc_i2s_set_fmt, };static const struct snd_soc_dai_driver au1xpsc_i2s_dai_template = {
Signature · 1 line
2.30.2
PATCH 32/56 ASoC: bcm: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/bcm/bcm2835-i2s.c | 2 +- sound/soc/bcm/cygnus-ssp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/bcm/bcm2835-i2s.c +1 -1
@@ -743,7 +743,7 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = { .prepare = bcm2835_i2s_prepare, .trigger = bcm2835_i2s_trigger, .hw_params = bcm2835_i2s_hw_params, - .set_fmt_new = bcm2835_i2s_set_dai_fmt, + .set_fmt = bcm2835_i2s_set_dai_fmt, .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio, .set_tdm_slot = bcm2835_i2s_set_dai_tdm_slot, };
sound/soc/bcm/cygnus-ssp.c +1 -1
@@ -1148,7 +1148,7 @@ static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = { .shutdown = cygnus_ssp_shutdown, .trigger = cygnus_ssp_trigger, .hw_params = cygnus_ssp_hw_params, - .set_fmt_new = cygnus_ssp_set_fmt, + .set_fmt = cygnus_ssp_set_fmt, .set_sysclk = cygnus_ssp_set_sysclk, .set_tdm_slot = cygnus_set_dai_tdm_slot, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 33/56 ASoC: ep93xx: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/cirrus/ep93xx-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/cirrus/ep93xx-i2s.c +1 -1
@@ -398,7 +398,7 @@ static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { .shutdown = ep93xx_i2s_shutdown, .hw_params = ep93xx_i2s_hw_params, .set_sysclk = ep93xx_i2s_set_sysclk, - .set_fmt_new = ep93xx_i2s_set_dai_fmt, + .set_fmt = ep93xx_i2s_set_dai_fmt, };#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
Signature · 1 line
2.30.2
PATCH 34/56 ASoC: dwc: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/dwc/dwc-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/dwc/dwc-i2s.c +1 -1
@@ -387,7 +387,7 @@ static const struct snd_soc_dai_ops dw_i2s_dai_ops = { .hw_params = dw_i2s_hw_params, .prepare = dw_i2s_prepare, .trigger = dw_i2s_trigger, - .set_fmt_new = dw_i2s_set_fmt, + .set_fmt = dw_i2s_set_fmt, };#ifdef CONFIG_PM
Signature · 1 line
2.30.2
PATCH 35/56 ASoC: fsl: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/fsl/fsl_audmix.c | 2 +- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_mqs.c | 2 +- sound/soc/fsl/fsl_sai.c | 2 +- sound/soc/fsl/fsl_ssi.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/fsl/fsl_audmix.c +1 -1
@@ -317,7 +317,7 @@ static int fsl_audmix_dai_trigger(struct snd_pcm_substream *substream, int cmd, }static const struct snd_soc_dai_ops fsl_audmix_dai_ops = { - .set_fmt_new = fsl_audmix_dai_set_fmt, + .set_fmt = fsl_audmix_dai_set_fmt, .trigger = fsl_audmix_dai_trigger, };
sound/soc/fsl/fsl_esai.c +1 -1
@@ -790,7 +790,7 @@ static const struct snd_soc_dai_ops fsl_esai_dai_ops = { .trigger = fsl_esai_trigger, .hw_params = fsl_esai_hw_params, .set_sysclk = fsl_esai_set_dai_sysclk, - .set_fmt_new = fsl_esai_set_dai_fmt, + .set_fmt = fsl_esai_set_dai_fmt, .set_tdm_slot = fsl_esai_set_dai_tdm_slot, };
sound/soc/fsl/fsl_mqs.c +1 -1
@@ -152,7 +152,7 @@ static const struct snd_soc_dai_ops fsl_mqs_dai_ops = { .startup = fsl_mqs_startup, .shutdown = fsl_mqs_shutdown, .hw_params = fsl_mqs_hw_params, - .set_fmt_new = fsl_mqs_set_dai_fmt, + .set_fmt = fsl_mqs_set_dai_fmt, };static struct snd_soc_dai_driver fsl_mqs_dai = {
sound/soc/fsl/fsl_sai.c +1 -1
@@ -704,7 +704,7 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = { .set_bclk_ratio = fsl_sai_set_dai_bclk_ratio, .set_sysclk = fsl_sai_set_dai_sysclk, - .set_fmt_new = fsl_sai_set_dai_fmt, + .set_fmt = fsl_sai_set_dai_fmt, .set_tdm_slot = fsl_sai_set_dai_tdm_slot, .hw_params = fsl_sai_hw_params, .hw_free = fsl_sai_hw_free,
sound/soc/fsl/fsl_ssi.c +1 -1
@@ -1156,7 +1156,7 @@ static const struct snd_soc_dai_ops fsl_ssi_dai_ops = { .shutdown = fsl_ssi_shutdown, .hw_params = fsl_ssi_hw_params, .hw_free = fsl_ssi_hw_free, - .set_fmt_new = fsl_ssi_set_dai_fmt, + .set_fmt = fsl_ssi_set_dai_fmt, .set_tdm_slot = fsl_ssi_set_dai_tdm_slot, .trigger = fsl_ssi_trigger, };
Signature · 1 line
2.30.2
PATCH 36/56 ASoC: hisilicon: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/hisilicon/hi6210-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/hisilicon/hi6210-i2s.c +1 -1
@@ -513,7 +513,7 @@ static int hi6210_i2s_dai_probe(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops hi6210_i2s_dai_ops = { .trigger = hi6210_i2s_trigger, .hw_params = hi6210_i2s_hw_params, - .set_fmt_new = hi6210_i2s_set_fmt, + .set_fmt = hi6210_i2s_set_fmt, .startup = hi6210_i2s_startup, .shutdown = hi6210_i2s_shutdown, };
Signature · 7 lines
2.30.2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 37/56 ASoC: img: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/img/img-i2s-in.c | 2 +- sound/soc/img/img-i2s-out.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/img/img-i2s-in.c +1 -1
@@ -373,7 +373,7 @@ static int img_i2s_in_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)static const struct snd_soc_dai_ops img_i2s_in_dai_ops = { .trigger = img_i2s_in_trigger, .hw_params = img_i2s_in_hw_params, - .set_fmt_new = img_i2s_in_set_fmt + .set_fmt = img_i2s_in_set_fmt };static int img_i2s_in_dai_probe (struct snd_soc_dai *dai)
sound/soc/img/img-i2s-out.c +1 -1
@@ -381,7 +381,7 @@ static int img_i2s_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)static const struct snd_soc_dai_ops img_i2s_out_dai_ops = { .trigger = img_i2s_out_trigger, .hw_params = img_i2s_out_hw_params, - .set_fmt_new = img_i2s_out_set_fmt + .set_fmt = img_i2s_out_set_fmt };static int img_i2s_out_dai_probe (struct snd_soc_dai *dai)
Signature · 1 line
2.30.2
PATCH 38/56 ASoC: Intel: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 2 +- sound/soc/intel/keembay/kmb_platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/atom/sst-mfld-platform-pcm.c +1 -1
@@ -473,7 +473,7 @@ static const struct snd_soc_dai_ops sst_compr_dai_ops = {static const struct snd_soc_dai_ops sst_be_dai_ops = { .startup = sst_enable_ssp, .hw_params = sst_be_hw_params, - .set_fmt_new = sst_set_format, + .set_fmt = sst_set_format, .set_tdm_slot = sst_platform_set_ssp_slot, .shutdown = sst_disable_ssp, };
sound/soc/intel/keembay/kmb_platform.c +1 -1
@@ -736,7 +736,7 @@ static const struct snd_soc_dai_ops kmb_dai_ops = { .hw_params = kmb_dai_hw_params, .hw_free = kmb_dai_hw_free, .prepare = kmb_dai_prepare, - .set_fmt_new = kmb_set_dai_fmt, + .set_fmt = kmb_set_dai_fmt, };static struct snd_soc_dai_driver intel_kmb_hdmi_dai[] = {
Signature · 1 line
2.30.2
PATCH 39/56 ASoC: jz4740-i2s: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/jz4740/jz4740-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/jz4740/jz4740-i2s.c +1 -1
@@ -433,7 +433,7 @@ static const struct snd_soc_dai_ops jz4740_i2s_dai_ops = { .shutdown = jz4740_i2s_shutdown, .trigger = jz4740_i2s_trigger, .hw_params = jz4740_i2s_hw_params, - .set_fmt_new = jz4740_i2s_set_fmt, + .set_fmt = jz4740_i2s_set_fmt, .set_sysclk = jz4740_i2s_set_sysclk, };
Signature · 1 line
2.30.2
PATCH 40/56 ASoC: mediatek: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 4 ++-- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/mediatek/mt8195/mt8195-dai-etdm.c +2 -2
@@ -2346,7 +2346,7 @@ static const struct snd_soc_dai_ops mtk_dai_etdm_ops = { .hw_params = mtk_dai_etdm_hw_params, .trigger = mtk_dai_etdm_trigger, .set_sysclk = mtk_dai_etdm_set_sysclk, - .set_fmt_new = mtk_dai_etdm_set_fmt, + .set_fmt = mtk_dai_etdm_set_fmt, .set_tdm_slot = mtk_dai_etdm_set_tdm_slot, };
@@ -2356,7 +2356,7 @@ static const struct snd_soc_dai_ops mtk_dai_hdmitx_dptx_ops = { .hw_params = mtk_dai_hdmitx_dptx_hw_params, .trigger = mtk_dai_hdmitx_dptx_trigger, .set_sysclk = mtk_dai_hdmitx_dptx_set_sysclk, - .set_fmt_new = mtk_dai_etdm_set_fmt, + .set_fmt = mtk_dai_etdm_set_fmt, };/* dai driver */
sound/soc/mediatek/mt8195/mt8195-dai-pcm.c +1 -1
@@ -282,7 +282,7 @@ static int mtk_dai_pcm_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)static const struct snd_soc_dai_ops mtk_dai_pcm_ops = { .prepare = mtk_dai_pcm_prepare, - .set_fmt_new = mtk_dai_pcm_set_fmt, + .set_fmt = mtk_dai_pcm_set_fmt, };/* dai driver */
Signature · 1 line
2.30.2
PATCH 41/56 ASoC: meson: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/meson/aiu-encoder-i2s.c | 2 +- sound/soc/meson/axg-tdm-interface.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/meson/aiu-encoder-i2s.c +1 -1
@@ -323,7 +323,7 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream,const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = { .hw_params = aiu_encoder_i2s_hw_params, .hw_free = aiu_encoder_i2s_hw_free, - .set_fmt_new = aiu_encoder_i2s_set_fmt, + .set_fmt = aiu_encoder_i2s_set_fmt, .set_sysclk = aiu_encoder_i2s_set_sysclk, .startup = aiu_encoder_i2s_startup, .shutdown = aiu_encoder_i2s_shutdown,
sound/soc/meson/axg-tdm-interface.c +1 -1
@@ -394,7 +394,7 @@ static int axg_tdm_iface_probe_dai(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops axg_tdm_iface_ops = { .set_sysclk = axg_tdm_iface_set_sysclk, - .set_fmt_new = axg_tdm_iface_set_fmt, + .set_fmt = axg_tdm_iface_set_fmt, .startup = axg_tdm_iface_startup, .hw_params = axg_tdm_iface_hw_params, .prepare = axg_tdm_iface_prepare,
Signature · 1 line
2.30.2
PATCH 42/56 ASoC: mxs-saif: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/mxs/mxs-saif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/mxs/mxs-saif.c +1 -1
@@ -642,7 +642,7 @@ static const struct snd_soc_dai_ops mxs_saif_dai_ops = { .prepare = mxs_saif_prepare, .hw_params = mxs_saif_hw_params, .set_sysclk = mxs_saif_set_dai_sysclk, - .set_fmt_new = mxs_saif_set_dai_fmt, + .set_fmt = mxs_saif_set_dai_fmt, };static struct snd_soc_dai_driver mxs_saif_dai = {
Signature · 1 line
2.30.2
PATCH 43/56 ASoC: pxa: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/pxa/mmp-sspa.c | 2 +- sound/soc/pxa/pxa-ssp.c | 2 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/pxa/mmp-sspa.c +1 -1
@@ -346,7 +346,7 @@ static const struct snd_soc_dai_ops mmp_sspa_dai_ops = { .hw_params = mmp_sspa_hw_params, .set_sysclk = mmp_sspa_set_dai_sysclk, .set_pll = mmp_sspa_set_dai_pll, - .set_fmt_new = mmp_sspa_set_dai_fmt, + .set_fmt = mmp_sspa_set_dai_fmt, };static struct snd_soc_dai_driver mmp_sspa_dai = {
sound/soc/pxa/pxa-ssp.c +1 -1
@@ -824,7 +824,7 @@ static const struct snd_soc_dai_ops pxa_ssp_dai_ops = { .trigger = pxa_ssp_trigger, .hw_params = pxa_ssp_hw_params, .set_sysclk = pxa_ssp_set_dai_sysclk, - .set_fmt_new = pxa_ssp_set_dai_fmt, + .set_fmt = pxa_ssp_set_dai_fmt, .set_tdm_slot = pxa_ssp_set_dai_tdm_slot, .set_tristate = pxa_ssp_set_dai_tristate, };
sound/soc/pxa/pxa2xx-i2s.c +1 -1
@@ -335,7 +335,7 @@ static const struct snd_soc_dai_ops pxa_i2s_dai_ops = { .shutdown = pxa2xx_i2s_shutdown, .trigger = pxa2xx_i2s_trigger, .hw_params = pxa2xx_i2s_hw_params, - .set_fmt_new = pxa2xx_i2s_set_dai_fmt, + .set_fmt = pxa2xx_i2s_set_dai_fmt, .set_sysclk = pxa2xx_i2s_set_dai_sysclk, };
Signature · 1 line
2.30.2
PATCH 44/56 ASoC: qcom: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/qcom/qdsp6/q6afe-dai.c +1 -1
@@ -648,7 +648,7 @@ static const struct snd_soc_dai_ops q6hdmi_ops = {static const struct snd_soc_dai_ops q6i2s_ops = { .prepare = q6afe_dai_prepare, .hw_params = q6i2s_hw_params, - .set_fmt_new = q6i2s_set_fmt, + .set_fmt = q6i2s_set_fmt, .shutdown = q6afe_dai_shutdown, .set_sysclk = q6afe_mi2s_set_sysclk, };
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +1 -1
@@ -207,7 +207,7 @@ static const struct snd_soc_dai_ops q6i2s_ops = { .shutdown = q6apm_lpass_dai_shutdown, .set_channel_map = q6dma_set_channel_map, .hw_params = q6dma_hw_params, - .set_fmt_new = q6i2s_set_fmt, + .set_fmt = q6i2s_set_fmt, };static const struct snd_soc_component_driver q6apm_lpass_dai_component = {
Signature · 1 line
2.30.2
PATCH 45/56 ASoC: rockchip: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/rockchip/rockchip_i2s.c | 2 +- sound/soc/rockchip/rockchip_i2s_tdm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/rockchip/rockchip_i2s.c +1 -1
@@ -486,7 +486,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_dai_ops = { .hw_params = rockchip_i2s_hw_params, .set_bclk_ratio = rockchip_i2s_set_bclk_ratio, .set_sysclk = rockchip_i2s_set_sysclk, - .set_fmt_new = rockchip_i2s_set_fmt, + .set_fmt = rockchip_i2s_set_fmt, .trigger = rockchip_i2s_trigger, };
sound/soc/rockchip/rockchip_i2s_tdm.c +1 -1
@@ -1113,7 +1113,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_tdm_dai_ops = { .hw_params = rockchip_i2s_tdm_hw_params, .set_bclk_ratio = rockchip_i2s_tdm_set_bclk_ratio, .set_sysclk = rockchip_i2s_tdm_set_sysclk, - .set_fmt_new = rockchip_i2s_tdm_set_fmt, + .set_fmt = rockchip_i2s_tdm_set_fmt, .set_tdm_slot = rockchip_dai_tdm_slot, .trigger = rockchip_i2s_tdm_trigger, };
Signature · 1 line
2.30.2
PATCH 46/56 ASoC: samsung: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/pcm.c | 2 +- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c24xx-i2s.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/samsung/i2s.c +1 -1
@@ -1107,7 +1107,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops samsung_i2s_dai_ops = { .trigger = i2s_trigger, .hw_params = i2s_hw_params, - .set_fmt_new = i2s_set_fmt, + .set_fmt = i2s_set_fmt, .set_clkdiv = i2s_set_clkdiv, .set_sysclk = i2s_set_sysclk, .startup = i2s_startup,
sound/soc/samsung/pcm.c +1 -1
@@ -437,7 +437,7 @@ static const struct snd_soc_dai_ops s3c_pcm_dai_ops = { .set_clkdiv = s3c_pcm_set_clkdiv, .trigger = s3c_pcm_trigger, .hw_params = s3c_pcm_hw_params, - .set_fmt_new = s3c_pcm_set_fmt, + .set_fmt = s3c_pcm_set_fmt, };static int s3c_pcm_dai_probe (struct snd_soc_dai *dai)
sound/soc/samsung/s3c-i2s-v2.c +1 -1
@@ -666,7 +666,7 @@ int s3c_i2sv2_register_component(struct device *dev, int id, ops->trigger = s3c2412_i2s_trigger;if (!ops->hw_params) ops->hw_params = s3c_i2sv2_hw_params; - ops->set_fmt_new = s3c2412_i2s_set_fmt; + ops->set_fmt = s3c2412_i2s_set_fmt; ops->set_clkdiv = s3c2412_i2s_set_clkdiv; ops->set_sysclk = s3c_i2sv2_set_sysclk;
sound/soc/samsung/s3c24xx-i2s.c +1 -1
@@ -394,7 +394,7 @@ static int s3c24xx_i2s_resume(struct snd_soc_component *component)static const struct snd_soc_dai_ops s3c24xx_i2s_dai_ops = { .trigger = s3c24xx_i2s_trigger, .hw_params = s3c24xx_i2s_hw_params, - .set_fmt_new = s3c24xx_i2s_set_fmt, + .set_fmt = s3c24xx_i2s_set_fmt, .set_clkdiv = s3c24xx_i2s_set_clkdiv, .set_sysclk = s3c24xx_i2s_set_sysclk, };
Signature · 1 line
2.30.2
Re: [PATCH 46/56] ASoC: samsung: Rename set_fmt_new back to set_fmt
Quoted 5 lines · Charles Keepax
Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal
set_fmtcallback.Signed-off-by Charles Keepax <[email protected]>
Best regards,
Krzysztof
PATCH 47/56 ASoC: sh: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rz-ssi.c | 2 +- sound/soc/sh/ssi.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/sh/fsi.c +1 -1
@@ -1724,7 +1724,7 @@ static const struct snd_soc_dai_ops fsi_dai_ops = { .startup = fsi_dai_startup, .shutdown = fsi_dai_shutdown, .trigger = fsi_dai_trigger, - .set_fmt_new = fsi_dai_set_fmt, + .set_fmt = fsi_dai_set_fmt, .hw_params = fsi_dai_hw_params, .auto_selectable_formats = &fsi_dai_formats, .num_auto_selectable_formats = 1,
sound/soc/sh/rcar/core.c +1 -1
@@ -1068,7 +1068,7 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { .startup = rsnd_soc_dai_startup, .shutdown = rsnd_soc_dai_shutdown, .trigger = rsnd_soc_dai_trigger, - .set_fmt_new = rsnd_soc_dai_set_fmt, + .set_fmt = rsnd_soc_dai_set_fmt, .set_tdm_slot = rsnd_soc_set_dai_tdm_slot, .prepare = rsnd_soc_dai_prepare, .auto_selectable_formats = rsnd_soc_dai_formats,
sound/soc/sh/rz-ssi.c +1 -1
@@ -840,7 +840,7 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,static const struct snd_soc_dai_ops rz_ssi_dai_ops = { .trigger = rz_ssi_dai_trigger, - .set_fmt_new = rz_ssi_dai_set_fmt, + .set_fmt = rz_ssi_dai_set_fmt, .hw_params = rz_ssi_dai_hw_params, };
sound/soc/sh/ssi.c +1 -1
@@ -336,7 +336,7 @@ static const struct snd_soc_dai_ops ssi_dai_ops = { .hw_params = ssi_hw_params, .set_sysclk = ssi_set_sysclk, .set_clkdiv = ssi_set_clkdiv, - .set_fmt_new = ssi_set_fmt, + .set_fmt = ssi_set_fmt, };static struct snd_soc_dai_driver sh4_ssi_dai[] = {
Signature · 1 line
2.30.2
PATCH 48/56 ASoC: stm: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/stm/stm32_i2s.c | 2 +- sound/soc/stm/stm32_sai_sub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/stm/stm32_i2s.c +1 -1
@@ -954,7 +954,7 @@ static const struct regmap_config stm32_h7_i2s_regmap_conf = {static const struct snd_soc_dai_ops stm32_i2s_pcm_dai_ops = { .set_sysclk = stm32_i2s_set_sysclk, - .set_fmt_new = stm32_i2s_set_dai_fmt, + .set_fmt = stm32_i2s_set_dai_fmt, .startup = stm32_i2s_startup, .hw_params = stm32_i2s_hw_params, .trigger = stm32_i2s_trigger,
sound/soc/stm/stm32_sai_sub.c +1 -1
@@ -1225,7 +1225,7 @@ static int stm32_sai_dai_probe(struct snd_soc_dai *cpu_dai)static const struct snd_soc_dai_ops stm32_sai_pcm_dai_ops = { .set_sysclk = stm32_sai_set_sysclk, - .set_fmt_new = stm32_sai_set_dai_fmt, + .set_fmt = stm32_sai_set_dai_fmt, .set_tdm_slot = stm32_sai_set_dai_tdm_slot, .startup = stm32_sai_startup, .hw_params = stm32_sai_hw_params,
Signature · 1 line
2.30.2
PATCH 49/56 ASoC: sunxi: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/sunxi/sun4i-i2s.c | 2 +- sound/soc/sunxi/sun8i-codec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/sunxi/sun4i-i2s.c +1 -1
@@ -1081,7 +1081,7 @@ static int sun4i_i2s_set_tdm_slot(struct snd_soc_dai *dai,static const struct snd_soc_dai_ops sun4i_i2s_dai_ops = { .hw_params = sun4i_i2s_hw_params, - .set_fmt_new = sun4i_i2s_set_fmt, + .set_fmt = sun4i_i2s_set_fmt, .set_sysclk = sun4i_i2s_set_sysclk, .set_tdm_slot = sun4i_i2s_set_tdm_slot, .trigger = sun4i_i2s_trigger,
sound/soc/sunxi/sun8i-codec.c +1 -1
@@ -630,7 +630,7 @@ static int sun8i_codec_hw_free(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops sun8i_codec_dai_ops = { - .set_fmt_new = sun8i_codec_set_fmt, + .set_fmt = sun8i_codec_set_fmt, .set_tdm_slot = sun8i_codec_set_tdm_slot, .startup = sun8i_codec_startup, .hw_params = sun8i_codec_hw_params,
Signature · 1 line
2.30.2
PATCH 50/56 ASoC: tegra: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/tegra/tegra20_i2s.c | 2 +- sound/soc/tegra/tegra210_i2s.c | 2 +- sound/soc/tegra/tegra30_i2s.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/tegra/tegra20_i2s.c +1 -1
@@ -311,7 +311,7 @@ static int tegra20_i2s_startup(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops tegra20_i2s_dai_ops = { - .set_fmt_new = tegra20_i2s_set_fmt, + .set_fmt = tegra20_i2s_set_fmt, .hw_params = tegra20_i2s_hw_params, .trigger = tegra20_i2s_trigger, .startup = tegra20_i2s_startup,
sound/soc/tegra/tegra210_i2s.c +1 -1
@@ -678,7 +678,7 @@ static int tegra210_i2s_hw_params(struct snd_pcm_substream *substream, }static const struct snd_soc_dai_ops tegra210_i2s_dai_ops = { - .set_fmt_new = tegra210_i2s_set_fmt, + .set_fmt = tegra210_i2s_set_fmt, .hw_params = tegra210_i2s_hw_params, .set_bclk_ratio = tegra210_i2s_set_dai_bclk_ratio, .set_tdm_slot = tegra210_i2s_set_tdm_slot,
sound/soc/tegra/tegra30_i2s.c +1 -1
@@ -304,7 +304,7 @@ static int tegra30_i2s_probe(struct snd_soc_dai *dai) }static const struct snd_soc_dai_ops tegra30_i2s_dai_ops = { - .set_fmt_new = tegra30_i2s_set_fmt, + .set_fmt = tegra30_i2s_set_fmt, .hw_params = tegra30_i2s_hw_params, .trigger = tegra30_i2s_trigger, .set_tdm_slot = tegra30_i2s_set_tdm,
Signature · 1 line
2.30.2
PATCH 51/56 ASoC: test-component: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/generic/test-component.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/generic/test-component.c +2 -2
@@ -210,7 +210,7 @@ static u64 test_dai_formats =SND_SOC_POSSIBLE_DAIFMT_IB_IF ;static const struct snd_soc_dai_ops test_ops = { - .set_fmt_new = test_dai_set_fmt, + .set_fmt = test_dai_set_fmt, .startup = test_dai_startup, .shutdown = test_dai_shutdown, .auto_selectable_formats = &test_dai_formats,
@@ -221,7 +221,7 @@ static const struct snd_soc_dai_ops test_verbose_ops = { .set_sysclk = test_dai_set_sysclk, .set_pll = test_dai_set_pll, .set_clkdiv = test_dai_set_clkdiv, - .set_fmt_new = test_dai_set_fmt, + .set_fmt = test_dai_set_fmt, .mute_stream = test_dai_mute_stream, .startup = test_dai_startup, .shutdown = test_dai_shutdown,
Signature · 1 line
2.30.2
PATCH 52/56 ASoC: ti: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/ti/davinci-i2s.c | 2 +- sound/soc/ti/davinci-mcasp.c | 2 +- sound/soc/ti/omap-mcbsp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/ti/davinci-i2s.c +1 -1
@@ -606,7 +606,7 @@ static const struct snd_soc_dai_ops davinci_i2s_dai_ops = { .prepare = davinci_i2s_prepare, .trigger = davinci_i2s_trigger, .hw_params = davinci_i2s_hw_params, - .set_fmt_new = davinci_i2s_set_dai_fmt, + .set_fmt = davinci_i2s_set_dai_fmt, .set_clkdiv = davinci_i2s_dai_set_clkdiv, };
sound/soc/ti/davinci-mcasp.c +1 -1
@@ -1620,7 +1620,7 @@ static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = { .trigger = davinci_mcasp_trigger, .delay = davinci_mcasp_delay, .hw_params = davinci_mcasp_hw_params, - .set_fmt_new = davinci_mcasp_set_dai_fmt, + .set_fmt = davinci_mcasp_set_dai_fmt, .set_clkdiv = davinci_mcasp_set_clkdiv, .set_sysclk = davinci_mcasp_set_sysclk, .set_tdm_slot = davinci_mcasp_set_tdm_slot,
sound/soc/ti/omap-mcbsp.c +1 -1
@@ -1271,7 +1271,7 @@ static const struct snd_soc_dai_ops mcbsp_dai_ops = { .trigger = omap_mcbsp_dai_trigger, .delay = omap_mcbsp_dai_delay, .hw_params = omap_mcbsp_dai_hw_params, - .set_fmt_new = omap_mcbsp_dai_set_dai_fmt, + .set_fmt = omap_mcbsp_dai_set_dai_fmt, .set_clkdiv = omap_mcbsp_dai_set_clkdiv, .set_sysclk = omap_mcbsp_dai_set_dai_sysclk, };
Signature · 1 line
2.30.2
Re: [PATCH 52/56] ASoC: ti: Rename set_fmt_new back to set_fmt
Quoted 3 lines · Charles Keepax
Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal
set_fmtcallback.
Quoted 46 lines
Signed-off-by Charles Keepax <[email protected]>--- sound/soc/ti/davinci-i2s.c | 2 +- sound/soc/ti/davinci-mcasp.c | 2 +- sound/soc/ti/omap-mcbsp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)sound/soc/ti/davinci-i2s.c +1
-1@@ -606,7 +606,7 @@ static const struct snd_soc_dai_ops davinci_i2s_dai_ops = { .prepare = davinci_i2s_prepare, .trigger = davinci_i2s_trigger, .hw_params = davinci_i2s_hw_params, - .set_fmt_new = davinci_i2s_set_dai_fmt, + .set_fmt = davinci_i2s_set_dai_fmt, .set_clkdiv = davinci_i2s_dai_set_clkdiv, };sound/soc/ti/davinci-mcasp.c +1
-1@@ -1620,7 +1620,7 @@ static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = { .trigger = davinci_mcasp_trigger, .delay = davinci_mcasp_delay, .hw_params = davinci_mcasp_hw_params, - .set_fmt_new = davinci_mcasp_set_dai_fmt, + .set_fmt = davinci_mcasp_set_dai_fmt, .set_clkdiv = davinci_mcasp_set_clkdiv, .set_sysclk = davinci_mcasp_set_sysclk, .set_tdm_slot = davinci_mcasp_set_tdm_slot,sound/soc/ti/omap-mcbsp.c +1
-1@@ -1271,7 +1271,7 @@ static const struct snd_soc_dai_ops mcbsp_dai_ops = { .trigger = omap_mcbsp_dai_trigger, .delay = omap_mcbsp_dai_delay, .hw_params = omap_mcbsp_dai_hw_params, - .set_fmt_new = omap_mcbsp_dai_set_dai_fmt, + .set_fmt = omap_mcbsp_dai_set_dai_fmt, .set_clkdiv = omap_mcbsp_dai_set_clkdiv, .set_sysclk = omap_mcbsp_dai_set_dai_sysclk, };
Signature · 1 line
Péter
PATCH 53/56 ASoC: ux500: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/ux500/ux500_msp_dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/ux500/ux500_msp_dai.c +1 -1
@@ -707,7 +707,7 @@ static int ux500_msp_dai_probe(struct snd_soc_dai *dai)static const struct snd_soc_dai_ops ux500_msp_dai_ops[] = { { .set_sysclk = ux500_msp_dai_set_dai_sysclk, - .set_fmt_new = ux500_msp_dai_set_dai_fmt, + .set_fmt = ux500_msp_dai_set_dai_fmt, .set_tdm_slot = ux500_msp_dai_set_tdm_slot, .startup = ux500_msp_dai_startup, .shutdown = ux500_msp_dai_shutdown,
Signature · 1 line
2.30.2
PATCH 54/56 ASoC: xtensa: Rename set_fmt_new back to set_fmt
In reply to Charles KeepaxNow the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback.
--- sound/soc/xtensa/xtfpga-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/xtensa/xtfpga-i2s.c +1 -1
@@ -487,7 +487,7 @@ static const struct snd_soc_component_driver xtfpga_i2s_component = {static const struct snd_soc_dai_ops xtfpga_i2s_dai_ops = { .startup = xtfpga_i2s_startup, .hw_params = xtfpga_i2s_hw_params, - .set_fmt_new = xtfpga_i2s_set_fmt, + .set_fmt = xtfpga_i2s_set_fmt, };static struct snd_soc_dai_driver xtfpga_i2s_dai[] = {
Signature · 1 line
2.30.2
PATCH 55/56 ASoC: soc-dai: Remove set_fmt_new callback
In reply to Charles KeepaxNow the behaviour of the core and all drivers is updated to the new direct clock specification the temporary set_fmt_new callback can be completely removed.
--- include/sound/soc-dai.h | 1 - sound/soc/soc-dai.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-)
include/sound/soc-dai.h +0 -1
@@ -288,7 +288,6 @@ struct snd_soc_dai_ops {* Called by soc_card drivers, normally in their hw_params. */ int (*set_fmt)(struct snd_soc_dai *dai,unsigned int fmt); -int (*set_fmt_new)(struct snd_soc_dai *dai,unsigned int fmt);int (*xlate_tdm_slot_mask)(unsigned int slots,unsigned int *tx_mask,unsigned int *rx_mask); int (*set_tdm_slot)(struct snd_soc_dai *dai,
sound/soc/soc-dai.c +1 -5
@@ -208,11 +208,7 @@ int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) {int ret = -ENOTSUPP ; -if (dai->driver->ops && - dai->driver->ops->set_fmt_new) - ret = dai->driver->ops->set_fmt_new (dai, fmt); -else if (dai->driver->ops && - dai->driver->ops->set_fmt) +if (dai->driver->ops && dai->driver->ops->set_fmt) ret = dai->driver->ops->set_fmt (dai, fmt);return soc_dai_ret (dai, ret);
Signature · 1 line
2.30.2
PATCH 56/56 ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local
In reply to Charles KeepaxThe helper function snd_soc_component_is_codec is based off the presence of the non_legacy_dai_naming flag. This isn't super robust as CPU side components may also specify this flag, and indeed the kernel already contains a couple that do. After componentisation there isn't really a totally robust solution to identifying what is a CODEC driver, without introducing a flag specifically for that purpose, and really the desirable direction to move in is that the distinction doesn't matter.
This patch does two things to try to mitigate these problems. Firstly, now that all the other users of the helper function have been removed, it makes the helper function local to the driver rather, than being part of the core. This should help to discourage any new code from being created that depends on the CODEC driver distinction. Secondly, it updates the helper function itself to use the endianness flag rather than the non_legacy_dai_naming flag. The endianness flag is definitely invalid on a CPU side component, so it a more reliable indicator that the device is definitely a CODEC. The vast majority of buses require the CODEC to set the endianness flag, so the number of corner cases should be fairly minimal. It is worth noting that CODECs sending audio over SPI, or built into the CPU CODECs are potential corner cases, however the hope is that in most cases those types of devices do not consitute a simple audio card.
--- include/sound/soc-component.h | 5 ----- sound/soc/generic/simple-card-utils.c | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-)
include/sound/soc-component.h +0 -5
@@ -348,11 +348,6 @@ static inline int snd_soc_component_cache_sync(return regcache_sync (component->regmap); } -static inline int snd_soc_component_is_codec (struct snd_soc_component *component) -{ -return component->driver->non_legacy_dai_naming; -} -void snd_soc_component_set_aux (struct snd_soc_component *component,struct snd_soc_aux_dev *aux);int snd_soc_component_init (struct snd_soc_component *component);
sound/soc/generic/simple-card-utils.c +6 -1
@@ -513,6 +513,11 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai,return 0 ; } +static inline int asoc_simple_component_is_codec (struct snd_soc_component *component) +{ +return component->driver->endianness; +} +static int asoc_simple_init_dai_link_params (struct snd_soc_pcm_runtime *rtd,struct simple_dai_props *dai_props) {
@@ -524,7 +529,7 @@ static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd,/* Only Codecs */ for_each_rtd_components (rtd, i, component) { -if (!snd_soc_component_is_codec (component)) +if (!asoc_simple_component_is_codec (component))return 0 ; }
Signature · 1 line
2.30.2
Kuninori Morimoto
maintainerRe: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local
Hi
This is not related to this patch, but...
Quoted 4 lines
include/sound/soc-component.h +0
-4-static inline int snd_soc_component_is_codec (struct snd_soc_component *component) -{ -return component->driver->non_legacy_dai_naming; -}
(snip)
sound/soc/generic/simple-card-utils.c static int asoc_simple_init_dai(struct snd_soc_dai *dai, · line 519
Quoted 4 lines
sound/soc/generic/simple-card-utils.c +4
-0+static inline int asoc_simple_component_is_codec (struct snd_soc_component *component) +{ +return component->driver->endianness; +}
I have added "endianness" "non_legacy_dai_naming" to component when convert old "Codec style" into current "Component style". All codec needs to have these 2.
69941bab7c7aeaa7bf7e84397e294c17f0b7c6df
("ASoC: snd_soc_component_driver has non_legacy_dai_naming")
273d778ef38a8861f880e9df5799029dc82bd55d
("ASoC: snd_soc_component_driver has endianness")The reason why I didn't use "codec" was that try to keep original style as much as possible.
But it seems this is good time to use "codec" for it ? I think the code will be more understandable.
- .endianness
- .non_legacy_dai_naming
+ .is_codec
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Re: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local
Quoted 30 lines · Kuninori Morimoto
Hi
This is not related to this patch, but...
Quoted 4 lines
include/sound/soc-component.h +0
-4-static inline int snd_soc_component_is_codec (struct snd_soc_component *component) -{ -return component->driver->non_legacy_dai_naming; -}(snip)
sound/soc/generic/simple-card-utils.c static int asoc_simple_init_dai(struct snd_soc_dai *dai, · line 519
Quoted 4 lines
sound/soc/generic/simple-card-utils.c +4
-0+static inline int asoc_simple_component_is_codec (struct snd_soc_component *component) +{ +return component->driver->endianness; +}I have added "endianness" "
non_legacy_dai_naming" to component when convert old "Codec style" into current "Component style". All codec needs to have these 2.69941bab7c7aeaa7bf7e84397e294c17f0b7c6df ("ASoC: snd_soc_component_driver has non_legacy_dai_naming") 273d778ef38a8861f880e9df5799029dc82bd55d ("ASoC: snd_soc_component_driver has endianness")The reason why I didn't use "codec" was that try to keep original style as much as possible.
But it seems this is good time to use "codec" for it ? I think the code will be more understandable.
Review
Quoted 3 lines
(quoted diff) +1
-2- .endianness - .non_legacy_dai_naming + .is_codec
Yeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and non_legacy_dai_naming flags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that use non_legacy_dai_naming.
We could add an is_codec flag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation.
My thinking was that, whilst making this function local to the driver isn't perfect, simple card will be used with simple CODECs that are likely to exist on a standard audio bus, and thus have endianness and the newer graph cards don't require specific identification of what is a CODEC driver. So it probably works as a solution for now.
Quoted 2 lines
Thank you for your help !!
Absolutely no problem, thank you for all the work you have done on this over the years.
Thanks,
Charles
Kuninori Morimoto
maintainerRe: [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local
Hi
Quoted 10 lines
Review
Quoted 3 lines
(quoted diff) +1
-2- .endianness - .non_legacy_dai_naming + .is_codecYeah I considered this but it didn't really feel like the right way to go to me. Firstly, at this stage we almost certainly need to keep the endianness and
non_legacy_dai_namingflags, there are corner cases when endianness probably shouldn't be applied to CODECs (as noted in my endianness series), and there are platform drivers that usenon_legacy_dai_naming.
Oops, yes indeed :)
Thank you for pointing it.
Quoted 4 lines
We could add an
is_codecflag along side the other two. But it means a whole extra flag and means the the core is still requiring a concept of what is a CODEC driver, which really we want to get rid of as part of componentisation.
Hmm... yes, indeed.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Quoted 20 lines · Charles Keepax
Currently the
set_fmtcallback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. However, as things are now broken down into components which can be connected as either the CPU or CODEC side of a DAI link it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. Making this change allows us to remove one of the last parts of the ASoC core that needs to know if a driver is a CODEC driver, where it flips the clock format specifier if a CODEC driver is used on the CPU side of a DAI link, as well as just being conceptually more consistent with componentisation.The basic idea of this patch chain is to change the
set_fmtcallback from specifying if the CODEC is provider/consumer into directly specifying if the component is provider/consumer. To do this we add some new defines, and then to preserve bisectability, the migration is done by adding a new callback, converting over all existing CPU side drivers, converting the core, and then finally reverting back to the old callback.
Quoted 6 lines
Converting the platform drivers makes sense as the existing defines are from the perspective of the CODEC and there are more CODEC drivers than platform drivers.
Obviously a fair amount of this patch chain I was only able to build test, so any testing that can be done would be greatly appreciated.
All good for the SOF CI (small subset tested for Intel platforms).
https://github.com/thesofproject/linux/pull/3660
Quoted 141 lines
Thanks,
CharlesCharles Keepax (56):
ASoC: core: Addset_fmt_newcallback that directly specifies provider
ASoC: amd: vangogh: Update to useset_fmt_newcallback
ASoC: atmel: Update to useset_fmt_newcallback
ASoC: au1x: Update to useset_fmt_newcallback
ASoC: bcm: Update to useset_fmt_newcallback
ASoC: ep93xx: Update to useset_fmt_newcallback
ASoC: dwc: Update to useset_fmt_newcallback
ASoC: fsl: Update to useset_fmt_newcallback
ASoC: hisilicon: Update to useset_fmt_newcallback
ASoC: img: Update to useset_fmt_newcallback
ASoC: Intel: Update to useset_fmt_newcallback
ASoC: js4740-i2s: Update to useset_fmt_newcallback
ASoC: mediatek: Update to useset_fmt_newcallback
ASoC: meson: Update to useset_fmt_newcallback
ASoC: mxs-saif: Update to useset_fmt_newcallback
ASoC: pxa: Update to useset_fmt_newcallback
ASoC: qcom: Update to useset_fmt_newcallback
ASoC: rockchip: Update to useset_fmt_newcallback
ASoC: samsung: Update to useset_fmt_newcallback
ASoC: sh: Update to useset_fmt_newcallback
ASoC: stm: Update to useset_fmt_newcallback
ASoC: sunxi: Update to useset_fmt_newcallback
ASoC: tegra: Update to useset_fmt_newcallback
ASoC: test-component: Update to useset_fmt_newcallback
ASoC: ti: Update to useset_fmt_newcallback
ASoC: ux500: Update to useset_fmt_newcallback
ASoC: xtensa: Update to useset_fmt_newcallback
ASoC: core: Always send the CPU DAI a direct clock specifier
ASoC: amd: vangogh: Renameset_fmt_newback toset_fmt
ASoC: atmel: Renameset_fmt_newback toset_fmt
ASoC: au1x: Renameset_fmt_newback toset_fmt
ASoC: bcm: Renameset_fmt_newback toset_fmt
ASoC: ep93xx: Renameset_fmt_newback toset_fmt
ASoC: dwc: Renameset_fmt_newback toset_fmt
ASoC: fsl: Renameset_fmt_newback toset_fmt
ASoC: hisilicon: Renameset_fmt_newback toset_fmt
ASoC: img: Renameset_fmt_newback toset_fmt
ASoC: Intel: Renameset_fmt_newback toset_fmt
ASoC: jz4740-i2s: Renameset_fmt_newback toset_fmt
ASoC: mediatek: Renameset_fmt_newback toset_fmt
ASoC: meson: Renameset_fmt_newback toset_fmt
ASoC: mxs-saif: Renameset_fmt_newback toset_fmt
ASoC: pxa: Renameset_fmt_newback toset_fmt
ASoC: qcom: Renameset_fmt_newback toset_fmt
ASoC: rockchip: Renameset_fmt_newback toset_fmt
ASoC: samsung: Renameset_fmt_newback toset_fmt
ASoC: sh: Renameset_fmt_newback toset_fmt
ASoC: stm: Renameset_fmt_newback toset_fmt
ASoC: sunxi: Renameset_fmt_newback toset_fmt
ASoC: tegra: Renameset_fmt_newback toset_fmt
ASoC: test-component: Renameset_fmt_newback toset_fmt
ASoC: ti: Renameset_fmt_newback toset_fmt
ASoC: ux500: Renameset_fmt_newback toset_fmt
ASoC: xtensa: Renameset_fmt_newback toset_fmt
ASoC: soc-dai: Removeset_fmt_newcallback
ASoC: simple-card-utils: Movesnd_soc_component_is_codecto be localinclude/sound/soc-component.h | 5 --- include/sound/soc-dai.h | 6 ++++ sound/soc/amd/vangogh/acp5x-i2s.c | 4 +-- sound/soc/atmel/atmel-i2s.c | 4 +-- sound/soc/atmel/atmel_ssc_dai.c | 18 +++++----- sound/soc/atmel/mchp-i2s-mcc.c | 8 ++--- sound/soc/atmel/mchp-pdmc.c | 4 +-- sound/soc/au1x/i2sc.c | 2 +- sound/soc/au1x/psc-i2s.c | 4 +-- sound/soc/bcm/bcm2835-i2s.c | 20 +++++------ sound/soc/bcm/cygnus-ssp.c | 4 +-- sound/soc/cirrus/ep93xx-i2s.c | 4 +-- sound/soc/dwc/dwc-i2s.c | 8 ++--- sound/soc/fsl/fsl_audmix.c | 6 ++-- sound/soc/fsl/fsl_esai.c | 8 ++--- sound/soc/fsl/fsl_mqs.c | 2 +- sound/soc/fsl/fsl_sai.c | 8 ++--- sound/soc/fsl/fsl_ssi.c | 22 ++++++------ sound/soc/fsl/imx-audmix.c | 4 +-- sound/soc/fsl/imx-card.c | 2 +- sound/soc/generic/simple-card-utils.c | 7 +++- sound/soc/generic/test-component.c | 18 +++++----- sound/soc/hisilicon/hi6210-i2s.c | 18 +++++----- sound/soc/img/img-i2s-in.c | 4 +-- sound/soc/img/img-i2s-out.c | 6 ++-- sound/soc/intel/atom/sst-atom-controls.c | 4 +-- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 2 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcht_nocodec.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 3 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++-- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/keembay/kmb_platform.c | 4 +-- sound/soc/jz4740/jz4740-i2s.c | 10 +++--- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 6 ++-- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 6 ++-- sound/soc/meson/aiu-encoder-i2s.c | 2 +- sound/soc/meson/axg-tdm-interface.c | 14 ++++---- sound/soc/mxs/mxs-saif.c | 4 +-- sound/soc/pxa/magician.c | 8 ++--- sound/soc/pxa/mmp-sspa.c | 6 ++-- sound/soc/pxa/pxa-ssp.c | 22 ++++++------ sound/soc/pxa/pxa2xx-i2s.c | 6 ++-- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/qdsp6/audioreach.c | 4 +-- sound/soc/qcom/qdsp6/q6afe.c | 6 ++-- sound/soc/qcom/sc7180.c | 2 +- sound/soc/qcom/sdm845.c | 6 ++-- sound/soc/qcom/sm8250.c | 4 +-- sound/soc/rockchip/rockchip_i2s.c | 6 ++-- sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++-- sound/soc/samsung/i2s.c | 6 ++-- sound/soc/samsung/pcm.c | 4 +-- sound/soc/samsung/s3c-i2s-v2.c | 6 ++-- sound/soc/samsung/s3c24xx-i2s.c | 6 ++-- sound/soc/sh/fsi.c | 6 ++-- sound/soc/sh/rcar/core.c | 4 +-- sound/soc/sh/rz-ssi.c | 2 +- sound/soc/sh/ssi.c | 10 +++--- sound/soc/soc-core.c | 14 ++------ sound/soc/soc-dai.c | 3 +- sound/soc/stm/stm32_i2s.c | 8 ++--- sound/soc/stm/stm32_sai_sub.c | 8 ++--- sound/soc/sunxi/sun4i-i2s.c | 18 +++++----- sound/soc/sunxi/sun8i-codec.c | 6 ++-- sound/soc/tegra/tegra20_i2s.c | 6 ++-- sound/soc/tegra/tegra210_i2s.c | 6 ++-- sound/soc/tegra/tegra30_i2s.c | 6 ++-- sound/soc/ti/davinci-i2s.c | 32 ++++++++--------- sound/soc/ti/davinci-mcasp.c | 10 +++--- sound/soc/ti/omap-mcbsp.c | 12 +++---- sound/soc/ux500/ux500_msp_dai.c | 36 ++++++++++---------- sound/soc/xtensa/xtfpga-i2s.c | 4 +-- 77 files changed, 279 insertions(+), 283 deletions(-)
Mark Brown
maintainerQuoted 12 lines · Charles Keepax
Currently the
set_fmtcallback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. However, as things are now broken down into components which can be connected as either the CPU or CODEC side of a DAI link it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. Making this change allows us to remove one of the last parts of the ASoC core that needs to know if a driver is a CODEC driver, where it flips the clock format specifier if a CODEC driver is used on the CPU side of a DAI link, as well as just being conceptually more consistent with componentisation.
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/56] ASoC: core: Add set_fmt_new callback that directly specifies provider
commit: 905f3a04e184854555fc248ca4e692fdbf2f2547
[02/56] ASoC: amd: vangogh: Update to use set_fmt_new callback
commit: ab890e0f83a65624d20b0ca4a7cb6306b8511558
[03/56] ASoC: atmel: Update to use set_fmt_new callback
commit: 0fd054a577180cd807992e32c7cd394e54c85903
[04/56] ASoC: au1x: Update to use set_fmt_new callback
commit: fee11f70849b21a244e6e27d281f3858b671bfea
[05/56] ASoC: bcm: Update to use set_fmt_new callback
commit: 04ea2404468b7885c560c3673f6f2fd368f305a2
[06/56] ASoC: ep93xx: Update to use set_fmt_new callback
commit: 5d6124e58d56818249a6266f56d9c3739e72e1bd
[07/56] ASoC: dwc: Update to use set_fmt_new callback
commit: ca0444f1f7b228ae3b8d1a5c0f0d1b4463171f98
[08/56] ASoC: fsl: Update to use set_fmt_new callback
commit: 3b14c15a333b8225ea38479e13c0366539d3374a
[09/56] ASoC: hisilicon: Update to use set_fmt_new callback
commit: 0f362524dd3face4865077a4f7e7e640a95702aa
[10/56] ASoC: img: Update to use set_fmt_new callback
commit: ed2b384082a678a0c4c8c56deff9e5f46d5e3fca
[11/56] ASoC: Intel: Update to use set_fmt_new callback
commit: add9ee8c64c617f561a309cdda50104e9e2c12f6
[12/56] ASoC: js4740-i2s: Update to use set_fmt_new callback
commit: cbb3a19f090d5a41b822caf9ff2058e1c6bc7ea3
[13/56] ASoC: mediatek: Update to use set_fmt_new callback
commit: 3af99430f8d948a41556156155b0295dec274d41
[14/56] ASoC: meson: Update to use set_fmt_new callback
commit: f60442bf6eab47aa4ab127aab88afdcc29a09a73
[15/56] ASoC: mxs-saif: Update to use set_fmt_new callback
commit: f3c0064f1f8e358799c70c7905a09d15c5ec5e5a
[16/56] ASoC: pxa: Update to use set_fmt_new callback
commit: 84c5b47c8ce4d5059d5e7539d3b44922cc0390e9
[17/56] ASoC: qcom: Update to use set_fmt_new callback
commit: 1148e16b335f341f36475b646c692b4a71a1855e
[18/56] ASoC: rockchip: Update to use set_fmt_new callback
commit: 27646d265da1745b2d1d10fec18465631cb1135f
[19/56] ASoC: samsung: Update to use set_fmt_new callback
commit: 0b491c7c1b2555ef08285fd49a8567f2f9f34ff8
[20/56] ASoC: sh: Update to use set_fmt_new callback
commit: 2d4dd776e902546389f2d7808ece7fd815aa829c
[21/56] ASoC: stm: Update to use set_fmt_new callback
commit: 0092dac91ec1c404787841bdd9ecbf3404d1a41c
[22/56] ASoC: sunxi: Update to use set_fmt_new callback
commit: 7cc3965fde74c9c725ed01de4ac35bc7d562d16a
[23/56] ASoC: tegra: Update to use set_fmt_new callback
commit: d92ad6633fa77f9496840b77c8effeaa13ac78dc
[24/56] ASoC: test-component: Update to use set_fmt_new callback
commit: d444c8d246a62392c0d249b1030c3ca271d47649
[25/56] ASoC: ti: Update to use set_fmt_new callback
commit: 563ff63dc9fbb8ef4b8f145a53c84a5489bbd789
[26/56] ASoC: ux500: Update to use set_fmt_new callback
commit: ce3467c78478e33927aea9043bf20f46fa4d5688
[27/56] ASoC: xtensa: Update to use set_fmt_new callback
commit: e945206a0a448ac81dde0609578508368946f7a6
[28/56] ASoC: core: Always send the CPU DAI a direct clock specifier
commit: 6c076273a326cc5b5162451aacf7b7744bb03c66
[29/56] ASoC: amd: vangogh: Rename set_fmt_new back to set_fmt
commit: 346f47e784cd48b456f267a66e0daf1ef10d21b3
[30/56] ASoC: atmel: Rename set_fmt_new back to set_fmt
commit: a839a53b9dc70f94032a671ee019599884612d4a
[31/56] ASoC: au1x: Rename set_fmt_new back to set_fmt
commit: 2c73f5fd20a845fcb48173578b7c83dbcbacdeda
[32/56] ASoC: bcm: Rename set_fmt_new back to set_fmt
commit: 1a267dd98c246237be00587b6e71f969bf75f10d
[33/56] ASoC: ep93xx: Rename set_fmt_new back to set_fmt
commit: 324a4db8de05290237793dc3d7da887846ae90c1
[34/56] ASoC: dwc: Rename set_fmt_new back to set_fmt
commit: 765fb623a2cd925c550370f73efe2137c52a1b25
[35/56] ASoC: fsl: Rename set_fmt_new back to set_fmt
commit: 00778276cf4c611882219ab7aba9664c48981f1a
[36/56] ASoC: hisilicon: Rename set_fmt_new back to set_fmt
commit: b9a7972818b84a15d46505df7808fd86c3fba5bb
[37/56] ASoC: img: Rename set_fmt_new back to set_fmt
commit: 1830a30ec4cf1642a429e80dbbeb86aa7825c71a
[38/56] ASoC: Intel: Rename set_fmt_new back to set_fmt
commit: c14a6ce9848571cf67faff206b02e212bec82761
[39/56] ASoC: jz4740-i2s: Rename set_fmt_new back to set_fmt
commit: 1724cc38e7685ad8b01413acd70a4a731fc105ae
[40/56] ASoC: mediatek: Rename set_fmt_new back to set_fmt
commit: 00ca2d152ef0fa9f4beb2a590e176499440de8fe
[41/56] ASoC: meson: Rename set_fmt_new back to set_fmt
commit: eee6b5b9f3af0e906085022713ef41e56d03eca8
[42/56] ASoC: mxs-saif: Rename set_fmt_new back to set_fmt
commit: 1a805faeb4915496671cd24bd2a75cc97a85dfc8
[43/56] ASoC: pxa: Rename set_fmt_new back to set_fmt
commit: 8e2cc2b241bc0bb905231f301e6dfc80dc79f8a8
[44/56] ASoC: qcom: Rename set_fmt_new back to set_fmt
commit: f1bd2fae856384f9377ca3faed0583d929002640
[45/56] ASoC: rockchip: Rename set_fmt_new back to set_fmt
commit: 059f16bc0e02164617312435c31dffdc419f113f
[46/56] ASoC: samsung: Rename set_fmt_new back to set_fmt
commit: b99d00c724bcf395558cb3028e823bd8f554fee6
[47/56] ASoC: sh: Rename set_fmt_new back to set_fmt
commit: adced68031f96642272fae4e8c36d45d13797306
[48/56] ASoC: stm: Rename set_fmt_new back to set_fmt
commit: 02ba0d9680feee645a321d65012f38d0a368b559
[49/56] ASoC: sunxi: Rename set_fmt_new back to set_fmt
commit: 15011b2388d020a6cdb323539fc69c31b04d9f21
[50/56] ASoC: tegra: Rename set_fmt_new back to set_fmt
commit: 475f2af6a2ff33e828900601a162e324b9986f9a
[51/56] ASoC: test-component: Rename set_fmt_new back to set_fmt
commit: 408c122ef9de99220f7919594ab8af98194a19e8
[52/56] ASoC: ti: Rename set_fmt_new back to set_fmt
commit: 9ff1836023ae19013c01f230e6a091fad6835213
[53/56] ASoC: ux500: Rename set_fmt_new back to set_fmt
commit: e24ba1a21e244e7174e75ca0c4020beaff0ad369
[54/56] ASoC: xtensa: Rename set_fmt_new back to set_fmt
commit: 58e23e21d18532aaa404e1db87ec92762e1fecd5
[55/56] ASoC: soc-dai: Remove set_fmt_new callback
commit: 19423951a4b5c4f0ca107d6a4bed23f3f63718ca
[56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local
commit: 28086d05ada6d03daa886aad0e469854b811311cAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Samuel Holland
maintainerHi Mark,
Quoted 57 lines · Mark Brown
Quoted 12 lines · Charles Keepax
Currently the
set_fmtcallback always passes clock provider/consumer with respect to the CODEC. This made sense when the framework was directly broken down into platforms and CODECs. However, as things are now broken down into components which can be connected as either the CPU or CODEC side of a DAI link it simplifies things if each side of the link is just told if it is provider or consumer of the clocks. Making this change allows us to remove one of the last parts of the ASoC core that needs to know if a driver is a CODEC driver, where it flips the clock format specifier if a CODEC driver is used on the CPU side of a DAI link, as well as just being conceptually more consistent with componentisation.Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/56] ASoC: core: Add
set_fmt_newcallback that directly specifies providercommit: 905f3a04e184854555fc248ca4e692fdbf2f2547 [02/56] ASoC: amd: vangogh: Update to use set_fmt_new callback commit: ab890e0f83a65624d20b0ca4a7cb6306b8511558 [03/56] ASoC: atmel: Update to use set_fmt_new callback commit: 0fd054a577180cd807992e32c7cd394e54c85903 [04/56] ASoC: au1x: Update to use set_fmt_new callback commit: fee11f70849b21a244e6e27d281f3858b671bfea [05/56] ASoC: bcm: Update to use set_fmt_new callback commit: 04ea2404468b7885c560c3673f6f2fd368f305a2 [06/56] ASoC: ep93xx: Update to use set_fmt_new callback commit: 5d6124e58d56818249a6266f56d9c3739e72e1bd [07/56] ASoC: dwc: Update to use set_fmt_new callback commit: ca0444f1f7b228ae3b8d1a5c0f0d1b4463171f98 [08/56] ASoC: fsl: Update to use set_fmt_new callback commit: 3b14c15a333b8225ea38479e13c0366539d3374a [09/56] ASoC: hisilicon: Update to use set_fmt_new callback commit: 0f362524dd3face4865077a4f7e7e640a95702aa [10/56] ASoC: img: Update to use set_fmt_new callback commit: ed2b384082a678a0c4c8c56deff9e5f46d5e3fca [11/56] ASoC: Intel: Update to use set_fmt_new callback commit: add9ee8c64c617f561a309cdda50104e9e2c12f6 [12/56] ASoC: js4740-i2s: Update to use set_fmt_new callback commit: cbb3a19f090d5a41b822caf9ff2058e1c6bc7ea3 [13/56] ASoC: mediatek: Update to use set_fmt_new callback commit: 3af99430f8d948a41556156155b0295dec274d41 [14/56] ASoC: meson: Update to use set_fmt_new callback commit: f60442bf6eab47aa4ab127aab88afdcc29a09a73 [15/56] ASoC: mxs-saif: Update to use set_fmt_new callback commit: f3c0064f1f8e358799c70c7905a09d15c5ec5e5a [16/56] ASoC: pxa: Update to use set_fmt_new callback commit: 84c5b47c8ce4d5059d5e7539d3b44922cc0390e9 [17/56] ASoC: qcom: Update to use set_fmt_new callback commit: 1148e16b335f341f36475b646c692b4a71a1855e [18/56] ASoC: rockchip: Update to use set_fmt_new callback commit: 27646d265da1745b2d1d10fec18465631cb1135f
Quoted 8 lines
[19/56] ASoC: samsung: Update to use
set_fmt_newcallbackcommit: 0b491c7c1b2555ef08285fd49a8567f2f9f34ff8 [20/56] ASoC: sh: Update to use set_fmt_new callback commit: 2d4dd776e902546389f2d7808ece7fd815aa829c [21/56] ASoC: stm: Update to use set_fmt_new callback commit: 0092dac91ec1c404787841bdd9ecbf3404d1a41c [22/56] ASoC: sunxi: Update to use set_fmt_new callback commit: 7cc3965fde74c9c725ed01de4ac35bc7d562d16a
This patch is wrong, which I pointed out earlier[1]. It will break audio on the Allwinner A33 and A64 SoCs. Charles said he would send a v2[2]. Excluding the changes to sound/soc/sunxi/sun8i-codec.c from the patch would fix it.
Regards,
Samuel
[1]:
https://lore.kernel.org/alsa-devel/[email protected]/
[2]:
https://lore.kernel.org/linux-sunxi/[email protected]/
Mark Brown
maintainerQuoted 2 lines · Samuel Holland
Quoted 1 line · Mark Brown
On Thu, 19 May 2022 16:42:22 +0100, Charles Keepax wrote:
Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material.
Quoted 6 lines
Quoted 2 lines
[22/56] ASoC: sunxi: Update to use
set_fmt_newcallbackcommit: 7cc3965fde74c9c725ed01de4ac35bc7d562d16aThis patch is wrong, which I pointed out earlier[1]. It will break audio on the Allwinner A33 and A64 SoCs. Charles said he would send a v2[2]. Excluding the changes to
sound/soc/sunxi/sun8i-codec.cfrom the patch would fix it.
Your mail doesn't say that this will break, it says the change is unexpected. In any case, please send an incremental fix - there's no need to revert the entire series for this.
Quoted 12 lines · Mark Brown
Quoted 2 lines · Samuel Holland
Quoted 1 line · Mark Brown
On Thu, 19 May 2022 16:42:22 +0100, Charles Keepax wrote:
Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material.
Quoted 2 lines
Quoted 2 lines
[22/56] ASoC: sunxi: Update to use
set_fmt_newcallbackcommit: 7cc3965fde74c9c725ed01de4ac35bc7d562d16a
Quoted 7 lines
Quoted 3 lines
This patch is wrong, which I pointed out earlier[1]. It will break audio on the Allwinner A33 and A64 SoCs. Charles said he would send a v2[2]. Excluding the changes to
sound/soc/sunxi/sun8i-codec.cfrom the patch would fix it.Your mail doesn't say that this will break, it says the change is unexpected. In any case, please send an incremental fix - there's no need to revert the entire series for this.
Apologies guys was on PTO last week, I will send an incremental fix today to patch up the issues.
Thanks,
Charles