GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
347 stars 11 forks source link

ALSA audio driver/no sound problems (CANDY, 4.4.6, RW_LEGACY) #283

Closed smerkousdavid closed 7 years ago

smerkousdavid commented 8 years ago

Current Solution: The only real solution to fix hardware problems such as audio is to not use RW_LEGACY but the BOOT_STUB option... After spending a multitude of hours trying to get lubuntu audio to work. I decided to give galliumos a shot everything seemed to be working but again the audio doesn't work... To start off I've tried suggestions such as the ones listed in issue #66 but none of them work. The closest thing that worked for me was a combination of these: http://askubuntu.com/questions/278503/no-sound-with-hda-intel-pch Google+ page on #66 Force reloading alsa drivers/modprobe Setting the intel hda to a generic driver

Yet after trying even a lot more from googling online I still only hear a INIT tone (slight hiss) when I plug my headphones in. Here is some more information that might help... When not using the generic driver and excluding the HDMI audio driver I get that the device is plugged in but when I attempt to play anything (gstreamer i know works I even tried playing the default player). Nothing comes out of the internal speakers/The jack or the hdmi port when connected to the monitor (side note the hdmi drivers (display) don't seem to be working either). If I disable the generic and use the proprietary driver I get the message that the hdmi is unplugged 100% of the time, and there isn't even a configuration for the builtin controller.

>>> aplay -l
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
>>> lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register [8086:0f00] (rev 0e)
00:02.0 VGA compatible controller [0300]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display [8086:0f31] (rev 0e)
00:12.0 SD Host controller [0805]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SDIO Controller [8086:0f16] (rev 0e)
00:14.0 USB controller [0c03]: Intel Corporation Atom Processor Z36xxx/Z37xxx, Celeron N2000 Series USB xHCI [8086:0f35] (rev 0e)
00:15.0 Multimedia audio controller [0401]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series LPE Audio Controller [8086:0f28] (rev 0e)
00:17.0 SD Host controller [0805]: Intel Corporation Atom Processor E3800 Series eMMC 4.5 Controller [8086:0f50] (rev 0e)
00:1a.0 Encryption controller [1080]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine [8086:0f18] (rev 0e)
00:1b.0 Audio device [0403]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller [8086:0f04] (rev 0e)
00:1c.0 PCI bridge [0604]: Intel Corporation Atom Processor E3800 Series PCI Express Root Port 1 [8086:0f48] (rev 0e)
00:1f.0 ISA bridge [0601]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Power Control Unit [8086:0f1c] (rev 0e)
01:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b1] (rev bb)

Alsa mixer also says that the hdmi aren't muted but i'm sure what's about capture devices but i'm not able to access that "tab"

>>> alsamixer
| Card: HDA Intel PCH                                  F1:  Help               │
│ Chip: Intel Valleyview2 HDMI                         F2:  System information │
│ View: F3:[Playback] F4: Capture  F5: All             F6:  Select sound card  │
│ Item: S/PDIF                                         Esc: Exit               │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                ┌──┐     ┌──┐                                 │
│                                │OO│     │OO│                                 │
│                                └──┘     └──┘                                 │
│                             < S/PDIF >S/PDIF 1                               │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
>>>sudo lsmod | grep "^snd"
snd_soc_sst_byt_max98090_mach    16384  0
snd_soc_sst_baytrail_pcm    28672  0
snd_soc_sst_ipc        16384  1 snd_soc_sst_baytrail_pcm
snd_soc_sst_dsp        53248  1 snd_soc_sst_baytrail_pcm
snd_intel_sst_acpi     16384  0
snd_soc_max98090       98304  0
snd_intel_sst_core     73728  1 snd_intel_sst_acpi
snd_soc_sst_mfld_platform    86016  1 snd_intel_sst_core
snd_soc_core          196608  4 snd_soc_sst_byt_max98090_mach,snd_soc_sst_baytrail_pcm,snd_soc_sst_mfld_platform,snd_soc_max98090
snd_compress           20480  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_codec_hdmi     49152  1
snd_seq_midi           16384  0
snd_hda_intel          36864  4
snd_seq_midi_event     16384  1 snd_seq_midi
snd_hda_codec         135168  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
snd_hda_core           65536  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_pcm_oss            49152  0
snd_mixer_oss          24576  1 snd_pcm_oss
snd_rawmidi            32768  1 snd_seq_midi
snd_seq                69632  2 snd_seq_midi_event,snd_seq_midi
snd_pcm               102400  11 snd_pcm_oss,snd_soc_core,snd_hda_codec_hdmi,snd_soc_sst_baytrail_pcm,snd_hda_codec,snd_hda_intel,snd_soc_sst_mfld_platform,snd_soc_max98090,snd_pcm_dmaengine,snd_hda_core
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_pcm,snd_seq
snd                    81920  21 snd_pcm_oss,snd_soc_core,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_soc_sst_mfld_platform,snd_seq_device,snd_compress,snd_mixer_oss
snd_soc_sst_acpi       16384  0

