Pisound on Pi 5

Open
#5,741 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux

Research direction

Start at the snd_soc_pisound registration path and the designware-i2s error shown in the report, then compare the dtoverlay=pisound,master and HAT EEPROM boot paths on Pi 5. Done means Pisound boots attached, registers successfully without the manual detach and modprobe sequence, and appears in amidi -l, aplay -l, and arecord -l.

Written by the indexing model from the issue text.

Description

Describe the bug

Pisound is the I²S master, the default eeprom dt overlay we shipped it with is not working on Pi 5.

I've noticed issue #5724, and based on it I found that doing this procedure manages to load the driver and register the card successfully, the card then is usable:

  1. Add dtoverlay=pisound,master in /boot/config.txt.
  2. Power up Pi 5 without Pisound attached, to skip loading its hat eeprom.
  3. Run sudo modprobe -r snd_soc_pisound to unload the Pisound's driver (as it obviously failed to load without Pisound attached).
  4. Carefully attach Pisound on powered on Pi 5.
  5. Run sudo modprobe snd_soc_pisound to load the Pisound's driver, it loads ok this time.
  6. Check amidi -l, aplay -l, arecord -l - it's listed as expected.

Quick tests indicate that Pisound is fully operational once the driver manages to register the card.

Powering on the Pi 5 without Pisound attached, but with the dtoverlay line in config.txt, is necessary, otherwise the system does not boot at all when the hat eeprom is available, and the dtoverlay line for the same hat is there.

What should be done to make Pisound working on Pi 5 right out of the box?

Steps to reproduce the behaviour

Have Pisound attached as normal, the driver fails to register the card:

[    3.200062] pisound: Detected Pisound card:
[    3.200072] pisound:         Serial:           PS-3...
[    3.200075] pisound:         Firmware Version: 1.03
[    3.200078] pisound:         Hardware Version: 1.1
[    3.200081] pisound:         Id:               ...
[    3.200622] designware-i2s 1f000a0000.i2s: ASoC: error at snd_soc_dai_set_fmt on 1f000a0000.i2s: -22
[    3.203481] pisound: snd_soc_register_card() failed: -22
Device (s)

Other

System
Raspberry Pi reference 2023-10-10
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 962bf483c8f326405794827cce8c0313fd5880a8, stage4

2023/10/30 16:45:10
Copyright (c) 2012 Broadcom
version 30de0ba5 (release) (embedded)

Linux raspberrypi 6.1.0-rpi4-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux
Logs

No response

Additional context

p.s. when reporting the issue I didn't find Pi 5 option in the devices list. :)

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.