FydeOS / chromium_os-raspberry_pi

Build your Chromium OS for Raspberry Pi 4B, Pi400 and the latest Raspberry Pi 5
https://chromiumos.io
BSD 2-Clause "Simplified" License
1.69k stars 192 forks source link

[Issue report] chromiumos_image_r86r1-rpi4b not work HDMI audio on RPi4, but fixed #109

Open osakanataro opened 3 years ago

osakanataro commented 3 years ago

Describe the bug or issue chromiumos_image_r86r1-rpi4b not work HDMI audio on RPi4 But, I tried to change cmdlist.txt, then worked HDMI audio

Describe your setup

To Reproduce I add string "snd_bcm2835.enable_compat_alsa=1" to cmdlist.txt.

chronos@localhost ~ $ sudo mount /dev/mmcblk0p12 /mnt chronos@localhost ~ $ cat /mnt/cmdline.txt coherent_pool=6M smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=serial0,115200 earlyprintk=serial0,115200 log_level=7 root=/dev/mmcblk0p3 rootfstype=ext2 rootwait ro cros_debug cros_secure elevator=deadline snd_bcm2835.enable_compat_alsa=1 chronos@localhost ~ $

But worked only left microHDMI.

TDI4 commented 3 years ago

Same happened with me. Just flashed that build today, and no sound on HDMI, only analog output works. Where can I find cmdlist.txt?

osakanataro commented 3 years ago

cmdlist.txt was found on mmcblk0p12 partition. But this partition not mount.

  1. login
  2. Ctrl-Alt-T open a shell tab
  3. type "shell" to run bash 4-1. mount EFI partition, "sudo mount /dev/mmcblk0p12 /mnt"
    chronos@localhost ~ $ sudo mount /dev/mmcblk0p12  /mnt
    chronos@localhost ~ $

4-2. mount check, exec "ls /mnt" output as follows

chronos@localhost / $ ls /mnt
bcm2710-rpi-2-b.dtb       bcm2711-rpi-cm4.dtb       cmdline.txt    fixup4x.dat   kernel8.img       start4db.elf  start_x.elf
bcm2710-rpi-3-b.dtb       bcm2837-rpi-3-a-plus.dtb  config.txt     fixup_cd.dat  LICENCE.broadcom  start4.elf
bcm2710-rpi-3-b-plus.dtb  bcm2837-rpi-3-b.dtb       COPYING.linux  fixup.dat     log-dmesg.txt     start4x.elf
bcm2710-rpi-cm3.dtb       bcm2837-rpi-3-b-plus.dtb  fixup4cd.dat   fixup_db.dat  overlays          start_cd.elf
bcm2711-rpi-400.dtb       bcm2837-rpi-cm3-io3.dtb   fixup4.dat     fixup_x.dat   README.md         start_db.elf
bcm2711-rpi-4-b.dtb       bootcode.bin              fixup4db.dat   issue.txt     start4cd.elf      start.elf
chronos@localhost / $ 

5-1. check original cmdlist.txt "cat /mnt/cmdline.txt"

chronos@localhost ~ $ cat /mnt/cmdline.txt
coherent_pool=6M smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=serial0,115200 earlyprintk=serial0,115200 log_level=7 root=/dev/mmcblk0p3 rootfstype=ext2 rootwait ro cros_debug cros_secure elevator=deadline
chronos@localhost ~ $ 

5-2. backup old cmdlist.txt, "sudo cp /mnt/cmdline.txt /mnt/cmdline.txt.org"

  1. edit cmdlist.txt "sudo vi /mnt/cmdline.txt" and add "snd_bcm2835.enable_compat_alsa=1" cmdlist.txt only one-line.

  2. "cat /mnt/cmdline.txt"

chronos@localhost ~ $ cat /mnt/cmdline.txt
coherent_pool=6M smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=serial0,115200 earlyprintk=serial0,115200 log_level=7 root=/dev/mmcblk0p3 rootfstype=ext2 rootwait ro cros_debug cros_secure elevator=deadline snd_bcm2835.enable_compat_alsa=1
chronos@localhost ~ $ 
  1. reboot, exec "sudo reboot"

chronos@localhost ~ $ sudo reboot

  1. If not sound, change volume panel select another one.

(update 2020/12/10)

osakanataro commented 3 years ago

how to check audio device. on bash shell. execute "aplay -l"

chronos@localhost ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 3/3
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 2: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
chronos@localhost ~ $

My environment , left microHDMI is "card1, device0" play sound file, "aplay sound.wav -D hw:1,0"

chronos@localhost ~ $ aplay Downloads/dq.wav -D hw:1,0
Playing WAVE 'Downloads/dq.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono
chronos@localhost ~ $

If you use headphone output, "aplay sound.wav -D hw:2,0"

nkhs9412235 commented 3 years ago

I am so confused by cmdlist.txt or cmdline.txt.

confused

osakanataro commented 3 years ago

sorry, it's typo. filename is cmdline.txt

Fusion3Design commented 3 years ago

this seems to work

osakanataro commented 3 years ago

chromiumos_image_r86r2-rpi4b worked fine on left microHDMI port. right microHDMI port is video only,