make 出現 snd_sunxi_dmic 錯誤 !
-
CC sound/soc/sunxi_v2/snd_sunxi_pcm.o CC sound/soc/sunxi_v2/snd_sunxi_dmic.o In file included from sound/soc/sunxi_v2/snd_sunxi_dmic.c:32: sound/soc/sunxi_v2/snd_sunxi_dmic.h:173:24: error: field 'clk' has incomplete type struct sunxi_dmic_clk clk; ^~~ sound/soc/sunxi_v2/snd_sunxi_dmic.c: In function 'sunxi_dmic_dai_set_pll': sound/soc/sunxi_v2/snd_sunxi_dmic.c:107:6: error: implicit declaration of function 'snd_sunxi_clk_rate'; did you mean 'snd_sunxi_echo_reg'? [-Werror=implicit-function-declaration] if (snd_sunxi_clk_rate(clk, freq_in, freq_out)) { ^~~~~~~~~~~~~~~~~~ snd_sunxi_echo_reg sound/soc/sunxi_v2/snd_sunxi_dmic.c: In function 'sunxi_dmic_component_suspend': sound/soc/sunxi_v2/snd_sunxi_dmic.c:490:2: error: implicit declaration of function 'snd_sunxi_clk_disable'; did you mean 'clk_bulk_disable'? [-Werror=implicit-function-declaration] snd_sunxi_clk_disable(clk); ^~~~~~~~~~~~~~~~~~~~~ clk_bulk_disable sound/soc/sunxi_v2/snd_sunxi_dmic.c: In function 'sunxi_dmic_component_resume': sound/soc/sunxi_v2/snd_sunxi_dmic.c:504:8: error: implicit declaration of function 'snd_sunxi_clk_enable'; did you mean 'snd_sunxi_echo_reg'? [-Werror=implicit-function-declaration] ret = snd_sunxi_clk_enable(clk); ^~~~~~~~~~~~~~~~~~~~ snd_sunxi_echo_reg sound/soc/sunxi_v2/snd_sunxi_dmic.c: In function 'sunxi_dmic_dev_probe': sound/soc/sunxi_v2/snd_sunxi_dmic.c:878:8: error: implicit declaration of function 'snd_sunxi_clk_init'; did you mean 'snd_sunxi_pin_init'? [-Werror=implicit-function-declaration] ret = snd_sunxi_clk_init(pdev, clk); ^~~~~~~~~~~~~~~~~~ snd_sunxi_pin_init sound/soc/sunxi_v2/snd_sunxi_dmic.c:922:2: error: implicit declaration of function 'snd_sunxi_clk_exit'; did you mean 'snd_sunxi_mem_exit'? [-Werror=implicit-function-declaration] snd_sunxi_clk_exit(clk); ^~~~~~~~~~~~~~~~~~ snd_sunxi_mem_exit cc1: some warnings being treated as errors make[9]: *** [sound/soc/sunxi_v2/snd_sunxi_dmic.o] Error 1
-
@jerryliu
發現在 snd_sunxi_dmic.h 中,少了宣告 struct sunxi_dmic_clk ??struct sunxi_dmic_mem {
struct resource res;
void __iomem *membase;
struct resource *memregion;
struct regmap *regmap;
};struct sunxi_dmic_pinctl {
struct pinctrl *pinctrl;
struct pinctrl_state *pinstate;
struct pinctrl_state *pinstate_sleep;bool pinctrl_used;
};
struct sunxi_dmic_dts {
/* value must be (2^n)Kbyte */
size_t capture_cma;
size_t capture_fifo_size;unsigned int rx_chmap; unsigned int data_vol; unsigned int rx_dtime; /* components func -> rx_sync */ bool rx_sync_en; /* read from dts */ bool rx_sync_ctl; int rx_sync_id; rx_sync_domain_t rx_sync_domain;
};
struct sunxi_dmic {
struct platform_device *pdev;struct sunxi_dmic_mem mem; struct sunxi_dmic_clk clk; struct sunxi_dmic_pinctl pin; struct sunxi_dmic_dts dts; struct sunxi_dma_params capture_dma_param;
};
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号