respeaker / seeed-voicecard

2 Mic Hat, 4 Mic Array, 6-Mic Circular Array Kit, and 4-Mic Linear Array Kit for Raspberry Pi
GNU General Public License v3.0
481 stars 291 forks source link

[Bug]: Kernel 5.10.92-v7+ "set_params:1403: Unable to install hw params:" #322

Closed furkanbalikci closed 2 years ago

furkanbalikci commented 2 years ago

Hello, I am using RPi 3A+ for my seeed voicecard. My kernel verison is 5.10.92. When I doing standart installation like in this link: https://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT_Raspberry/ (I also tried @HinTak repostiroy.) kernel verison upgrading to 5.15.32.
After reboot, arecord -l result: List of CAPTURE Hardware Devices card 2: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0

After that when try record a sound with, arecod -f cd -Dhw:2 test.wav result: Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: set_params:1407: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 44100 PERIOD_TIME: (125011 125012) PERIOD_SIZE: 5513 PERIOD_BYTES: 22052 PERIODS: 4 BUFFER_TIME: (500045 500046) BUFFER_SIZE: 22052 BUFFER_BYTES: 88208 TICK_TIME: 0

Also my dmesg result: [ 11.094414] lo ate my IP address [ 11.367241] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2c@7e804000/status [ 11.592147] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/status [ 11.765421] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2s@7e203000/status [ 11.765518] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2c@7e804000/status [ 11.765558] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/sound/compatible [ 11.765573] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/sound/simple-audio-card,format [ 11.765587] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/sound/simple-audio-card,name [ 11.765601] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/sound/status [ 11.765615] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/sound/simple-audio-card,widgets [ 11.765631] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/sound/simple-audio-card,routing [ 11.944902] usbcore: registered new interface driver usbserial_generic [ 11.944964] usbserial: USB Serial support registered for generic [ 12.123865] lo ate my IP address [ 12.124188] lo ate my IP address [ 14.154431] lo ate my IP address [ 15.305363] lo ate my IP address [ 15.305515] lo ate my IP address [ 15.544788] ieee80211 phy0: brcmf_vif_set_mgmt_ie: vndr ie set error : -52 [ 19.189690] lo ate my IP address [ 19.190031] lo ate my IP address [ 20.192352] lo ate my IP address [ 20.192511] lo ate my IP address [ 22.194550] lo ate my IP address [ 22.194730] lo ate my IP address [ 33.129832] cam-dummy-reg: disabling [ 173.398743] wm8960 1-001a: failed to configure clock [ 173.398782] wm8960 1-001a: ASoC: error at snd_soc_dai_hw_params on wm8960-hifi: -22 [ 173.398845] bcm2835-i2s-wm8960-hifi: ASoC: soc_pcm_hw_params() failed (-22)

if you need all of the logs i can add all of them. Its really urgent matter, I am waiting for your replies.

Thank you for your time already.

Expected behavior

I need one of this two things:

  1. How can I fix over kernel 5.15.32?
  2. How can I install driver with not upgrading. (using kernel 5.10.92)

Platform

Relevant log output

