Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: improve some macro definitions and usages

Merge series from Hongbo Li <lihongbo22@huawei.com>:

Many variable in macro are not used as we used macro_check
script to detect and mamually check, let us address these
issues.

+24 -24
+6 -6
sound/soc/codecs/twl4030.c
··· 555 555 * On unmute: restore the register content from the reg_cache 556 556 * Outputs handled in this way: Earpiece, PreDrivL/R, CarkitL/R 557 557 */ 558 - #define TWL4030_OUTPUT_PGA(pin_name, reg, mask) \ 558 + #define TWL4030_OUTPUT_PGA(pin_name, reg) \ 559 559 static int pin_name##pga_event(struct snd_soc_dapm_widget *w, \ 560 560 struct snd_kcontrol *kcontrol, int event) \ 561 561 { \ ··· 575 575 return 0; \ 576 576 } 577 577 578 - TWL4030_OUTPUT_PGA(earpiece, TWL4030_REG_EAR_CTL, TWL4030_EAR_GAIN); 579 - TWL4030_OUTPUT_PGA(predrivel, TWL4030_REG_PREDL_CTL, TWL4030_PREDL_GAIN); 580 - TWL4030_OUTPUT_PGA(predriver, TWL4030_REG_PREDR_CTL, TWL4030_PREDR_GAIN); 581 - TWL4030_OUTPUT_PGA(carkitl, TWL4030_REG_PRECKL_CTL, TWL4030_PRECKL_GAIN); 582 - TWL4030_OUTPUT_PGA(carkitr, TWL4030_REG_PRECKR_CTL, TWL4030_PRECKR_GAIN); 578 + TWL4030_OUTPUT_PGA(earpiece, TWL4030_REG_EAR_CTL); 579 + TWL4030_OUTPUT_PGA(predrivel, TWL4030_REG_PREDL_CTL); 580 + TWL4030_OUTPUT_PGA(predriver, TWL4030_REG_PREDR_CTL); 581 + TWL4030_OUTPUT_PGA(carkitl, TWL4030_REG_PRECKL_CTL); 582 + TWL4030_OUTPUT_PGA(carkitr, TWL4030_REG_PRECKR_CTL); 583 583 584 584 static void handsfree_ramp(struct snd_soc_component *component, int reg, int ramp) 585 585 {
+7 -7
sound/soc/soc-component.c
··· 58 58 * In such case, we can update these macros. 59 59 */ 60 60 #define soc_component_mark_push(component, substream, tgt) ((component)->mark_##tgt = substream) 61 - #define soc_component_mark_pop(component, substream, tgt) ((component)->mark_##tgt = NULL) 61 + #define soc_component_mark_pop(component, tgt) ((component)->mark_##tgt = NULL) 62 62 #define soc_component_mark_match(component, substream, tgt) ((component)->mark_##tgt == substream) 63 63 64 64 void snd_soc_component_set_aux(struct snd_soc_component *component, ··· 339 339 module_put(component->dev->driver->owner); 340 340 341 341 /* remove the mark from module */ 342 - soc_component_mark_pop(component, mark, module); 342 + soc_component_mark_pop(component, module); 343 343 } 344 344 345 345 int snd_soc_component_open(struct snd_soc_component *component, ··· 370 370 ret = component->driver->close(component, substream); 371 371 372 372 /* remove marked substream */ 373 - soc_component_mark_pop(component, substream, open); 373 + soc_component_mark_pop(component, open); 374 374 375 375 return soc_component_ret(component, ret); 376 376 } ··· 515 515 component->driver->compress_ops->free(component, cstream); 516 516 517 517 /* remove marked substream */ 518 - soc_component_mark_pop(component, cstream, compr_open); 518 + soc_component_mark_pop(component, compr_open); 519 519 } 520 520 EXPORT_SYMBOL_GPL(snd_soc_component_compr_free); 521 521 ··· 1210 1210 } 1211 1211 1212 1212 /* remove marked substream */ 1213 - soc_component_mark_pop(component, substream, hw_params); 1213 + soc_component_mark_pop(component, hw_params); 1214 1214 } 1215 1215 } 1216 1216 ··· 1254 1254 r = soc_component_trigger(component, substream, cmd); 1255 1255 if (r < 0) 1256 1256 ret = r; /* use last ret */ 1257 - soc_component_mark_pop(component, substream, trigger); 1257 + soc_component_mark_pop(component, trigger); 1258 1258 } 1259 1259 } 1260 1260 ··· 1294 1294 pm_runtime_put_autosuspend(component->dev); 1295 1295 1296 1296 /* remove marked stream */ 1297 - soc_component_mark_pop(component, stream, pm); 1297 + soc_component_mark_pop(component, pm); 1298 1298 } 1299 1299 } 1300 1300
+5 -5
sound/soc/soc-dai.c
··· 37 37 * In such case, we can update these macros. 38 38 */ 39 39 #define soc_dai_mark_push(dai, substream, tgt) ((dai)->mark_##tgt = substream) 40 - #define soc_dai_mark_pop(dai, substream, tgt) ((dai)->mark_##tgt = NULL) 40 + #define soc_dai_mark_pop(dai, tgt) ((dai)->mark_##tgt = NULL) 41 41 #define soc_dai_mark_match(dai, substream, tgt) ((dai)->mark_##tgt == substream) 42 42 43 43 /** ··· 416 416 dai->driver->ops->hw_free(substream, dai); 417 417 418 418 /* remove marked substream */ 419 - soc_dai_mark_pop(dai, substream, hw_params); 419 + soc_dai_mark_pop(dai, hw_params); 420 420 } 421 421 422 422 int snd_soc_dai_startup(struct snd_soc_dai *dai, ··· 453 453 dai->driver->ops->shutdown(substream, dai); 454 454 455 455 /* remove marked substream */ 456 - soc_dai_mark_pop(dai, substream, startup); 456 + soc_dai_mark_pop(dai, startup); 457 457 } 458 458 459 459 int snd_soc_dai_compress_new(struct snd_soc_dai *dai, ··· 640 640 r = soc_dai_trigger(dai, substream, cmd); 641 641 if (r < 0) 642 642 ret = r; /* use last ret */ 643 - soc_dai_mark_pop(dai, substream, trigger); 643 + soc_dai_mark_pop(dai, trigger); 644 644 } 645 645 } 646 646 ··· 704 704 dai->driver->cops->shutdown(cstream, dai); 705 705 706 706 /* remove marked cstream */ 707 - soc_dai_mark_pop(dai, cstream, compr_startup); 707 + soc_dai_mark_pop(dai, compr_startup); 708 708 } 709 709 EXPORT_SYMBOL_GPL(snd_soc_dai_compr_shutdown); 710 710
+5 -5
sound/soc/soc-link.c
··· 35 35 * In such case, we can update these macros. 36 36 */ 37 37 #define soc_link_mark_push(rtd, substream, tgt) ((rtd)->mark_##tgt = substream) 38 - #define soc_link_mark_pop(rtd, substream, tgt) ((rtd)->mark_##tgt = NULL) 38 + #define soc_link_mark_pop(rtd, tgt) ((rtd)->mark_##tgt = NULL) 39 39 #define soc_link_mark_match(rtd, substream, tgt) ((rtd)->mark_##tgt == substream) 40 40 41 41 int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd) ··· 94 94 rtd->dai_link->ops->shutdown(substream); 95 95 96 96 /* remove marked substream */ 97 - soc_link_mark_pop(rtd, substream, startup); 97 + soc_link_mark_pop(rtd, startup); 98 98 } 99 99 100 100 int snd_soc_link_prepare(struct snd_pcm_substream *substream) ··· 138 138 rtd->dai_link->ops->hw_free(substream); 139 139 140 140 /* remove marked substream */ 141 - soc_link_mark_pop(rtd, substream, hw_params); 141 + soc_link_mark_pop(rtd, hw_params); 142 142 } 143 143 144 144 static int soc_link_trigger(struct snd_pcm_substream *substream, int cmd) ··· 175 175 break; 176 176 177 177 ret = soc_link_trigger(substream, cmd); 178 - soc_link_mark_pop(rtd, substream, startup); 178 + soc_link_mark_pop(rtd, startup); 179 179 } 180 180 181 181 return ret; ··· 209 209 rtd->dai_link->compr_ops->shutdown) 210 210 rtd->dai_link->compr_ops->shutdown(cstream); 211 211 212 - soc_link_mark_pop(rtd, cstream, compr_startup); 212 + soc_link_mark_pop(rtd, compr_startup); 213 213 } 214 214 EXPORT_SYMBOL_GPL(snd_soc_link_compr_shutdown); 215 215
+1 -1
sound/soc/stm/stm32_sai_sub.c
··· 53 53 #define STM_SAI_PROTOCOL_IS_SPDIF(ip) ((ip)->spdif) 54 54 #define STM_SAI_HAS_SPDIF(x) ((x)->pdata->conf.has_spdif_pdm) 55 55 #define STM_SAI_HAS_PDM(x) ((x)->pdata->conf.has_spdif_pdm) 56 - #define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4(sai->pdata)) 56 + #define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4((x)->pdata)) 57 57 58 58 #define SAI_IEC60958_BLOCK_FRAMES 192 59 59 #define SAI_IEC60958_STATUS_BYTES 24