Message ID | 20210803125411.28066-1-srinivas.kandagatla@linaro.org |
---|---|
Headers | show |
Series | ASoC: qcom: Add AudioReach support | expand |
Thanks Amadeusz for review, On 03/08/2021 15:19, Amadeusz Sławiński wrote: > On 8/3/2021 2:54 PM, Srinivas Kandagatla wrote: >> Add basic helper functions for AudioReach. >> >> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> >> --- > > ... > >> + >> +#define APM_PARAM_ID_GAIN 0x08001006 >> +struct param_id_gain_cfg { >> + uint16_t gain; >> + uint16_t reserved; >> +}; >> + >> +#define PARAM_ID_PCM_OUTPUT_FORMAT_CFG 0x08001008 >> +struct param_id_pcm_output_format_cfg { >> + uint32_t data_format; >> + uint32_t fmt_id; >> + uint32_t payload_size; >> +} __packed; >> + >> +struct payload_pcm_output_format_cfg { >> + uint16_t bit_width; >> + uint16_t alignment; >> + uint16_t bits_per_sample; >> + uint16_t q_factor; >> + uint16_t endianness; >> + uint16_t interleaved; >> + uint16_t reserved; >> + uint16_t num_channels; >> + uint8_t channel_mapping[0]; > > Current kernel convention is to use something like: > uint8_t channel_mapping[]; > for flexible arrays. > I've pointed out few more later, but it would be best to run some kind > of search to find them all in all files in patchset. I agree, will search and fix such instances. --srini
Hi Pierre, Thanks, I did run cppcheck --enable=all before sending this out, On 03/08/2021 16:00, Pierre-Louis Bossart wrote: > There are quite a few cppcheck warnings due to unnecessary > initializations for loop variables, see suggested patch below. > > And a number of renames that were missed. > > cppcheck --platform=unix64 --force --max-configs=1024 --inconclusive > --enable=all --suppress=variableScope --suppress=shiftTooManyBitsSigned > --suppress=arithOperationsOnVoidPointer --suppress=bitwiseOnBoolean > sound/soc/qcom/qdsp6/ I will try these ones and fix all the warnings before next spin! --srini > > > Checking sound/soc/qcom/qdsp6/audioreach.c ... > sound/soc/qcom/qdsp6/audioreach.c:248:32: style:inconclusive: Function > 'audioreach_alloc_pkt' argument 1 names different: declaration > 'pkt_size' definition 'payload_size'. [funcArgNamesDifferent] > void *audioreach_alloc_pkt(int payload_size, uint32_t opcode, > ^ > sound/soc/qcom/qdsp6/audioreach.h:657:32: note: Function > 'audioreach_alloc_pkt' argument 1 names different: declaration > 'pkt_size' definition 'payload_size'. > void *audioreach_alloc_pkt(int pkt_size, uint32_t opcode, uint32_t token, > ^ > sound/soc/qcom/qdsp6/audioreach.c:248:32: note: Function > 'audioreach_alloc_pkt' argument 1 names different: declaration > 'pkt_size' definition 'payload_size'. > void *audioreach_alloc_pkt(int payload_size, uint32_t opcode, > ^ > sound/soc/qcom/qdsp6/audioreach.c:265:36: style:inconclusive: Function > 'audioreach_alloc_cmd_pkt' argument 1 names different: declaration > 'pkt_size' definition 'payload_size'. [funcArgNamesDifferent] > void *audioreach_alloc_cmd_pkt(int payload_size, uint32_t opcode, > ^ > sound/soc/qcom/qdsp6/audioreach.h:653:36: note: Function > 'audioreach_alloc_cmd_pkt' argument 1 names different: declaration > 'pkt_size' definition 'payload_size'. > void *audioreach_alloc_cmd_pkt(int pkt_size, uint32_t opcode, uint32_t > token, > ^ > sound/soc/qcom/qdsp6/audioreach.c:265:36: note: Function > 'audioreach_alloc_cmd_pkt' argument 1 names different: declaration > 'pkt_size' definition 'payload_size'. > void *audioreach_alloc_cmd_pkt(int payload_size, uint32_t opcode, > ^ > sound/soc/qcom/qdsp6/q6apm.c:326:16: style:inconclusive: Function > 'q6apm_map_memory_regions' argument 4 names different: declaration > 'bufsz' definition 'period_sz'. [funcArgNamesDifferent] > size_t period_sz, unsigned int periods) > ^ > sound/soc/qcom/qdsp6/q6apm.h:137:16: note: Function > 'q6apm_map_memory_regions' argument 4 names different: declaration > 'bufsz' definition 'period_sz'. > size_t bufsz, unsigned int bufcnt); > ^ > sound/soc/qcom/qdsp6/q6apm.c:326:16: note: Function > 'q6apm_map_memory_regions' argument 4 names different: declaration > 'bufsz' definition 'period_sz'. > size_t period_sz, unsigned int periods) > ^ > sound/soc/qcom/qdsp6/q6apm.c:326:40: style:inconclusive: Function > 'q6apm_map_memory_regions' argument 5 names different: declaration > 'bufcnt' definition 'periods'. [funcArgNamesDifferent] > size_t period_sz, unsigned int periods) > ^ > sound/soc/qcom/qdsp6/q6apm.h:137:36: note: Function > 'q6apm_map_memory_regions' argument 5 names different: declaration > 'bufcnt' definition 'periods'. > size_t bufsz, unsigned int bufcnt); > ^ > sound/soc/qcom/qdsp6/q6apm.c:326:40: note: Function > 'q6apm_map_memory_regions' argument 5 names different: declaration > 'bufcnt' definition 'periods'. > size_t period_sz, unsigned int periods) > ^ > sound/soc/qcom/qdsp6/q6apm.c:471:35: style:inconclusive: Function > 'q6apm_write_async' argument 5 names different: declaration 'flags' > definition 'wflags'. [funcArgNamesDifferent] > uint32_t lsw_ts, uint32_t wflags) > ^ > sound/soc/qcom/qdsp6/q6apm.h:131:36: note: Function 'q6apm_write_async' > argument 5 names different: declaration 'flags' definition 'wflags'. > uint32_t lsw_ts, uint32_t flags); > ^ > sound/soc/qcom/qdsp6/q6apm.c:471:35: note: Function 'q6apm_write_async' > argument 5 names different: declaration 'flags' definition 'wflags'. > uint32_t lsw_ts, uint32_t wflags) > ^ > > Checking sound/soc/qcom/qdsp6/q6prm.c ... > sound/soc/qcom/qdsp6/q6prm.c:158:63: style:inconclusive: Function > 'q6prm_set_lpass_clock' argument 3 names different: declaration 'attri' > definition 'clk_attr'. [funcArgNamesDifferent] > int q6prm_set_lpass_clock(struct device *dev, int clk_id, int clk_attr, > ^ > sound/soc/qcom/qdsp6/q6prm.h:72:63: note: Function > 'q6prm_set_lpass_clock' argument 3 names different: declaration 'attri' > definition 'clk_attr'. > int q6prm_set_lpass_clock(struct device *dev, int clk_id, int attri, > ^ > sound/soc/qcom/qdsp6/q6prm.c:158:63: note: Function > 'q6prm_set_lpass_clock' argument 3 names different: declaration 'attri' > definition 'clk_attr'. > int q6prm_set_lpass_clock(struct device *dev, int clk_id, int clk_attr, > ^ >
On Tue, Aug 03, 2021 at 01:54:03PM +0100, Srinivas Kandagatla wrote: > + enum: > + - qcom,q6afe-clocks > + - qcom,q6prm-clocks Again, what do these mean? One of the goals with DT bindings documentation is to be able to relate hardware to bindings.