summaryrefslogtreecommitdiffstats
path: root/sound/soc/meson/axg-tdm-formatter.h
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2019-04-04 13:17:32 +0200
committerMark Brown <broonie@kernel.org>2019-04-05 09:26:39 +0700
commitf01bc67f58fde599b48d2dde5d0f48dccd84c4f1 (patch)
tree3db7fea77b9f9df894d965ca49624d325c8e743c /sound/soc/meson/axg-tdm-formatter.h
parentfcced66f208d778aa2dea05910161689503c16bf (diff)
ASoC: meson: axg-tdm-formatter: rework quirks settings
The g12a tdmout requires a different signal skew offset than the axg. With this change, the skew offset is added as a parameter of the tdm formatters to prepare the addition of the g12a support. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/meson/axg-tdm-formatter.h')
-rw-r--r--sound/soc/meson/axg-tdm-formatter.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/meson/axg-tdm-formatter.h b/sound/soc/meson/axg-tdm-formatter.h
index cf947caf3cb1..9ef98e955cb2 100644
--- a/sound/soc/meson/axg-tdm-formatter.h
+++ b/sound/soc/meson/axg-tdm-formatter.h
@@ -14,18 +14,25 @@ struct regmap;
struct snd_soc_dapm_widget;
struct snd_kcontrol;
+struct axg_tdm_formatter_hw {
+ unsigned int skew_offset;
+ bool invert_sclk;
+};
+
struct axg_tdm_formatter_ops {
struct axg_tdm_stream *(*get_stream)(struct snd_soc_dapm_widget *w);
void (*enable)(struct regmap *map);
void (*disable)(struct regmap *map);
- int (*prepare)(struct regmap *map, struct axg_tdm_stream *ts);
+ int (*prepare)(struct regmap *map,
+ const struct axg_tdm_formatter_hw *quirks,
+ struct axg_tdm_stream *ts);
};
struct axg_tdm_formatter_driver {
const struct snd_soc_component_driver *component_drv;
const struct regmap_config *regmap_cfg;
const struct axg_tdm_formatter_ops *ops;
- bool invert_sclk;
+ const struct axg_tdm_formatter_hw *quirks;
};
int axg_tdm_formatter_set_channel_masks(struct regmap *map,