DKMS make.log for seeed-voicecard-0.3 for kernel 5.15.32-v7+ (armv7l) Wed 13 Apr 15:50:32 +03 2022 make: Entering directory '/usr/src/linux-headers-5.15.32-v7+' CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_dai_link_of’: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:463:8: error: implicit declaration of function ‘asoc_simple_parse_cpu’; did you mean ‘asoc_simple_parse_clk’? [-Werror=implicit-function-declaration] 463 ret = asoc_simple_parse_cpu(cpu, dai_link, &single_cpu); ^~~~~ asoc_simple_parse_clk /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:468:8: error: implicit declaration of function ‘asoc_simple_parse_codec’; did you mean ‘asoc_simple_parse_dai’? [-Werror=implicit-function-declaration] 468 ret = asoc_simple_parse_codec(codec, dai_link); ^~~~~~~ asoc_simple_parse_dai /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:480:8: error: implicit declaration of function ‘asoc_simple_parse_platform’; did you mean ‘asoc_simple_parse_daifmt’? [-Werror=implicit-function-declaration] 480 ret = asoc_simple_parse_platform(plat, dai_link); ^~~~~~ asoc_simple_parse_daifmt /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:505:8: error: implicit declaration of function ‘asoc_simple_parse_clk_cpu’; did you mean ‘asoc_simple_parse_clk’? [-Werror=implicit-function-declaration] 505 ret = asoc_simple_parse_clk_cpu(dev, cpu, dai_link, cpu_dai); ^~~~~~~~~ asoc_simple_parse_clk /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:513:8: error: implicit declaration of function ‘asoc_simple_parse_clk_codec’; did you mean ‘asoc_simple_parse_clk’? [-Werror=implicit-function-declaration] 513 ret = asoc_simple_parse_clk_codec(dev, codec, dai_link, codec_dai); ^~~~~~~ asoc_simple_parse_clk /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:546:31: error: passing argument 1 of ‘asoc_simple_canonicalize_cpu’ from incompatible pointer type [-Werror=incompatible-pointer-types] 546 asoc_simple_canonicalize_cpu(dai_link, single_cpu); ^~~~
struct snd_soc_dai_link *
In file included from /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:28: ./include/sound/simple_card_utils.h:158:70: note: expected ‘struct snd_soc_dai_link_component ’ but argument is of type ‘struct snd_soc_dai_link ’ 158 void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, ~~~~~~~^~~~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:548:36: error: passing argument 1 of ‘asoc_simple_canonicalize_platform’ from incompatible pointer type [-Werror=incompatible-pointer-types] 548 asoc_simple_canonicalize_platform(dai_link); ^~~~
struct snd_soc_dai_link *

In file included from /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:28: ./include/sound/simple_card_utils.h:156:75: note: expected ‘struct snd_soc_dai_link_component ’ but argument is of type ‘struct snd_soc_dai_link ’ 156 | void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component platforms, | ~~~~~~~^~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:548:2: error: too few arguments to function ‘asoc_simple_canonicalize_platform’ 548 | asoc_simple_canonicalize_platform(dai_link); | ^~~~~~~~~ In file included from /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:28: ./include/sound/simple_card_utils.h:156:6: note: declared here 156 | void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component platforms, | ^~~~~~~~~ At top level: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:263:12: warning: ‘asoc_simple_parse_dai’ defined but not used [-Wunused-function] 263 | static int asoc_simple_parse_dai(struct device_node *node, | ^~~~~ cc1: some warnings being treated as errors make[1]: [scripts/Makefile.build:277: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o] Error 1 make[1]: Waiting for unfinished jobs.... make: *** [Makefile:1868: /var/lib/dkms/seeed-voicecard/0.3/build] Error 2 make: Leaving directory '/usr/src/linux-headers-5.15.32-v7+'

hellow554 commented 2 years ago

Can you try out #323 and see if it works for you?

HinTak commented 2 years ago

See my comment in #323 - I don't think the change is relevant.

hellow554 commented 2 years ago

The log under "relevant log output" is the compiler error I got, so I thought this will solve his issue as well.

HinTak commented 2 years ago

5.10.92-v7+ is supported by the current upstream I think; if there is any compiler errors at all that means the driver does not get built, so the device is not expected to work at all...

furkanbalikci commented 2 years ago

Hi guys, sorry for late answer. I solved this problem using kernel version 5.10.103-v7l+. Unfortunately, I don't have the environment and time to try your solution suggestion. Thank you for your interest and answers.

jumper047 commented 2 years ago

I think issue should remain opened because the bug is still there, though you luckily solved it for yourself:)

furkanbalikci commented 2 years ago

Maybe you are right :) but unfortunately I don't think this bug will be fixed in this issue. Because it was answered late and not clear. Similar issues have already been opened, I think those who can't find a solution can try my way by checking the closed issues at least.