Solution 1:

First go to terminal Next type in sudo apt install hwinfo After its installed type in hwinfo Find "Hardware Class:Sound" When you find it check if the driver is active Finally use modprone command in my computer is "modprone snd_hda_intel" The hwinfo should look like this:

19: PCI 14.2: 0403 Audio device
  [Created at pci.378]
  Unique ID: 5Dex.uwrfjAf9Rl0
  SysFS ID: /devices/pci0000:00/0000:00:14.2
  SysFS BusID: 0000:00:14.2
  Hardware Class: sound
  Model: "ATI SBx00 Azalia (Intel HDA)"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x4383 "SBx00 Azalia (Intel HDA)"
  SubVendor: pci 0x103c "Hewlett-Packard Company"
  SubDevice: pci 0x2ab7 
  Driver: "snd_hda_intel"
  Driver Modules: "snd_hda_intel"
  Memory Range: 0xfe8f0000-0xfe8f3fff (rw,non-prefetchable)
  IRQ: 16 (3729 events)
  Module Alias: "pci:v00001002d00004383sv0000103Csd00002AB7bc04sc03i00"
  Driver Info #0:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

Solution 2:

For future people,

I was able to reinstall my HDA Intel sound driver using the following commands:

1. Make sure the intel hda package is installed

sudo add-apt-repository ppa:ubuntu-audio-dev/alsa-daily
sudo apt-get update    
sudo apt-get install oem-audio-hda-daily-dkms

2. Remove current sound driver

Find version xxxxxxx using:

ls /usr/src/ | grep audio

Remove sound driver

sudo dkms remove oem-audio-hda-daily/xxxxxxx~ubuntu17.10.1 --all

3. Reinstall driver

sudo dkms install oem-audio-hda-daily/xxxxxxx~ubuntu17.10.1

Reboot computer, and at least aplay -l shows some devices now

4. Youtube Doesn't Sound Right?

This is weird, but when using headphones, you might experience bad sound quality when viewing youtube videos.

To fix: go to Sound Settings, and set the balance all the way to one side. Weird but it worked on my machine.

Got this answer here: Audio not working properly with reverb & underwater sounds