P.S. same results happened on lubuntu as does to galliumos Rev: The tone was referring tone was just the plugged his for about 3 seconds before it muted I don't know if that's the automute option in pulseaudio and/or alsa but I would imagine that would be longer(I have very little knowledge about this) or I could it be just crashing. Any pointers would be awesome

reynhout commented 8 years ago

@smerkousdavid Is this on the 4.4.6 kernel? Which firmware? Possibly-related: https://github.com/GalliumOS/galliumos-distro/issues/180

smerkousdavid commented 8 years ago

@reynhout yes I am running a 4.4.6 kernel .CANDY. I've also tried (On bodhi linux) an older ubuntu base (15.04) which I believe had a 3.19 kernel per install. Also I am using LEGACY_RW with Mrchromebox's update. I'm going to try compiling the newest version of ALSA again. As stumbling upon this forum said it might work. https://ubuntuforums.org/showthread.php?t=2255425

reynhout commented 8 years ago

That thread is from December 2014 though -- the newer version of ALSA is already included in GalliumOS. MrChromebox's BOOT_STUB firmware resolves the issue, if that's an option for you.

smerkousdavid commented 8 years ago

@reynhout Sorry for a more or less bad question. Won't BOOT_STUB remove the chromeos recovery option/Developer mode screen. Also would this require me to use the script on chromeos again? Or is the flashrom script the same on gallium?

reynhout commented 8 years ago

@smerkousdavid yes, BOOT_STUB makes it harder to recover to ChromeOS (not impossible, you just have to flash back to factory first). You cannot dual-boot with BOOT_STUB. More here: https://wiki.galliumos.org/Firmware.

You would not need to reinstall the OS, you would just run the MrChromebox firmware-util.sh script and select BOOT_STUB.

smerkousdavid commented 8 years ago

@reynhout Thanks for the update about BOOT_STUB now it does say "small chance of bricking device." I would have to say that i'm slightly worried about bricking this device. Do you know how likely that could happen?

reynhout commented 8 years ago

@smerkousdavid The risk is extremely small, but non-zero. In nearly a year of GalliumOS support, we've never seen it happen to anyone using the published scripts.

smerkousdavid commented 8 years ago

@reynhout That seems satisfying to me, one last thing before I do it. Does the revert stock ROM work in mrchromebox's firmware-util.sh script? I will have to revert this machine into a more or less normal state (running chromeos without dev) when I need to.

reynhout commented 8 years ago

@smerkousdavid Yes, revert to stock/factory will work for any model where the option is offered. The script only displays the option if it will work.

One catch with BOOT_STUB: You have to open the device to remove the write-protect screw. I generally prefer RW_LEGACY personally, but the only known workaround for these audio issues, presently, is to switch firmware.

smerkousdavid commented 8 years ago

@reynhout This is kind of funny. Even on this baytrail device I don't have the option for BOOT_STUB. Only for a full ROM... I haven't removed the screw yet but do you think it sees the write_protection flag and disables it? If so why would full ROM be up there? screenshot_2016-09-04_10-48-14

reynhout commented 8 years ago

Oops, there might not be a BOOT_STUB built for CANDY. I don't think the script will have tested the WP state at this point (and you would need to remove WP for full firmware too).

@MattDevo is MrChromebox. He will know.

Full firmware should also prevent the audio chip initialization problem, and can be reverted to factory/ChromeOS in the same way.

MrChromebox commented 8 years ago

@smerkousdavid @reynhout by default, the script will not enable the BOOT_STUB option for a Baytrail device for which there is a Full ROM available. If you want to flash the BOOT_STUB, use the unlock option first. This is documented on the script instructions on my site btw :)

reynhout commented 8 years ago

@MattDevo Oh, that's pretty clear actually. I saw the "Unlock Disabled" option and mentally translated it to "Enable expert options" as in a partition editor. Sorry!

smerkousdavid commented 8 years ago

@MattDevo Okay bad news, I did the BOOT_STUB and now booting from usb doesn't work... I removed the hardware screw, recovered into chromeos ran the BOOT_STUB part of the script and rebooted. Now it wont detect the usb drive and auto loads into the hard drive which has nothing in it. What should I do? It boots up about 5 seconds later asks to press esc for boot options... Does nothing then boots into Hdd

MrChromebox commented 8 years ago

@smerkousdavid pressing 'ESC' when prompted doesn't work? Sometimes hitting ESC before the prompt can cause the KB not to work

smerkousdavid commented 8 years ago

@MattDevo Thank god. I thought I screwed something up for a second. That's a weird bug... So yes hitting escape about a second later from the prompt works. Thanks Matt

MrChromebox commented 8 years ago

@smerkousdavid it's a SeaBIOS KB init bug that I've identified and fixed; fix will be included in the next firmware update (hopefully sometime this weekend)

smerkousdavid commented 8 years ago

@reynhout @MattDevo Okay I'll be looking out for that for the next little while. Also It's confirmed that audio works in the BOOT_STUB version. Is there any explanation why the BIOS screws up the controller?

MrChromebox commented 8 years ago

@smerkousdavid @reynhout so when using RW_LEGACY to boot, the ChromeOS verified boot payload (depthcharge) initializes the audio controller in order to beep at the end of the 30s boot timeout. When the GaOS/Linux driver goes to initialize the hardware, it assumes the controller is in an initialized state, but because it isn't, it init fails. I'm not sure if adding some sort of pre-init reset would fix this, or why some models seem unaffected.

smerkousdavid commented 8 years ago

@MattDevo Okay that makes more sense than no sense to me now :+1: I am also having the problem with RW_LEGACY where the eMMC card spits out a bunch of reset errors, Eventually dumping me into initramfs. From there I added to /etc/modules r852, sdhci_pci... Since @plunkinguitar suspected it to be same method as an sd card, and that worked, but I still get the reset errors. Gallium os does the same... But now with BOOT_STUB I don't see any more of those errors. Is there something with LEGACY that hogs the eMMC?

MrChromebox commented 8 years ago

@smerkousdavid no, same issue as audio with depthcharge doing some init, which doesn't happen with BOOT_STUB because there is no depthcharge anymore

smerkousdavid commented 8 years ago

@MattDevo Sorry for the misunderstanding. Thanks for the help guys you've made my weekend a heck a lot easier! I'll be sure to keep any new things I find up to date

gdrcandy commented 7 years ago

I understood BOOT_STUB would be the ony solution to fix the 'no audio' problem on dell 11 candy? Somewhere it was mentioned headphones out is supposed to work but I only hear a short 'beep' when plugging in the jacket...

smerkousdavid commented 7 years ago

@gdrcandy For my dell 11, the current only solution is BOOT_STUB or FULL. I also heard a short beep when trying LEGACY, but never actually got the driver loaded. It was quite infuriating. I would recommend just doing BOOT_STUB, since it's actually not that much harder.

reynhout commented 7 years ago

Closing. Appears to be a special case of #180.