ASoC: rsnd: rename "slots" related variable
Current Renesas sound driver has slots and slots_num in struct rsnd_dai, but these are very un-understandable naming (It had named from TDM slots). In this driver, the "slots" means total usable channels, and "stot_num" means SSI lane number if Multi SSI was used. To more understandable code, this patch renames "slots" to "max_channels", and "slots_num" to "ssi_lane", and replaces related functions name. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -399,11 +399,6 @@ void rsnd_parse_connect_common(struct rsnd_dai *rdai,
|
||||
struct device_node *playback,
|
||||
struct device_node *capture);
|
||||
|
||||
void rsnd_set_slot(struct rsnd_dai *rdai,
|
||||
int slots, int slots_total);
|
||||
int rsnd_get_slot(struct rsnd_dai_stream *io);
|
||||
int rsnd_get_slot_num(struct rsnd_dai_stream *io);
|
||||
|
||||
int rsnd_runtime_channel_original(struct rsnd_dai_stream *io);
|
||||
int rsnd_runtime_channel_after_ctu(struct rsnd_dai_stream *io);
|
||||
int rsnd_runtime_channel_for_ssi(struct rsnd_dai_stream *io);
|
||||
@@ -455,8 +450,8 @@ struct rsnd_dai {
|
||||
struct rsnd_dai_stream capture;
|
||||
struct rsnd_priv *priv;
|
||||
|
||||
int slots;
|
||||
int slots_num;
|
||||
int max_channels; /* 2ch - 16ch */
|
||||
int ssi_lane; /* 1lane - 4lane */
|
||||
|
||||
unsigned int clk_master:1;
|
||||
unsigned int bit_clk_inv:1;
|
||||
@@ -476,6 +471,20 @@ struct rsnd_dai {
|
||||
|
||||
struct rsnd_dai *rsnd_rdai_get(struct rsnd_priv *priv, int id);
|
||||
|
||||
#define rsnd_rdai_channels_set(rdai, max_channels) \
|
||||
rsnd_rdai_channels_ctrl(rdai, max_channels)
|
||||
#define rsnd_rdai_channels_get(rdai) \
|
||||
rsnd_rdai_channels_ctrl(rdai, 0)
|
||||
int rsnd_rdai_channels_ctrl(struct rsnd_dai *rdai,
|
||||
int max_channels);
|
||||
|
||||
#define rsnd_rdai_ssi_lane_set(rdai, ssi_lane) \
|
||||
rsnd_rdai_ssi_lane_ctrl(rdai, ssi_lane)
|
||||
#define rsnd_rdai_ssi_lane_get(rdai) \
|
||||
rsnd_rdai_ssi_lane_ctrl(rdai, 0)
|
||||
int rsnd_rdai_ssi_lane_ctrl(struct rsnd_dai *rdai,
|
||||
int ssi_lane);
|
||||
|
||||
void rsnd_dai_period_elapsed(struct rsnd_dai_stream *io);
|
||||
int rsnd_dai_connect(struct rsnd_mod *mod,
|
||||
struct rsnd_dai_stream *io,
|
||||
|
Reference in New Issue
Block a user