Pi 5: TLV320AIC3104 (ReSpeaker 2-Mics HAT V2.0) PCM open() returns EINVAL on 6.18.50, works on 6.18.39
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c, linux
调研方向
Start by comparing the 6.18.39 and 6.18.50 changes under sound/soc/dwc, especially d1140e16d6, which the report identifies as a possible cause. Reproduce with the listed arecord command on both kernels, then investigate why opening the PCM device returns EINVAL on 6.18.50. Done when capture and playback PCM devices open on the newer kernel.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
After upgrading from 1:6.18.39-1+rpt1 to 1:6.18.50-1+rpt1 (linux-image-6.18.50+rpt-rpi-2712), opening either PCM of an I2S sound card on RP1 fails with EINVAL. The card is a TLV320AIC3104 codec on a simple-audio-card. Both capture and playback fail, raw hw: included. The card still enumerates normally in /proc/asound/cards, and the kernel logs nothing when the open fails.
Booting the 6.18.39 kernel again, with the same rootfs, overlay and userspace (config.txt differs only in the kernel=/initramfs lines), fixes it completely.
Steps to reproduce
- Pi 5 with a Seeed ReSpeaker 2-Mics Pi HAT V2.0 (TLV320AIC3104 at i2c-1
0x18),dtoverlay=respeaker-2mic-v2_0. The overlay is compiled from Seeed'srespeaker-2mic-v2_0-overlay.dtsand is unchanged between the two kernels. - Boot
6.18.50+rpt-rpi-2712. - Run
arecord -D hw:CARD=seeed2micvoicec,DEV=0 -f S16_LE -c 2 -r 48000 -d 1 /dev/null
On 6.18.50:
arecord: main:850: audio open error: Invalid argument
The same happens at -r 16000, through plughw:, and with aplay (playback).
strace shows that the syscall itself is what fails, not alsa-lib:
openat(AT_FDCWD, "/dev/snd/pcmC0D0c", O_RDWR|O_NONBLOCK|O_CLOEXEC) = -1 EINVAL (Invalid argument)
Nothing holds the device (lsof /dev/snd/* is empty), /proc/asound/card0/pcm0c/sub0/status reads closed, and dmesg is empty after the attempt.
Expected behaviour
The PCM opens, as it does on 6.18.39. On 6.18.39 the same command records, playback works, and with capture running at 16 kHz aplay --dump-hw-params reports FORMAT: S16_LE S24_LE S32_LE, CHANNELS: 2, RATE: 16000 (the rate is limited by the running capture stream).
Possible cause (not verified)
The only change under sound/soc/dwc between the two builds appears to be d1140e16d6 "ASoC: dwc: Raise sample rate limit to 768kHz", which changes dw_configure_dai_by_dt() from SNDRV_PCM_RATE_8000_384000 to SNDRV_PCM_RATE_8000_768000. I haven't built a kernel with it reverted, so this is only a suspect. 6.18.50 also contains stable merges that I haven't ruled out. 8946ad8626 ("Revert i2s_stop to the upstream version") is not in 6.18.50.
I'm happy to test a build with d1140e16d6 reverted, or an rpi-update kernel, if that helps.
Device (s)
Raspberry Pi 5
System
- Raspberry Pi 5 Model B Rev 1.0
- Raspberry Pi OS (trixie), 64-bit
- Bad:
Linux 6.18.50+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.18.50-1+rpt1(Linux commit cff533aec2fa) - Good:
Linux 6.18.39+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.18.39-1+rpt1 (2026-07-29) - Firmware:
2026/09/25 15:59:09, version1accd665 (release) (embedded) - Other: an out-of-tree Hailo PCIe driver (
hailo1x_pci) is loaded on both kernels. It does not touch audio.
Logs
dmesg shows nothing at open time. On both kernels, boot shows the codec and card probing normally, and the card appears in /proc/asound/cards as 0 [seeed2micvoicec]: simple-card - seeed2micvoicec.
Additional context
Workaround: pin the old kernel in config.txt with kernel=kernel_2712-6.18.39.img and initramfs initramfs_2712-6.18.39 followkernel, using copies of the 6.18.39 files.
- 主要语言
- C
- 星标
- 13.2k
- 派生
- 5.5k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 20
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
raspberrypi/linux 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
raspberrypi/linux#7415 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app未关闭
难度 2/5 1-3 小时 新手友好度 72/100
raspberrypi/linux#7399 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
raspberrypi/linux#7357 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
raspberrypi/linux#7054 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 34/100
raspberrypi/linux#7679 ·
维护者通常 1 天内回复
查看 raspberrypi/linux 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
ARM-software/CMSIS-DSP#354 ·
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 76/100
ai-quokka-wannabe/link#40 ·
-
Add `pdfcpu` to the pantry可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
eunomia-bpf/agentsight#240 ·
维护者通常 1 天内回复