* [PATCH] ASoC: rt1015: modify some structure to be static and add operation callback function for rt1015_dai
@ 2020-02-26 2:28 jack.yu
2020-02-26 12:26 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: jack.yu @ 2020-02-26 2:28 UTC (permalink / raw)
To: broonie, lgirdwood
Cc: oder_chiou, Jack Yu, alsa-devel, lars, kent_chen, kenny_chen,
derek.fang, shumingf, mingjane_hsieh, flove
From: Jack Yu <jack.yu@realtek.com>
1. Add "static" for rt1015_aif_dai_ops.
2. Add "static" for rt1015_dai[].
3. Add operation callback for rt1015_dai[].
Signed-off-by: Jack Yu <jack.yu@realtek.com>
---
sound/soc/codecs/rt1015.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index d300b417dd50..bb310bc7febd 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -664,7 +664,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
snd_soc_component_update_bits(component, RT1015_TDM_MASTER,
RT1015_I2S_DL_MASK, val_len);
snd_soc_component_update_bits(component, RT1015_CLK2,
- RT1015_FS_PD_MASK, pre_div);
+ RT1015_FS_PD_MASK, pre_div << RT1015_FS_PD_SFT);
return 0;
}
@@ -841,12 +841,12 @@ static void rt1015_remove(struct snd_soc_component *component)
#define RT1015_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
-struct snd_soc_dai_ops rt1015_aif_dai_ops = {
+static struct snd_soc_dai_ops rt1015_aif_dai_ops = {
.hw_params = rt1015_hw_params,
.set_fmt = rt1015_set_dai_fmt,
};
-struct snd_soc_dai_driver rt1015_dai[] = {
+static struct snd_soc_dai_driver rt1015_dai[] = {
{
.name = "rt1015-aif",
.id = 0,
@@ -857,6 +857,7 @@ struct snd_soc_dai_driver rt1015_dai[] = {
.rates = RT1015_STEREO_RATES,
.formats = RT1015_FORMATS,
},
+ .ops = &rt1015_aif_dai_ops,
}
};
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: rt1015: modify some structure to be static and add operation callback function for rt1015_dai
2020-02-26 2:28 [PATCH] ASoC: rt1015: modify some structure to be static and add operation callback function for rt1015_dai jack.yu
@ 2020-02-26 12:26 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-02-26 12:26 UTC (permalink / raw)
To: jack.yu
Cc: oder_chiou, alsa-devel, lars, kent_chen, kenny_chen, lgirdwood,
derek.fang, shumingf, mingjane_hsieh, flove
[-- Attachment #1: Type: text/plain, Size: 875 bytes --]
On Wed, Feb 26, 2020 at 10:28:27AM +0800, jack.yu@realtek.com wrote:
> From: Jack Yu <jack.yu@realtek.com>
>
> 1. Add "static" for rt1015_aif_dai_ops.
> 2. Add "static" for rt1015_dai[].
> 3. Add operation callback for rt1015_dai[].
Please don't send multiple changes in a single patch, split them up into
separate patches - the callback certainly seems like it needs to be in a
different patch.
> @@ -664,7 +664,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
> snd_soc_component_update_bits(component, RT1015_TDM_MASTER,
> RT1015_I2S_DL_MASK, val_len);
> snd_soc_component_update_bits(component, RT1015_CLK2,
> - RT1015_FS_PD_MASK, pre_div);
> + RT1015_FS_PD_MASK, pre_div << RT1015_FS_PD_SFT);
>
> return 0;
> }
This doesn't seem to be mentioned in the changelog and should probably
also be a separate patch?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-26 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-26 2:28 [PATCH] ASoC: rt1015: modify some structure to be static and add operation callback function for rt1015_dai jack.yu
2020-02-26 12:26 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox