Fix for low sound volume on Realtek onboard audio Realtek ALC662 rev1

I have Realtek Onboard Audio which I use to power my headphones, when I dont want to use the Creative speakers. I found that had miniscule sound output after installing Debian. As with most of the stuff I did with Debian, I went around to the cause of this and workarounds. I had already compiled a kernel with alsa support, and Debian unlike Ubuntu doesnt ship with the annoying Pulseaudio. So the drivers werent the issue. I discovered that I could create a “virtual” PCM device and insert another slider in the alsa  configuration system, and get it to boost volume tremendously. I couldnt even perceive any distortion as such.

Create a new file /etc/asound.conf or create ~/.asoundrc. I believe that the system version overrides the user version.

[[email protected] ~]$ cat /etc/asound.conf
pcm.!default {
      type plug
      slave.pcm "softvol"
  }

  pcm.softvol {
      type softvol
      slave {
          pcm "dmix"
      }
      control {
          name "Pre-Amp"
          card 0
      }
      min_dB -5.0
      max_dB 120.0
      resolution 10
  }

It creates a new slider in alsamixer, which can be used to boost the sound volume significantly.

I also added the following line to the end of /etc/modprobe.d/alsa-base.conf:

#Fix for HDAudio card
options snd-hda-intel model=ALC662

To see the difference, restart the service:

sudo alsa force-reload

I did some more tweaking with it, and I believe increased the sound even further. However it was supposed to display an additional volume slider (in adddition to the one which I added via above code).

[[email protected] ~]$cat /etc/asound.conf
pcm.!default {
      type plug
      slave.pcm "softvol"
  }

  pcm.softvol {
      type softvol
      slave {
          pcm "dmix"
      }
      control {
          name "Pre-Amp"
          card 0
      }
      min_dB -5.0
      max_dB 120.0
      resolution 10
  }
pcm.softvol {
    type            softvol
    slave {
        pcm         "ALC662"
    }
    control {
        name        "SpecialBoost"
        card        0
    }
}

 

Some debug info:

[[email protected] ~]$ cat /proc/asound/card0/codec* | grep Codec
1:Codec: Realtek ALC662 rev1

Some useful resources:
1. Alsa howto


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.