[opensuse-arm] Pimoroni pHAT DAC on Raspberry Pi 3
Hi All Has anyone had any luck getting Pimoroni accessories such as "pHAT DAC" working on Raspberry Pi 3 under recent opensuse images? This is a PCM5102A DAC connected via I2S interface, the Pimoroni instructions are specific to Raspian. Separately, can anyone advise the latest image (JeOS is fine) that runs OK on the model 3? I've been very happy with JeOS armv6l-2019.07.31-Snapshot20190814 on my model 1B but still using a much older image on the model 3 as nothing I have tried recently will boot. Many thanks -- Richard (MQ) Linux user # 439271 -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi,
-----Original Message----- From: Richard (MQ) <osl2008@gmail.com> Sent: 25 November 2019 11:42 To: opensuse-arm@opensuse.org Subject: [opensuse-arm] Pimoroni pHAT DAC on Raspberry Pi 3
Hi All
Has anyone had any luck getting Pimoroni accessories such as "pHAT DAC" working on Raspberry Pi 3 under recent opensuse images? This is a PCM5102A DAC connected via I2S interface, the Pimoroni instructions are specific to Raspian.
I think you need to create/update /boot/efi/extraconfig.txt file to enable I2S and select the right DAC: dtparam=i2s=on dtoverlay=hifiberry-dacplus
Separately, can anyone advise the latest image (JeOS is fine) that runs OK on the model 3? I've been very happy with JeOS armv6l-2019.07.31-Snapshot20190814 on my model 1B but still using a much older image on the model 3 as nothing I have tried recently will boot.
AArch64 images from latest Tumbleweed snapshot should be fine: http://download.opensuse.org/ports/aarch64/tumbleweed/images/ Cheers, Guillaume
Many thanks -- Richard (MQ) Linux user # 439271 -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. N�����r��y隊Z)z{.�櫛맲��r��z�^�ˬz��N�(�֜��^� ޭ隊Z)z{.�櫛�0�����Ǩ�
On Mon, Nov 25, 2019 at 10:59:01AM +0000, Guillaume Gardet wrote:
Hi,
-----Original Message----- From: Richard (MQ) <osl2008@gmail.com> Sent: 25 November 2019 11:42 To: opensuse-arm@opensuse.org Subject: [opensuse-arm] Pimoroni pHAT DAC on Raspberry Pi 3
Hi All
Has anyone had any luck getting Pimoroni accessories such as "pHAT DAC" working on Raspberry Pi 3 under recent opensuse images? This is a PCM5102A DAC connected via I2S interface, the Pimoroni instructions are specific to Raspian.
I think you need to create/update /boot/efi/extraconfig.txt file to enable I2S and select the right DAC: dtparam=i2s=on dtoverlay=hifiberry-dacplus
Oh yes. And additional pitfalls here are the exact compatible string (there is some variety of these audio hats, with subtle differences) and the DACs/ AMPs i²C address. BTDT. Torsten -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Torsten Duwe wrote:
On Mon, Nov 25, 2019 at 10:59:01AM +0000, Guillaume Gardet wrote:
Hi,
-----Original Message----- From: Richard (MQ) <osl2008@gmail.com> Sent: 25 November 2019 11:42 To: opensuse-arm@opensuse.org Subject: [opensuse-arm] Pimoroni pHAT DAC on Raspberry Pi 3
Hi All
Has anyone had any luck getting Pimoroni accessories such as "pHAT DAC" working on Raspberry Pi 3 under recent opensuse images? This is a PCM5102A DAC connected via I2S interface, the Pimoroni instructions are specific to Raspian.
I think you need to create/update /boot/efi/extraconfig.txt file to enable I2S and select the right DAC: dtparam=i2s=on dtoverlay=hifiberry-dacplus
Oh yes. And additional pitfalls here are the exact compatible string (there is some variety of these audio hats, with subtle differences) and the DACs/ AMPs i²C address. BTDT.
Torsten
Thanks both for quick reply. I've tried the XFCE image from Guillaume's link and indeed it seems good, maybe I was unlucky last time. Nice to be using the latest and greatest again! And I already knew about /boot/efi/extraconfig.txt and had dtoverlay=hifiberry-dacplus to no avail, I have pre-pended dtparam=i2s=on as suggested but still no dice (nothing shows up in hwinfo, nor Yast - Sound Card) @Torsten - please can you advise where to configure the strings and addresses that you mention? Best regards Richard -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Mon, 25 Nov 2019 20:15:26 +0000 Richard MQ <osl2008@gmail.com> wrote:
And I already knew about /boot/efi/extraconfig.txt and had dtoverlay=hifiberry-dacplus to no avail, I have pre-pended dtparam=i2s=on as suggested but still no dice (nothing shows up in hwinfo, nor Yast - Sound Card)
@Torsten - please can you advise where to configure the strings and addresses that you mention?
Accessing the little box, which has been running happily for quite some time now, I hope I can remember the tweaks I had to do back then: It is a RPi Zero W, with a "justboom amp zero" pHAT. The point is, no overlay matched it exactly back then so I chose a compatible chip from the "iqaudio-dac" and fixed the I2C address, IIRC. config.txt has: --------------- dtoverlay=iqaudio-dac dtparam=audio=on dtparam=i2c0=on dtparam=i2c1=on The overlay produces in my fdt: i2c@7e804000 { compatible = "brcm,bcm2708-i2c"; [...] pcm5122@4d { status = "okay"; reg = <0x4d>; compatible = "ti,pcm5122"; #sound-dai-cells = <0x0>; }; The kernel loads snd_soc_pcm512x_i2c and dmesg yields: snd-rpi-iqaudio-dac soc:sound: pcm512x-hifi <-> 20203000.i2s mapping ok hifiberry-dacplus already has an overlay that should work out of the box, in theory. Torsten -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Torsten Duwe wrote:
On Mon, 25 Nov 2019 20:15:26 +0000 Richard MQ <osl2008@gmail.com> wrote:
And I already knew about /boot/efi/extraconfig.txt and had dtoverlay=hifiberry-dacplus to no avail, I have pre-pended dtparam=i2s=on as suggested but still no dice (nothing shows up in hwinfo, nor Yast - Sound Card)
@Torsten - please can you advise where to configure the strings and addresses that you mention?
Accessing the little box, which has been running happily for quite some time now, I hope I can remember the tweaks I had to do back then:
It is a RPi Zero W, with a "justboom amp zero" pHAT. The point is, no overlay matched it exactly back then so I chose a compatible chip from the "iqaudio-dac" and fixed the I2C address, IIRC.
config.txt has: --------------- dtoverlay=iqaudio-dac dtparam=audio=on dtparam=i2c0=on dtparam=i2c1=on
The overlay produces in my fdt: i2c@7e804000 { compatible = "brcm,bcm2708-i2c"; [...] pcm5122@4d { status = "okay"; reg = <0x4d>; compatible = "ti,pcm5122"; #sound-dai-cells = <0x0>; };
The kernel loads snd_soc_pcm512x_i2c and dmesg yields:
snd-rpi-iqaudio-dac soc:sound: pcm512x-hifi <-> 20203000.i2s mapping ok
hifiberry-dacplus already has an overlay that should work out of the box, in theory.
Thanks Torsten, Am I right in thinking I need "fdtdump" (or is it "dtoverlay"?) to see the fdt? I seem to be lacking the key tools to debug this, and can't work out where to get them. Please can anyone point me at a source for "fdtdump", "vcdbg", "dtoverlay" etc as "zypper se", googling for e.g. "opensuse raspberry vcdbg" are not giving me anything useful. Also I clearly need to bone up on the device tree implementation. I have been reading https://www.raspberrypi.org/documentation/configuration/device-tree.md but if anything I think I am more confused than ever! Is there a better intro? Thanks again both for your help Best regards Richard -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 27/11/2019 21:59, Richard MQ wrote:
Torsten Duwe wrote:
On Mon, 25 Nov 2019 20:15:26 +0000 Richard MQ <osl2008@gmail.com> wrote:
And I already knew about /boot/efi/extraconfig.txt and had dtoverlay=hifiberry-dacplus to no avail, I have pre-pended dtparam=i2s=on as suggested but still no dice (nothing shows up in hwinfo, nor Yast - Sound Card)
@Torsten - please can you advise where to configure the strings and addresses that you mention?
Accessing the little box, which has been running happily for quite some time now, I hope I can remember the tweaks I had to do back then:
It is a RPi Zero W, with a "justboom amp zero" pHAT. The point is, no overlay matched it exactly back then so I chose a compatible chip from the "iqaudio-dac" and fixed the I2C address, IIRC.
config.txt has: --------------- dtoverlay=iqaudio-dac dtparam=audio=on dtparam=i2c0=on dtparam=i2c1=on
The overlay produces in my fdt: i2c@7e804000 { compatible = "brcm,bcm2708-i2c"; [...] pcm5122@4d { status = "okay"; reg = <0x4d>; compatible = "ti,pcm5122"; #sound-dai-cells = <0x0>; }; The kernel loads snd_soc_pcm512x_i2c and dmesg yields:
snd-rpi-iqaudio-dac soc:sound: pcm512x-hifi <-> 20203000.i2s mapping ok
hifiberry-dacplus already has an overlay that should work out of the box, in theory.
Thanks Torsten,
Am I right in thinking I need "fdtdump" (or is it "dtoverlay"?) to see the fdt? I seem to be lacking the key tools to debug this, and can't work out where to get them. Please can anyone point me at a source for "fdtdump", "vcdbg", "dtoverlay" etc as "zypper se", googling for e.g. "opensuse raspberry vcdbg" are not giving me anything useful.
There are two ways. You can use dtc tool (zypper in dtc). To see the device-tree use: dtc -I dtb -O dts /path/to/your/device-tree.dtb or dtc -I fs -O dts /proc/device-tree You can also use U-Boot to read the device tree, I suppose through this: fdt addr $fdtcontroladdr fdt list <your path or empty> fdt print
Also I clearly need to bone up on the device tree implementation. I have been reading https://www.raspberrypi.org/documentation/configuration/device-tree.md but if anything I think I am more confused than ever! Is there a better intro?
Have a look on the device-tree for dummies presentation and slides: https://www.youtube.com/watch?v=m_NyYEBxfn8 https://elinux.org/images/f/f9/Petazzoni-device-tree-dummies_0.pdf I find them very helpfull. Regards, Matthias -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
I much appreciated https://elinux.org/images/f/f9/Petazzoni-device-tree-dummies_0.pdf Thanks! I have put in /boot/efi/extraconfig.txt dtoverlay=hifiberry-dacplus dtparam=audio=on dtdebug=1 <- this seems to be ignored. Where is the log file? dtparam=i2s=on and the fdt (examined using "dtc -I fs -O dts /proc/device-tree" - thanks Matthias) gives very much the same as you have: sound { i2s-controller = <0x24>; compatible = "hifiberry,hifiberry-dacplus"; status = "okay"; phandle = <0x79>; }; ... pcm5122@4d { AVDD-supply = <0x7c>; CPVDD-supply = <0x7c>; DVDD-supply = <0x7c>; clocks = <0x7e>; #sound-dai-cells = <0x00>; compatible = "ti,pcm5122"; status = "okay"; reg = <0x4d>; }; ... All looks OK but dmesg gives: pcm512x 1-004d: Failed to reset device: -121 pcm512x: probe of 1-004d failed with error -121 Is this because I have a pcm5102 not a 5122? Or just that the address (0x4d) is incorrect? Any pointers gratefully received - and thanks for your patience! BR Richard -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Montag, 2. Dezember 2019 22:02:38 CET Richard MQ wrote:
Is this because I have a pcm5102 not a 5122? Or just that the address (0x4d) is incorrect?
A short glimpse at the datasheet reveals the pcm510x is dumb and has no I2C interface at all. Just use the hifiberry-dac DT overlay contents, look for the hifiberry-dac- overlay.dts Kind regards, Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019
On Tue, 3 Dec 2019 00:40:29 +0100 Stefan Brüns <stefan.bruens@rwth-aachen.de> wrote:
On Montag, 2. Dezember 2019 22:02:38 CET Richard MQ wrote:
Is this because I have a pcm5102 not a 5122? Or just that the address (0x4d) is incorrect?
A short glimpse at the datasheet reveals the pcm510x is dumb and has no I2C interface at all.
Just use the hifiberry-dac DT overlay contents, look for the hifiberry-dac- overlay.dts
And https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install says: " #dtparam=audio=on " Torsten -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 04/12/2019 23:03, Torsten Duwe wrote:
On Tue, 3 Dec 2019 00:40:29 +0100 Stefan Brüns <stefan.bruens@rwth-aachen.de> wrote:
Just use the hifiberry-dac DT overlay contents, look for the hifiberry-dac- overlay.dts
And https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install says: " #dtparam=audio=on "
Torsten
Thanks Both Looking at hifiberry-dac-overlay.dts, it specifies i2s-controller interface and pcm5102a-codec I have added i2s to extraconfig.txt with "dtparam=i2s=on" There is no line starting "dtparam=audio=" in either config.txt or extraconfig.txt, so tried with (and without) "dtparam=audio=off" I now have in /boot/efi/extraconfig.txt: dtparam=audio=off dtparam=i2s=on dtoverlay=hifiberry-dac None of these lead to anything visible in dmesg or /proc/sound (other than vc4-hdmi-hifi-0 device) Should I have a module named "pcm5102a" or similar? I see there is a file "pcm5102a.c" under sound/soc/codecs/ in the kernel source, and it seems to be 'live' in both Kconfig and makefile, but no module with 5102 in the name. As far as I can see, TI SOC support is enabled in "make menuconfig". As always, I am grateful for any more suggestions please... Thanks Richard -- Richard (MQ) Linux user # 439271 -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (6)
-
Guillaume Gardet
-
Matthias Brugger
-
Richard (MQ)
-
Richard MQ
-
Stefan Brüns
-
Torsten Duwe