Distorted and Choppy Audio

After installing 12.04 Precise on my PC, I have encountered some problems with audio output which did no occur when using Lucid.

The sound is choppy and distorted in the lower tones. As I have no experience in setting/testing and doing anything with Audio Devices, I need help even to diagnose the problem.

Update

$ sudo lshw -c multimedia

  *-multimedia  

       description: Audio device
       product: Radeon X1200 Series Audio Controller
       vendor: Hynix Semiconductor (Hyundai Electronics)
       physical id: 5.2
       bus info: pci@0000:01:05.2
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=32
       resources: irq:19 memory:fdafc000-fdafffff
  *-multimedia
       description: Audio device
       product: SBx00 Azalia (Intel HDA)
       vendor: Hynix Semiconductor (Hyundai Electronics)
       physical id: 14.2
       bus info: pci@0000:00:14.2
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list
       configuration: driver=snd_hda_intel latency=32
       resources: irq:16 memory:fe024000-fe027fff

Update 2

It has something to do with the volume. If the audio is quiet it is not choppy, if the sound is loud then it begins to be choppy.


Solution 1:

Misery, I seem to have found a solution on my system using the same driver (different audio device though)

  1. Open Terminal: gksudo gedit /etc/modprobe.d/alsa-base.conf
  2. Add the following line:

    options snd-hda-intel model=generic
    
  3. Restart System

My audio seems to be working fine now. Full volume, flash content, videos, audio files. Let us know if it helps.


Credit goes to Adityeah

Solution 2:

A possible solution is disabling "auto-mute" in alsamixer. It is used when the "switch-to-headphone-and-back-again" bug occurs (in high volumes mainly).

First, open your terminal, or press:

CTRL + ALT + T

Then, type and hit "enter":

$ alsamixer

This screen will show up:

Alsa mixer screen in terminal

Use the right arrow until you select "Auto-Mute"

Next, press the down arrow to set it do "Disable" (see the text above it).

Finally, press Esc to apply and exit

That's it.

Solution 3:

Install alsa-tools:

sudo apt install alsa-tools

Create and save a script in /usr/local/bin:

sudo vi /usr/local/bin/sound_fix.sh

Inside the script, write this:

#!/bin/bash
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000

Run the script as root in a terminal to immediately fix the problem.

Give permission to run using:

sudo chmod 700 [path_to_script_folder]/sound_fix.sh

Run the script using:

./[path_to_script_folder]/sound_fix.sh

To run the script on startup, use cron with the @reboot command:

sudo crontab -e

and then add line in crontab:

@reboot [full_path_to_script_folder]/sound_fix.sh

To run script on resume from suspend, copy the script to

/lib/systemd/system-sleep

For more technical details regarding this fix, check this link.