From: kernel test robot <lkp@intel.com>
To: Hector Martin <marcan@marcan.st>
Cc: oe-kbuild-all@lists.linux.dev, Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/070-audio 65/119] sound/soc/apple/macaudio.c:1111:30: sparse: sparse: symbol 'macaudio_j274_cfg' was not declared. Should it be static?
Date: Mon, 18 Nov 2024 17:08:32 +0800 [thread overview]
Message-ID: <202411181709.guPSxho2-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux bits/070-audio
head: a89c7c8788b938f7b52c6ca56449de45e92a056e
commit: 4da5f1457485098662c840c4ad8f6b2833a1cbb8 [65/119] macaudio: speaker volume safety interlocks
config: sparc64-randconfig-r122-20241118 (https://download.01.org/0day-ci/archive/20241118/202411181709.guPSxho2-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241118/202411181709.guPSxho2-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411181709.guPSxho2-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> sound/soc/apple/macaudio.c:1111:30: sparse: sparse: symbol 'macaudio_j274_cfg' was not declared. Should it be static?
>> sound/soc/apple/macaudio.c:1147:30: sparse: sparse: symbol 'macaudio_j313_cfg' was not declared. Should it be static?
>> sound/soc/apple/macaudio.c:1192:30: sparse: sparse: symbol 'macaudio_j314_cfg' was not declared. Should it be static?
>> sound/soc/apple/macaudio.c:1200:30: sparse: sparse: symbol 'macaudio_j413_cfg' was not declared. Should it be static?
>> sound/soc/apple/macaudio.c:1210:30: sparse: sparse: symbol 'macaudio_j415_cfg' was not declared. Should it be static?
sound/soc/apple/macaudio.c:1237:30: sparse: sparse: symbol 'macaudio_j375_cfg' was not declared. Should it be static?
>> sound/soc/apple/macaudio.c:1259:30: sparse: sparse: symbol 'macaudio_j493_cfg' was not declared. Should it be static?
>> sound/soc/apple/macaudio.c:1275:30: sparse: sparse: symbol 'macaudio_fallback_cfg' was not declared. Should it be static?
sound/soc/apple/macaudio.c:1286:1: sparse: sparse: symbol 'macaudio_spk_mux_enum' was not declared. Should it be static?
sound/soc/apple/macaudio.c:1296:1: sparse: sparse: symbol 'macaudio_hp_mux_enum' was not declared. Should it be static?
sound/soc/apple/macaudio.c:1384:5: sparse: sparse: symbol 'macaudio_slk_lock' was not declared. Should it be static?
sound/soc/apple/macaudio.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
include/linux/page-flags.h:235:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:235:46: sparse: sparse: self-comparison always evaluates to false
vim +/macaudio_j274_cfg +1111 sound/soc/apple/macaudio.c
1110
> 1111 struct macaudio_platform_cfg macaudio_j274_cfg = {
1112 .fixup = macaudio_j274_fixup_controls,
1113 };
1114
1115 static int macaudio_j313_fixup_controls(struct snd_soc_card *card) {
1116 struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
1117
1118 if (ma->has_speakers) {
1119 if (!please_blow_up_my_speakers) {
1120 dev_err(card->dev, "driver can't assure safety on this model, refusing probe\n");
1121 return -EINVAL;
1122 }
1123
1124 CHECK(snd_soc_set_enum_kctl, "* ASI1 Sel", "Left");
1125 CHECK(snd_soc_deactivate_kctl, "* ASI1 Sel", 0);
1126
1127 /* !!! This is copied from j274, not obtained by looking at
1128 * what macOS sets.
1129 */
1130 CHECK(snd_soc_limit_volume, "* Amp Gain Volume", 14);
1131
1132 /*
1133 * Since we don't set the right slots yet to avoid
1134 * driver conflict on the I2S bus sending ISENSE/VSENSE
1135 * samples from the codecs back to us, disable the
1136 * controls.
1137 */
1138 CHECK(snd_soc_deactivate_kctl, "* VSENSE Switch", 0);
1139 CHECK(snd_soc_deactivate_kctl, "* ISENSE Switch", 0);
1140
1141 macaudio_vlimit_update(ma);
1142 }
1143
1144 return 0;
1145 }
1146
> 1147 struct macaudio_platform_cfg macaudio_j313_cfg = {
1148 .fixup = macaudio_j313_fixup_controls,
1149 };
1150
1151 static int macaudio_j314_fixup_controls(struct snd_soc_card *card)
1152 {
1153 struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
1154
1155 if (ma->has_speakers) {
1156 if (!please_blow_up_my_speakers) {
1157 dev_err(card->dev, "driver can't assure safety on this model, refusing probe\n");
1158 return -EINVAL;
1159 }
1160
1161 CHECK(snd_soc_set_enum_kctl, "* ASI1 Sel", "Left");
1162 CHECK(snd_soc_deactivate_kctl, "* ASI1 Sel", 0);
1163 CHECK(snd_soc_limit_volume, "* Amp Gain Volume", 9); // 15 set by macOS, this is 3 dB below
1164 CHECK(snd_soc_set_enum_kctl, "* Tweeter HPF Corner Frequency", "800 Hz");
1165 CHECK(snd_soc_deactivate_kctl, "* Tweeter HPF Corner Frequency", 0);
1166
1167 /*
1168 * The speaker amps suffer from spurious overcurrent
1169 * events on their unmute, so enable autoretry.
1170 */
1171 CHECK(snd_soc_set_enum_kctl, "* OCE Handling", "Retry");
1172 CHECK(snd_soc_deactivate_kctl, "* OCE Handling", 0);
1173
1174 /*
1175 * Since we don't set the right slots yet to avoid
1176 * driver conflict on the I2S bus sending ISENSE/VSENSE
1177 * samples from the codecs back to us, disable the
1178 * controls.
1179 */
1180 #if 0
1181 CHECK(snd_soc_deactivate_kctl, "* VSENSE Switch", 0);
1182 CHECK(snd_soc_deactivate_kctl, "* ISENSE Switch", 0);
1183 #endif
1184
1185 macaudio_vlimit_update(ma);
1186 }
1187
1188 return 0;
1189 }
1190
1191
> 1192 struct macaudio_platform_cfg macaudio_j314_cfg = {
1193 .fixup = macaudio_j314_fixup_controls,
1194 .limits = {
1195 {.match = "* Tweeter Speaker Volume", TAS2764_DB_REDUCTION(20), TAS2764_0DB},
1196 {.match = "* Woofer Speaker Volume", TAS2764_DB_REDUCTION(20), TAS2764_0DB},
1197 }
1198 };
1199
> 1200 struct macaudio_platform_cfg macaudio_j413_cfg = {
1201 .fixup = macaudio_j314_fixup_controls,
1202 .limits = {
1203 /* Min gain: -17.47 dB */
1204 {.match = "* Tweeter Speaker Volume", TAS2764_DB_REDUCTION(20), TAS2764_0DB},
1205 /* Min gain: -10.63 dB */
1206 {.match = "* Woofer Speaker Volume", TAS2764_DB_REDUCTION(14), TAS2764_0DB},
1207 }
1208 };
1209
> 1210 struct macaudio_platform_cfg macaudio_j415_cfg = {
1211 .fixup = macaudio_j314_fixup_controls,
1212 .limits = {
1213 {.match = "* Tweeter Speaker Volume", TAS2764_DB_REDUCTION(20), TAS2764_0DB},
1214 {.match = "* Woofer 1 Speaker Volume", TAS2764_DB_REDUCTION(20), TAS2764_0DB},
1215 {.match = "* Woofer 2 Speaker Volume", TAS2764_DB_REDUCTION(20), TAS2764_0DB},
1216 }
1217 };
1218
1219 static int macaudio_j375_fixup_controls(struct snd_soc_card *card)
1220 {
1221 struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
1222
1223 if (ma->has_speakers) {
1224 if (!please_blow_up_my_speakers) {
1225 dev_err(card->dev, "driver can't assure safety on this model, refusing probe\n");
1226 return -EINVAL;
1227 }
1228
1229 CHECK(snd_soc_limit_volume, "* Amp Gain Volume", 14); // 20 set by macOS, this is 3 dB below
1230
1231 macaudio_vlimit_update(ma);
1232 }
1233
1234 return 0;
1235 }
1236
1237 struct macaudio_platform_cfg macaudio_j375_cfg = {
1238 .fixup = macaudio_j375_fixup_controls,
1239 };
1240
1241 static int macaudio_j493_fixup_controls(struct snd_soc_card *card)
1242 {
1243 struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
1244
1245 if (ma->has_speakers) {
1246 if (!please_blow_up_my_speakers) {
1247 dev_err(card->dev, "driver can't assure safety on this model, refusing probe\n");
1248 return -EINVAL;
1249 }
1250
1251 CHECK(snd_soc_limit_volume, "* Amp Gain Volume", 9); // 15 set by macOS, this is 3 dB below
1252
1253 macaudio_vlimit_update(ma);
1254 }
1255
1256 return 0;
1257 }
1258
> 1259 struct macaudio_platform_cfg macaudio_j493_cfg = {
1260 .fixup = macaudio_j493_fixup_controls
1261 };
1262
1263 static int macaudio_fallback_fixup_controls(struct snd_soc_card *card)
1264 {
1265 struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
1266
1267 if (ma->has_speakers && !please_blow_up_my_speakers) {
1268 dev_err(card->dev, "driver can't assure safety on this model, refusing probe\n");
1269 return -EINVAL;
1270 }
1271
1272 return 0;
1273 }
1274
> 1275 struct macaudio_platform_cfg macaudio_fallback_cfg = {
1276 .fixup = macaudio_fallback_fixup_controls
1277 };
1278
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-11-18 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 9:08 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-30 5:47 [asahilinux:bits/070-audio 65/119] sound/soc/apple/macaudio.c:1111:30: sparse: sparse: symbol 'macaudio_j274_cfg' was not declared. Should it be static? kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202411181709.guPSxho2-lkp@intel.com \
--to=lkp@intel.com \
--cc=j@jannau.net \
--cc=marcan@marcan.st \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.