Loading include/sound/soc-dai.h +7 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,10 @@ int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, int direction); int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot); int snd_soc_dai_is_dummy(struct snd_soc_dai *dai); struct snd_soc_dai_ops { Loading Loading @@ -166,6 +170,9 @@ struct snd_soc_dai_ops { unsigned int tx_num, unsigned int *tx_slot, unsigned int rx_num, unsigned int *rx_slot); int (*set_tristate)(struct snd_soc_dai *dai, int tristate); int (*get_channel_map)(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot); /* * DAI digital mute - optional. Loading sound/soc/soc-core.c +24 −0 Original line number Diff line number Diff line Loading @@ -3881,6 +3881,30 @@ int snd_soc_info_multi_ext(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL(snd_soc_info_multi_ext); /** * snd_soc_dai_get_channel_map - configure DAI audio channel map * @dai: DAI * @tx_num: how many TX channels * @tx_slot: pointer to an array which imply the TX slot number channel * 0~num-1 uses * @rx_num: how many RX channels * @rx_slot: pointer to an array which imply the RX slot number channel * 0~num-1 uses * * configure the relationship between channel number and TDM slot number. */ int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot) { if (dai->driver && dai->driver->ops->get_channel_map) return dai->driver->ops->get_channel_map(dai, tx_num, tx_slot, rx_num, rx_slot); else return -EINVAL; } EXPORT_SYMBOL(snd_soc_dai_get_channel_map); int snd_soc_of_get_dai_name(struct device_node *of_node, const char **dai_name) { Loading Loading
include/sound/soc-dai.h +7 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,10 @@ int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, int direction); int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot); int snd_soc_dai_is_dummy(struct snd_soc_dai *dai); struct snd_soc_dai_ops { Loading Loading @@ -166,6 +170,9 @@ struct snd_soc_dai_ops { unsigned int tx_num, unsigned int *tx_slot, unsigned int rx_num, unsigned int *rx_slot); int (*set_tristate)(struct snd_soc_dai *dai, int tristate); int (*get_channel_map)(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot); /* * DAI digital mute - optional. Loading
sound/soc/soc-core.c +24 −0 Original line number Diff line number Diff line Loading @@ -3881,6 +3881,30 @@ int snd_soc_info_multi_ext(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL(snd_soc_info_multi_ext); /** * snd_soc_dai_get_channel_map - configure DAI audio channel map * @dai: DAI * @tx_num: how many TX channels * @tx_slot: pointer to an array which imply the TX slot number channel * 0~num-1 uses * @rx_num: how many RX channels * @rx_slot: pointer to an array which imply the RX slot number channel * 0~num-1 uses * * configure the relationship between channel number and TDM slot number. */ int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot) { if (dai->driver && dai->driver->ops->get_channel_map) return dai->driver->ops->get_channel_map(dai, tx_num, tx_slot, rx_num, rx_slot); else return -EINVAL; } EXPORT_SYMBOL(snd_soc_dai_get_channel_map); int snd_soc_of_get_dai_name(struct device_node *of_node, const char **dai_name) { Loading