mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
ASoC: tegra-alt: cleanup soc_data for drivers
Some of the AHUB module drivers have soc_data information only to define a function pointer for calling tegra210_xbar_set_cif(). This function is implemented in xbar utils driver and exported. This patch removes function pointer reference to above and instead make calls directly. This helps to cleanup soc_data for all modules and further for few modules soc_data is completely removed. Bug 200503387 Change-Id: If919e5f7a7a92351940bf46f7302fd40c76c7ea3 Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2140228 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Dara Ramesh <dramesh@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sharad Gupta <sharadg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra186_arad_alt.h - Definitions for Tegra186 ARAD driver
|
||||
*
|
||||
* Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -100,15 +100,8 @@
|
||||
#define TEGRA186_ARAD_LANE_RATIO_INTEGER_PART_MASK 0xFFFFFFFF
|
||||
#define TEGRA186_ARAD_LANE_RATIO_FRAC_PART_MASK 0xFFFFFFFF
|
||||
|
||||
struct tegra186_arad_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra186_arad {
|
||||
struct regmap *regmap;
|
||||
const struct tegra186_arad_soc_data *soc_data;
|
||||
#if defined CONFIG_SND_SOC_TEGRA186_ARAD_WAR
|
||||
unsigned int int_status;
|
||||
spinlock_t status_lock;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra186_asrc_alt.h - Definitions for Tegra186 ASRC driver
|
||||
*
|
||||
* Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -158,12 +158,6 @@ enum asrc_task_event {
|
||||
|
||||
struct tegra210_xbar_cif_conf;
|
||||
|
||||
struct tegra186_asrc_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra186_asrc_lane {
|
||||
unsigned int int_part;
|
||||
unsigned int frac_part;
|
||||
@@ -176,7 +170,6 @@ struct tegra186_asrc_lane {
|
||||
struct tegra186_asrc {
|
||||
struct regmap *regmap;
|
||||
struct tegra186_asrc_lane lane[6];
|
||||
const struct tegra186_asrc_soc_data *soc_data;
|
||||
struct tasklet_struct tasklet;
|
||||
struct list_head task_desc;
|
||||
int active_dai_count;
|
||||
|
||||
@@ -171,17 +171,10 @@
|
||||
|
||||
#define TEGRA186_DSPK_RX_FIFO_DEPTH 4
|
||||
|
||||
struct tegra186_dspk_soc_data {
|
||||
void (*set_audio_cif) (struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra186_dspk {
|
||||
struct clk *clk_dspk;
|
||||
struct clk *clk_pll_a_out0;
|
||||
struct regmap *regmap;
|
||||
const struct tegra186_dspk_soc_data *soc_data;
|
||||
struct pinctrl *pinctrl;
|
||||
struct pinctrl_state *pin_active_state;
|
||||
struct pinctrl_state *pin_idle_state;
|
||||
|
||||
@@ -161,9 +161,6 @@ struct tegra_admaif_soc_data {
|
||||
struct snd_soc_dai_driver *codec_dais;
|
||||
struct snd_soc_codec_driver *admaif_codec;
|
||||
const struct regmap_config *regmap_conf;
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *cif_conf);
|
||||
bool is_isomgr_client;
|
||||
unsigned int global_base;
|
||||
unsigned int tx_base;
|
||||
|
||||
@@ -160,19 +160,12 @@ enum {
|
||||
TEGRA210_ADX_TOTAL_STREAM
|
||||
};
|
||||
|
||||
struct tegra210_adx_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_adx {
|
||||
struct regmap *regmap;
|
||||
unsigned int map[TEGRA210_ADX_RAM_DEPTH];
|
||||
unsigned int byte_mask[2];
|
||||
int input_channels;
|
||||
int output_channels[TEGRA210_ADX_NUM_OUTPUTS];
|
||||
const struct tegra210_adx_soc_data *soc_data;
|
||||
bool is_shutdown;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_afc_alt.h - Definitions for Tegra210 AFC driver
|
||||
*
|
||||
* Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -84,9 +84,6 @@
|
||||
#define AFC_CLK_PPM_DIFF 50
|
||||
|
||||
struct tegra210_afc_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
unsigned int num_i2s;
|
||||
bool flag_module_select;
|
||||
const struct snd_soc_codec_driver *afc_codec;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_amx_alt.h - Definitions for Tegra210 AMX driver
|
||||
*
|
||||
* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -179,9 +179,6 @@ enum {
|
||||
};
|
||||
|
||||
struct tegra210_amx_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
bool is_auto_disable_supported;
|
||||
const struct regmap_config *regmap_conf;
|
||||
};
|
||||
|
||||
@@ -114,17 +114,11 @@ enum tegra_dmic_ch_select {
|
||||
DMIC_CH_SELECT_RIGHT,
|
||||
DMIC_CH_SELECT_STEREO,
|
||||
};
|
||||
struct tegra210_dmic_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_dmic {
|
||||
struct clk *clk_dmic;
|
||||
struct clk *clk_pll_a_out0;
|
||||
struct regmap *regmap;
|
||||
const struct tegra210_dmic_soc_data *soc_data;
|
||||
struct pinctrl *pinctrl;
|
||||
struct pinctrl_state *pin_active_state;
|
||||
struct pinctrl_state *pin_idle_state;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_iqc_alt.h - Definitions for Tegra210 IQC driver
|
||||
*
|
||||
* Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -73,18 +73,11 @@
|
||||
#define TEGRA210_IQC_DATA_OFFSET_SHIFT 0
|
||||
#define TEGRA210_IQC_DATA_OFFSET_MASK (7 << TEGRA210_IQC_DATA_OFFSET_SHIFT)
|
||||
|
||||
struct tegra210_iqc_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_iqc {
|
||||
struct clk *clk_iqc;
|
||||
struct regmap *regmap;
|
||||
unsigned int timestamp_enable;
|
||||
unsigned int data_offset;
|
||||
const struct tegra210_iqc_soc_data *soc_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_mixer_alt.h - Definitions for Tegra210 MIXER driver
|
||||
*
|
||||
* Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -120,17 +120,10 @@
|
||||
#define TEGRA210_MIXER_TOTAL_PATH (TEGRA210_MIXER_AXBAR_RX_MAX + \
|
||||
TEGRA210_MIXER_AXBAR_TX_MAX)
|
||||
|
||||
struct tegra210_mixer_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_mixer {
|
||||
struct regmap *regmap;
|
||||
int gain_coeff[14];
|
||||
int gain_value[TEGRA210_MIXER_AXBAR_RX_MAX];
|
||||
const struct tegra210_mixer_soc_data *soc_data;
|
||||
unsigned int channels_via_control[TEGRA210_MIXER_TOTAL_PATH];
|
||||
bool is_shutdown;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_mvc_alt.h - Definitions for Tegra210 MVC driver
|
||||
*
|
||||
* Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -130,12 +130,6 @@ enum {
|
||||
CURVE_LINEAR,
|
||||
};
|
||||
|
||||
struct tegra210_mvc_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_mvc {
|
||||
struct regmap *regmap;
|
||||
int poly_coeff[9];
|
||||
@@ -145,7 +139,6 @@ struct tegra210_mvc {
|
||||
unsigned int cif_channels;
|
||||
unsigned int audio_bits;
|
||||
unsigned int format_in;
|
||||
const struct tegra210_mvc_soc_data *soc_data;
|
||||
bool is_shutdown;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_ope_alt.h - Definitions for Tegra210 OPE driver
|
||||
*
|
||||
* Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -77,9 +77,6 @@ struct tegra210_ope_module_soc_data {
|
||||
};
|
||||
|
||||
struct tegra210_ope_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
struct tegra210_ope_module_soc_data peq_soc_data;
|
||||
struct tegra210_ope_module_soc_data mbdrc_soc_data;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_sfc_alt.h - Definitions for Tegra210 SFC driver
|
||||
*
|
||||
* Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -92,12 +92,6 @@
|
||||
/* SRC coefficients */
|
||||
#define TEGRA210_SFC_COEF_RAM_DEPTH 64
|
||||
|
||||
struct tegra210_sfc_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_sfc {
|
||||
int srate_in;
|
||||
int srate_out;
|
||||
@@ -108,7 +102,6 @@ struct tegra210_sfc {
|
||||
struct snd_pcm_hw_params out_hw_params;
|
||||
int stereo_conv_input;
|
||||
int mono_conv_output;
|
||||
const struct tegra210_sfc_soc_data *soc_data;
|
||||
unsigned int channels_via_control;
|
||||
bool is_shutdown;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_spdif.h - Definitions for Tegra210 SPDIF driver
|
||||
*
|
||||
* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -245,12 +245,6 @@
|
||||
#define TEGRA210_SPDIF_LCOEF_2_4_2_COEF_SHIFT 0
|
||||
#define TEGRA210_SPDIF_LCOEF_2_4_2_COEF_MASK (0xffff << TEGRA210_SPDIF_LCOEF_2_4_2_COEF_SHIFT)
|
||||
|
||||
struct tegra210_spdif_soc_data {
|
||||
void (*set_audio_cif)(struct regmap *map,
|
||||
unsigned int reg,
|
||||
struct tegra210_xbar_cif_conf *conf);
|
||||
};
|
||||
|
||||
struct tegra210_spdif {
|
||||
struct clk *clk_spdif_out;
|
||||
struct clk *clk_spdif_in;
|
||||
@@ -258,7 +252,6 @@ struct tegra210_spdif {
|
||||
struct clk *clk_pll_p_out0;
|
||||
struct regmap *regmap;
|
||||
unsigned int loopback;
|
||||
const struct tegra210_spdif_soc_data *soc_data;
|
||||
int is_pinctrl;
|
||||
struct pinctrl *pinctrl;
|
||||
struct pinctrl_state *pin_active_state;
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "tegra186_asrc_alt.h"
|
||||
#include "tegra210_xbar_alt.h"
|
||||
#include "tegra186_arad_alt.h"
|
||||
|
||||
#define DRV_NAME "tegra186-arad"
|
||||
@@ -676,12 +675,8 @@ static const struct regmap_config tegra186_arad_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra186_arad_soc_data soc_data_tegra186 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra186_arad_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra186-arad", .data = &soc_data_tegra186 },
|
||||
{ .compatible = "nvidia,tegra186-arad" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -764,7 +759,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra186_arad_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra186_arad_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -772,7 +766,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra186_arad_soc_data *)match->data;
|
||||
|
||||
arad = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct tegra186_arad), GFP_KERNEL);
|
||||
@@ -783,7 +776,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
arad_dev = &pdev->dev;
|
||||
arad->soc_data = soc_data;
|
||||
dev_set_drvdata(&pdev->dev, arad);
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
||||
@@ -255,7 +255,7 @@ static int tegra186_asrc_set_audio_cif(struct tegra186_asrc *asrc,
|
||||
cif_conf.client_channels = channels;
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
asrc->soc_data->set_audio_cif(asrc->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(asrc->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1088,12 +1088,8 @@ static void tegra186_asrc_ahc_cb(void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct tegra186_asrc_soc_data soc_data_tegra186 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra186_asrc_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra186-asrc", .data = &soc_data_tegra186 },
|
||||
{ .compatible = "nvidia,tegra186-asrc" },
|
||||
{},
|
||||
};
|
||||
static int tegra186_asrc_platform_probe(struct platform_device *pdev)
|
||||
@@ -1103,7 +1099,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra186_asrc_soc_data *soc_data;
|
||||
unsigned int i = 0;
|
||||
|
||||
match = of_match_device(tegra186_asrc_of_match, &pdev->dev);
|
||||
@@ -1112,7 +1107,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra186_asrc_soc_data *)match->data;
|
||||
asrc_dev = &pdev->dev;
|
||||
asrc = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct tegra186_asrc), GFP_KERNEL);
|
||||
@@ -1122,7 +1116,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
asrc->soc_data = soc_data;
|
||||
asrc->is_shutdown = false;
|
||||
dev_set_drvdata(&pdev->dev, asrc);
|
||||
|
||||
|
||||
@@ -160,8 +160,7 @@ static int tegra186_dspk_set_audio_cif(struct tegra186_dspk *dspk,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dspk->soc_data->set_audio_cif(dspk->regmap,
|
||||
TEGRA186_DSPK_AXBAR_RX_CIF_CTRL,
|
||||
tegra210_xbar_set_cif(dspk->regmap, TEGRA186_DSPK_AXBAR_RX_CIF_CTRL,
|
||||
&cif_conf);
|
||||
return 0;
|
||||
}
|
||||
@@ -458,12 +457,8 @@ static const struct regmap_config tegra186_dspk_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra186_dspk_soc_data soc_data_tegra186 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra186_dspk_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra186-dspk", .data = &soc_data_tegra186 },
|
||||
{ .compatible = "nvidia,tegra186-dspk" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -475,7 +470,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra186_dspk_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra186_dspk_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -483,7 +477,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra186_dspk_soc_data *)match->data;
|
||||
|
||||
dspk = devm_kzalloc(&pdev->dev, sizeof(struct tegra186_dspk),
|
||||
GFP_KERNEL);
|
||||
@@ -493,7 +486,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
dspk->soc_data = soc_data;
|
||||
dspk->is_shutdown = false;
|
||||
dspk->prod_name = NULL;
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ static int tegra_admaif_hw_params(struct snd_pcm_substream *substream,
|
||||
}
|
||||
|
||||
tegra_admaif_set_pack_mode(admaif->regmap, reg, valid_bit);
|
||||
admaif->soc_data->set_audio_cif(admaif->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(admaif->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1115,7 +1115,6 @@ static struct tegra_admaif_soc_data soc_data_tegra210 = {
|
||||
.admaif_codec = &tegra210_admaif_codec,
|
||||
.codec_dais = tegra210_admaif_codec_dais,
|
||||
.regmap_conf = &tegra210_admaif_regmap_config,
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.global_base = TEGRA210_ADMAIF_GLOBAL_BASE,
|
||||
.tx_base = TEGRA210_ADMAIF_XBAR_TX_BASE,
|
||||
.rx_base = TEGRA210_ADMAIF_XBAR_RX_BASE,
|
||||
@@ -1127,7 +1126,6 @@ static struct tegra_admaif_soc_data soc_data_tegra186 = {
|
||||
.admaif_codec = &tegra186_admaif_codec,
|
||||
.codec_dais = tegra186_admaif_codec_dais,
|
||||
.regmap_conf = &tegra186_admaif_regmap_config,
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.global_base = TEGRA186_ADMAIF_GLOBAL_BASE,
|
||||
.tx_base = TEGRA186_ADMAIF_XBAR_TX_BASE,
|
||||
.rx_base = TEGRA186_ADMAIF_XBAR_RX_BASE,
|
||||
|
||||
@@ -304,7 +304,7 @@ static int tegra210_adx_set_audio_cif(struct snd_soc_dai *dai,
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
|
||||
adx->soc_data->set_audio_cif(adx->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(adx->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -799,12 +799,8 @@ static const struct regmap_config tegra210_adx_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_adx_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_adx_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-adx", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-adx" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -815,7 +811,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_adx_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra210_adx_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -823,7 +818,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_adx_soc_data *)match->data;
|
||||
|
||||
adx = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_adx), GFP_KERNEL);
|
||||
if (!adx) {
|
||||
@@ -832,7 +826,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
adx->soc_data = soc_data;
|
||||
adx->is_shutdown = false;
|
||||
dev_set_drvdata(&pdev->dev, adx);
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ static int tegra210_afc_set_audio_cif(struct tegra210_afc *afc,
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
|
||||
afc->soc_data->set_audio_cif(afc->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(afc->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -503,14 +503,12 @@ static const struct regmap_config tegra210_afc_regmap_config = {
|
||||
};
|
||||
|
||||
static const struct tegra210_afc_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.afc_codec = &tegra210_afc_codec,
|
||||
.num_i2s = 5,
|
||||
.flag_module_select = false,
|
||||
};
|
||||
|
||||
static const struct tegra210_afc_soc_data soc_data_tegra186 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.afc_codec = &tegra186_afc_codec,
|
||||
.num_i2s = 6,
|
||||
.flag_module_select = true,
|
||||
|
||||
@@ -341,7 +341,7 @@ static int tegra210_amx_set_audio_cif(struct snd_soc_dai *dai,
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
|
||||
amx->soc_data->set_audio_cif(amx->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(amx->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -869,13 +869,11 @@ static const struct regmap_config tegra194_amx_regmap_config = {
|
||||
};
|
||||
|
||||
static const struct tegra210_amx_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.regmap_conf = &tegra210_amx_regmap_config,
|
||||
.is_auto_disable_supported = false,
|
||||
};
|
||||
|
||||
static const struct tegra210_amx_soc_data soc_data_tegra194 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.regmap_conf = &tegra194_amx_regmap_config,
|
||||
.is_auto_disable_supported = true,
|
||||
};
|
||||
|
||||
@@ -401,7 +401,7 @@ static int tegra210_dmic_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
cif_conf.client_bits = TEGRA210_AUDIOCIF_BITS_24;
|
||||
|
||||
dmic->soc_data->set_audio_cif(dmic->regmap, TEGRA210_DMIC_TX_CIF_CTRL,
|
||||
tegra210_xbar_set_cif(dmic->regmap, TEGRA210_DMIC_TX_CIF_CTRL,
|
||||
&cif_conf);
|
||||
|
||||
return 0;
|
||||
@@ -671,12 +671,8 @@ static const struct regmap_config tegra210_dmic_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_dmic_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_dmic_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-dmic", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-dmic" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -688,7 +684,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_dmic_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra210_dmic_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -696,7 +691,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_dmic_soc_data *)match->data;
|
||||
|
||||
dmic = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_dmic), GFP_KERNEL);
|
||||
if (!dmic) {
|
||||
@@ -705,7 +699,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
dmic->soc_data = soc_data;
|
||||
dmic->is_shutdown = false;
|
||||
dmic->prod_name = NULL;
|
||||
dev_set_drvdata(&pdev->dev, dmic);
|
||||
|
||||
@@ -106,7 +106,7 @@ static int tegra210_iqc_set_audio_cif(struct tegra210_iqc *iqc,
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
|
||||
iqc->soc_data->set_audio_cif(iqc->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(iqc->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -295,12 +295,8 @@ static const struct regmap_config tegra210_iqc_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_iqc_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_iqc_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-iqc", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-iqc" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -311,7 +307,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_iqc_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra210_iqc_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -319,7 +314,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_iqc_soc_data *)match->data;
|
||||
|
||||
iqc = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_iqc), GFP_KERNEL);
|
||||
if (!iqc) {
|
||||
@@ -328,7 +322,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
iqc->soc_data = soc_data;
|
||||
dev_set_drvdata(&pdev->dev, iqc);
|
||||
|
||||
if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) {
|
||||
|
||||
@@ -248,7 +248,7 @@ static int tegra210_mixer_set_audio_cif(struct tegra210_mixer *mixer,
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
|
||||
mixer->soc_data->set_audio_cif(mixer->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(mixer->regmap, reg, &cif_conf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -682,12 +682,8 @@ static const struct regmap_config tegra210_mixer_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_mixer_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_mixer_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-amixer", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-amixer" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -698,7 +694,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret, i;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_mixer_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra210_mixer_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -706,7 +701,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_mixer_soc_data *)match->data;
|
||||
|
||||
mixer = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct tegra210_mixer), GFP_KERNEL);
|
||||
@@ -716,7 +710,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
mixer->soc_data = soc_data;
|
||||
mixer->is_shutdown = false;
|
||||
mixer->gain_coeff[0] = 0;
|
||||
mixer->gain_coeff[1] = 0;
|
||||
|
||||
@@ -369,7 +369,7 @@ static int tegra210_mvc_set_audio_cif(struct tegra210_mvc *mvc,
|
||||
if (mvc->format_in && (reg == TEGRA210_MVC_AXBAR_RX_CIF_CTRL))
|
||||
cif_conf.audio_bits = tegra210_mvc_fmt_values[mvc->format_in];
|
||||
|
||||
mvc->soc_data->set_audio_cif(mvc->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(mvc->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -621,12 +621,8 @@ static const struct regmap_config tegra210_mvc_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_mvc_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_mvc_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-mvc", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-mvc" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -637,7 +633,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_mvc_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra210_mvc_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -645,7 +640,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_mvc_soc_data *)match->data;
|
||||
|
||||
mvc = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_mvc), GFP_KERNEL);
|
||||
if (!mvc) {
|
||||
@@ -654,7 +648,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
mvc->soc_data = soc_data;
|
||||
mvc->is_shutdown = false;
|
||||
dev_set_drvdata(&pdev->dev, mvc);
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ static int tegra210_ope_set_audio_cif(struct tegra210_ope *ope,
|
||||
cif_conf.audio_bits = audio_bits;
|
||||
cif_conf.client_bits = audio_bits;
|
||||
|
||||
ope->soc_data->set_audio_cif(ope->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(ope->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -313,7 +313,6 @@ static const struct regmap_config tegra210_ope_regmap_config = {
|
||||
};
|
||||
|
||||
static const struct tegra210_ope_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
.peq_soc_data = {
|
||||
.init = tegra210_peq_init,
|
||||
.codec_init = tegra210_peq_codec_init,
|
||||
|
||||
@@ -322,7 +322,7 @@ static int tegra210_sfc_set_audio_cif(struct tegra210_sfc *sfc,
|
||||
cif_conf.audio_bits = tegra210_sfc_fmt_values[sfc->format_out];
|
||||
cif_conf.client_bits = TEGRA210_AUDIOCIF_BITS_32;
|
||||
|
||||
sfc->soc_data->set_audio_cif(sfc->regmap, reg, &cif_conf);
|
||||
tegra210_xbar_set_cif(sfc->regmap, reg, &cif_conf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -842,12 +842,8 @@ static const struct regmap_config tegra210_sfc_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_sfc_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_sfc_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-sfc", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-sfc" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -858,7 +854,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev)
|
||||
void __iomem *regs;
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_sfc_soc_data *soc_data;
|
||||
|
||||
match = of_match_device(tegra210_sfc_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -866,7 +861,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_sfc_soc_data *)match->data;
|
||||
|
||||
sfc = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_sfc), GFP_KERNEL);
|
||||
if (!sfc) {
|
||||
@@ -875,7 +869,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
sfc->soc_data = soc_data;
|
||||
sfc->is_shutdown = false;
|
||||
|
||||
/* initialize default output srate */
|
||||
|
||||
@@ -235,11 +235,11 @@ static int tegra210_spdif_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
/* As a CODEC DAI, CAPTURE is transmit */
|
||||
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
|
||||
spdif->soc_data->set_audio_cif(spdif->regmap,
|
||||
tegra210_xbar_set_cif(spdif->regmap,
|
||||
TEGRA210_SPDIF_CIF_TXD_CTRL,
|
||||
&cif_conf);
|
||||
} else {
|
||||
spdif->soc_data->set_audio_cif(spdif->regmap,
|
||||
tegra210_xbar_set_cif(spdif->regmap,
|
||||
TEGRA210_SPDIF_CIF_RXD_CTRL,
|
||||
&cif_conf);
|
||||
}
|
||||
@@ -423,12 +423,8 @@ static const struct regmap_config tegra210_spdif_regmap_config = {
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
static const struct tegra210_spdif_soc_data soc_data_tegra210 = {
|
||||
.set_audio_cif = tegra210_xbar_set_cif,
|
||||
};
|
||||
|
||||
static const struct of_device_id tegra210_spdif_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra210-spdif", .data = &soc_data_tegra210 },
|
||||
{ .compatible = "nvidia,tegra210-spdif" },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -439,7 +435,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev)
|
||||
struct resource *mem, *memregion;
|
||||
void __iomem *regs;
|
||||
const struct of_device_id *match;
|
||||
struct tegra210_spdif_soc_data *soc_data;
|
||||
const char *prod_name;
|
||||
int ret;
|
||||
|
||||
@@ -449,7 +444,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev)
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
soc_data = (struct tegra210_spdif_soc_data *)match->data;
|
||||
|
||||
spdif = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_spdif),
|
||||
GFP_KERNEL);
|
||||
@@ -459,7 +453,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
spdif->soc_data = soc_data;
|
||||
spdif->is_shutdown = false;
|
||||
dev_set_drvdata(&pdev->dev, spdif);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user