Skip to content

Commit f506d45

Browse files
Dr. David Alan Gilbertbroonie
authored andcommitted
ASoC: codecs: Remove unused rt566[58]_sel_asrc_clk_src
rt5665_sel_asrc_clk_src() was added in 2016 by commit 33ada14 ("ASoC: add rt5665 codec driver") rt5668_sel_asrc_clk_src() was added in 2018 by commit d59fb28 ("ASoC: rt5668: add rt5668B codec driver") Neither have been used. Remove them. Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org> Link: https://patch.msgid.link/20250420232733.182802-1-linux@treblig.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 6070ef6 commit f506d45

4 files changed

Lines changed: 0 additions & 145 deletions

File tree

sound/soc/codecs/rt5665.c

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,102 +1022,6 @@ static int rt5665_mono_vol_put(struct snd_kcontrol *kcontrol,
10221022
return ret;
10231023
}
10241024

1025-
/**
1026-
* rt5665_sel_asrc_clk_src - select ASRC clock source for a set of filters
1027-
* @component: SoC audio component device.
1028-
* @filter_mask: mask of filters.
1029-
* @clk_src: clock source
1030-
*
1031-
* The ASRC function is for asynchronous MCLK and LRCK. Also, since RT5665 can
1032-
* only support standard 32fs or 64fs i2s format, ASRC should be enabled to
1033-
* support special i2s clock format such as Intel's 100fs(100 * sampling rate).
1034-
* ASRC function will track i2s clock and generate a corresponding system clock
1035-
* for codec. This function provides an API to select the clock source for a
1036-
* set of filters specified by the mask. And the codec driver will turn on ASRC
1037-
* for these filters if ASRC is selected as their clock source.
1038-
*/
1039-
int rt5665_sel_asrc_clk_src(struct snd_soc_component *component,
1040-
unsigned int filter_mask, unsigned int clk_src)
1041-
{
1042-
unsigned int asrc2_mask = 0;
1043-
unsigned int asrc2_value = 0;
1044-
unsigned int asrc3_mask = 0;
1045-
unsigned int asrc3_value = 0;
1046-
1047-
switch (clk_src) {
1048-
case RT5665_CLK_SEL_SYS:
1049-
case RT5665_CLK_SEL_I2S1_ASRC:
1050-
case RT5665_CLK_SEL_I2S2_ASRC:
1051-
case RT5665_CLK_SEL_I2S3_ASRC:
1052-
case RT5665_CLK_SEL_SYS2:
1053-
case RT5665_CLK_SEL_SYS3:
1054-
case RT5665_CLK_SEL_SYS4:
1055-
break;
1056-
1057-
default:
1058-
return -EINVAL;
1059-
}
1060-
1061-
if (filter_mask & RT5665_DA_STEREO1_FILTER) {
1062-
asrc2_mask |= RT5665_DA_STO1_CLK_SEL_MASK;
1063-
asrc2_value = (asrc2_value & ~RT5665_DA_STO1_CLK_SEL_MASK)
1064-
| (clk_src << RT5665_DA_STO1_CLK_SEL_SFT);
1065-
}
1066-
1067-
if (filter_mask & RT5665_DA_STEREO2_FILTER) {
1068-
asrc2_mask |= RT5665_DA_STO2_CLK_SEL_MASK;
1069-
asrc2_value = (asrc2_value & ~RT5665_DA_STO2_CLK_SEL_MASK)
1070-
| (clk_src << RT5665_DA_STO2_CLK_SEL_SFT);
1071-
}
1072-
1073-
if (filter_mask & RT5665_DA_MONO_L_FILTER) {
1074-
asrc2_mask |= RT5665_DA_MONOL_CLK_SEL_MASK;
1075-
asrc2_value = (asrc2_value & ~RT5665_DA_MONOL_CLK_SEL_MASK)
1076-
| (clk_src << RT5665_DA_MONOL_CLK_SEL_SFT);
1077-
}
1078-
1079-
if (filter_mask & RT5665_DA_MONO_R_FILTER) {
1080-
asrc2_mask |= RT5665_DA_MONOR_CLK_SEL_MASK;
1081-
asrc2_value = (asrc2_value & ~RT5665_DA_MONOR_CLK_SEL_MASK)
1082-
| (clk_src << RT5665_DA_MONOR_CLK_SEL_SFT);
1083-
}
1084-
1085-
if (filter_mask & RT5665_AD_STEREO1_FILTER) {
1086-
asrc3_mask |= RT5665_AD_STO1_CLK_SEL_MASK;
1087-
asrc3_value = (asrc2_value & ~RT5665_AD_STO1_CLK_SEL_MASK)
1088-
| (clk_src << RT5665_AD_STO1_CLK_SEL_SFT);
1089-
}
1090-
1091-
if (filter_mask & RT5665_AD_STEREO2_FILTER) {
1092-
asrc3_mask |= RT5665_AD_STO2_CLK_SEL_MASK;
1093-
asrc3_value = (asrc2_value & ~RT5665_AD_STO2_CLK_SEL_MASK)
1094-
| (clk_src << RT5665_AD_STO2_CLK_SEL_SFT);
1095-
}
1096-
1097-
if (filter_mask & RT5665_AD_MONO_L_FILTER) {
1098-
asrc3_mask |= RT5665_AD_MONOL_CLK_SEL_MASK;
1099-
asrc3_value = (asrc3_value & ~RT5665_AD_MONOL_CLK_SEL_MASK)
1100-
| (clk_src << RT5665_AD_MONOL_CLK_SEL_SFT);
1101-
}
1102-
1103-
if (filter_mask & RT5665_AD_MONO_R_FILTER) {
1104-
asrc3_mask |= RT5665_AD_MONOR_CLK_SEL_MASK;
1105-
asrc3_value = (asrc3_value & ~RT5665_AD_MONOR_CLK_SEL_MASK)
1106-
| (clk_src << RT5665_AD_MONOR_CLK_SEL_SFT);
1107-
}
1108-
1109-
if (asrc2_mask)
1110-
snd_soc_component_update_bits(component, RT5665_ASRC_2,
1111-
asrc2_mask, asrc2_value);
1112-
1113-
if (asrc3_mask)
1114-
snd_soc_component_update_bits(component, RT5665_ASRC_3,
1115-
asrc3_mask, asrc3_value);
1116-
1117-
return 0;
1118-
}
1119-
EXPORT_SYMBOL_GPL(rt5665_sel_asrc_clk_src);
1120-
11211025
static int rt5665_button_detect(struct snd_soc_component *component)
11221026
{
11231027
int btn_type, val;

sound/soc/codecs/rt5665.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,4 @@ enum {
19991999
RT5665_CLK_SEL_SYS4,
20002000
};
20012001

2002-
int rt5665_sel_asrc_clk_src(struct snd_soc_component *component,
2003-
unsigned int filter_mask, unsigned int clk_src);
2004-
20052002
#endif /* __RT5665_H__ */

sound/soc/codecs/rt5668.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -799,49 +799,6 @@ static void rt5668_reset(struct regmap *regmap)
799799
regmap_write(regmap, RT5668_RESET, 0);
800800
regmap_write(regmap, RT5668_I2C_MODE, 1);
801801
}
802-
/**
803-
* rt5668_sel_asrc_clk_src - select ASRC clock source for a set of filters
804-
* @component: SoC audio component device.
805-
* @filter_mask: mask of filters.
806-
* @clk_src: clock source
807-
*
808-
* The ASRC function is for asynchronous MCLK and LRCK. Also, since RT5668 can
809-
* only support standard 32fs or 64fs i2s format, ASRC should be enabled to
810-
* support special i2s clock format such as Intel's 100fs(100 * sampling rate).
811-
* ASRC function will track i2s clock and generate a corresponding system clock
812-
* for codec. This function provides an API to select the clock source for a
813-
* set of filters specified by the mask. And the component driver will turn on
814-
* ASRC for these filters if ASRC is selected as their clock source.
815-
*/
816-
int rt5668_sel_asrc_clk_src(struct snd_soc_component *component,
817-
unsigned int filter_mask, unsigned int clk_src)
818-
{
819-
820-
switch (clk_src) {
821-
case RT5668_CLK_SEL_SYS:
822-
case RT5668_CLK_SEL_I2S1_ASRC:
823-
case RT5668_CLK_SEL_I2S2_ASRC:
824-
break;
825-
826-
default:
827-
return -EINVAL;
828-
}
829-
830-
if (filter_mask & RT5668_DA_STEREO1_FILTER) {
831-
snd_soc_component_update_bits(component, RT5668_PLL_TRACK_2,
832-
RT5668_FILTER_CLK_SEL_MASK,
833-
clk_src << RT5668_FILTER_CLK_SEL_SFT);
834-
}
835-
836-
if (filter_mask & RT5668_AD_STEREO1_FILTER) {
837-
snd_soc_component_update_bits(component, RT5668_PLL_TRACK_3,
838-
RT5668_FILTER_CLK_SEL_MASK,
839-
clk_src << RT5668_FILTER_CLK_SEL_SFT);
840-
}
841-
842-
return 0;
843-
}
844-
EXPORT_SYMBOL_GPL(rt5668_sel_asrc_clk_src);
845802

846803
static int rt5668_button_detect(struct snd_soc_component *component)
847804
{

sound/soc/codecs/rt5668.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,4 @@ enum {
13091309
RT5668_CLK_SEL_I2S2_ASRC,
13101310
};
13111311

1312-
int rt5668_sel_asrc_clk_src(struct snd_soc_component *component,
1313-
unsigned int filter_mask, unsigned int clk_src);
1314-
13151312
#endif /* __RT5668_H__ */

0 commit comments

Comments
 (0)