0

I looked a bit into the device tree of Raspbian 9 on Raspberry Pi 3, using:

dtc -I fs /proc/device-tree > myrpi-dev-tree.txt 2>&1

I've noticed there is a node called audio:

audio {
        brcm,pwm-channels = <0x8>;
        compatible = "brcm,bcm2835-audio";
        status = "okay";
        phandle = <0x25>;
        pinctrl-0 = <0x1c>;
        pinctrl-names = "default";
};

... which apparently handles the default audio on the Raspberry Pi 3 - I guess, that would be the card shown as "bcm2835 ALSA":

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

However, there is also a sound node:

sound {
        status = "disabled";
        phandle = <0x72>;
};

... which is disabled, with not much in it.

As far as I can tell from what I've read on the net, nodes are (in principle) arbitrarily named in a device tree.

However, for me, sound and audio (just as plain English words) are more or less synonyms in context of software.

So, why are there two device nodes for sound/audio? Why didn't the developers simply use just one (and call it either sound or audio)? Is it a convention (of either Linux device tree - or of Raspberry Pi systems) - or is there another meaning/intent behind usage of two nodes thus named?

  • 1
    According to /boot/overlays/README there is no overlay sound available. Maybe you have found an only internal node in the device tree? – Ingo May 2 '18 at 18:48
  • Many thanks @Ingo - well, that is what I observe after boot; and then I can also see hifiberry-dacplus-overlay.dts uses target = <&sound>; to overlay that node, so it must have some sort of a meaning ?! – sdaau May 3 '18 at 17:52
  • 1
    Sorry, but I'm not familiar with the internals of device trees. My "cookbook" is that /boot/overlays/README and there is a some sections for hifiberry including hifiberry-dacplus. – Ingo May 3 '18 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.