mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
ASoC: codecs: fsl_mqs: fix build for 5.1 RC kernel
Due to below patch:
999f7f5af8
("ASoC: remove Codec related code")
codec related structures have been removed.
Need update legacy drivers accordingly.
CC sound/soc/codecs/hdmi-codec.o
CC sound/soc/codecs/si476x.o
../sound/soc/codecs/fsl_mqs.c: In function 'fsl_mqs_hw_params':
../sound/soc/codecs/fsl_mqs.c:65:35: error: 'struct snd_soc_dai' has no member named 'codec'
struct snd_soc_codec *codec = dai->codec;
^
../sound/soc/codecs/fsl_mqs.c:66:9: error: implicit declaration of function 'snd_soc_codec_get_drvdata' [-Werror=implicit-function-declaration]
struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec);
^
../sound/soc/codecs/fsl_mqs.c:66:29: warning: initialization makes pointer from integer without a cast
struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec);
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
This commit is contained in:
parent
62e2861cf0
commit
1a36afae7e
|
@ -62,8 +62,8 @@ static int fsl_mqs_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_codec *codec = dai->codec;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec);
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_component_get_drvdata(component);
|
||||
int div, res;
|
||||
|
||||
mqs_priv->mclk_rate = clk_get_rate(mqs_priv->mclk);
|
||||
|
@ -130,8 +130,8 @@ static int fsl_mqs_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
|||
static int fsl_mqs_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
||||
unsigned int freq, int dir)
|
||||
{
|
||||
struct snd_soc_codec *codec = dai->codec;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec);
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
mqs_priv->sysclk_rate = freq;
|
||||
|
||||
|
@ -141,8 +141,8 @@ static int fsl_mqs_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
|||
static int fsl_mqs_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_codec *codec = dai->codec;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec);
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (mqs_priv->use_gpr)
|
||||
regmap_update_bits(mqs_priv->gpr, IOMUXC_GPR2, IMX6SX_GPR2_MQS_EN_MASK,
|
||||
|
@ -157,8 +157,8 @@ static int fsl_mqs_startup(struct snd_pcm_substream *substream,
|
|||
static void fsl_mqs_shutdown(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_codec *codec = dai->codec;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec);
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct fsl_mqs *mqs_priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (mqs_priv->use_gpr)
|
||||
regmap_update_bits(mqs_priv->gpr, IOMUXC_GPR2,
|
||||
|
@ -168,9 +168,9 @@ static void fsl_mqs_shutdown(struct snd_pcm_substream *substream,
|
|||
MQS_EN_MASK, 0);
|
||||
}
|
||||
|
||||
|
||||
static struct snd_soc_codec_driver soc_codec_fsl_mqs = {
|
||||
.idle_bias_off = true,
|
||||
static struct snd_soc_component_driver soc_codec_fsl_mqs = {
|
||||
.idle_bias_on = 1,
|
||||
.non_legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_mqs_dai_ops = {
|
||||
|
@ -268,9 +268,8 @@ static int fsl_mqs_probe(struct platform_device *pdev)
|
|||
dev_set_drvdata(&pdev->dev, mqs_priv);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
return snd_soc_register_codec(&pdev->dev, &soc_codec_fsl_mqs,
|
||||
return devm_snd_soc_register_component(&pdev->dev, &soc_codec_fsl_mqs,
|
||||
&fsl_mqs_dai, 1);
|
||||
|
||||
out:
|
||||
if (!IS_ERR(gpr_np))
|
||||
of_node_put(gpr_np);
|
||||
|
@ -280,7 +279,6 @@ static int fsl_mqs_probe(struct platform_device *pdev)
|
|||
|
||||
static int fsl_mqs_remove(struct platform_device *pdev)
|
||||
{
|
||||
snd_soc_unregister_codec(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user