[USB-Audio - SB X-Fi Surround 5.1 Pro, playback] Underruns, dropouts or crackling sound

Bug #1051665 reported by Kirsanov Vitaliy
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The sound is constantly crackling when I'm listening to the music. If I listen to last.fm or youtube for instance in my Chromium browser the sound is really good. If I try to use Rhythmbox or Banshee first couple of songs may be heard fine but then crackling comes. Especially crackling starts if I launch Skype. Even if later I turn Skype off still the sound remains bad.

I failed to try to redirect the sound directly to ALSA device bypassing PulseAudio server (I didn't find audio settings neither in Rhythmbox nor Banshee) so I cannot tell whether the problem depends on the server or it lays somewhere below in ALSA subsystem.

Also I tried to play with default-fragments and default-fragment-size-msec values in /etc/pulse/daemon.conf but it didn't help. Then having read https://wiki.ubuntu.com/DebuggingSoundProblems page I added tsched=0 argument to
load-module module-udev-detect line in /etc/pulse/default.pa. The result was not successful.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: alsa-base 1.0.25+dfsg-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-30.48-generic 3.2.27
Uname: Linux 3.2.0-30-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf7b00000 irq 58'
   Mixer name : 'IDT 92HD87B1/3'
   Components : 'HDA:111d76d1,102804b0,00100205'
   Controls : 16
   Simple ctrls : 9
Card1.Amixer.info:
 Card hw:1 'Pro'/'Creative Technology Ltd SB X-Fi Surround 5.1 Pro at usb-0000:0b:00.0-1, full sp'
   Mixer name : 'USB Mixer'
   Components : 'USB041e:30df'
   Controls : 1
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Power LED',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Card2.Amixer.info:
 Card hw:2 'NVidia'/'HDA NVidia at 0xf6080000 irq 17'
   Mixer name : 'Nvidia GPU 14 HDMI/DP'
   Components : 'HDA:10de0014,10de0101,00100100'
   Controls : 24
   Simple ctrls : 4
Date: Sun Sep 16 22:46:15 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/usr/bin/tcsh
SourcePackage: alsa-driver
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:Pro successful
Symptom_Card: GF108 High Definition Audio Controller - HDA NVidia
Symptom_PulsePlaybackTest: PulseAudio playback test successful
Symptom_Type: Underruns, dropouts, or "crackling" sound
Title: [USB-Audio - SB X-Fi Surround 5.1 Pro, playback] Underruns, dropouts or crackling sound
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/22/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A10
dmi.board.name: 0HVRTT
dmi.board.vendor: Dell Inc.
dmi.board.version: A10
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: Not Specified
dmi.modalias: dmi:bvnDellInc.:bvrA10:bd03/22/2012:svnDellInc.:pnInspironN5110:pvrNotSpecified:rvnDellInc.:rn0HVRTT:rvrA10:cvnDellInc.:ct8:cvrNotSpecified:
dmi.product.name: Inspiron N5110
dmi.product.version: Not Specified
dmi.sys.vendor: Dell Inc.

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :
Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

Forget to say, if you need any supplementary info just call me.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Raymond (superquad-vortex2) wrote :

post the pulseaudio verbose log

https://wiki.ubuntu.com/PulseAudio/Log

card 1: Pro [SB X-Fi Surround 5.1 Pro], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Pro [SB X-Fi Surround 5.1 Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

do device 1 support digital ?

# If a device does not use the first PCM device for digital data, the device
# number for the iec958 device can be changed here.
USB-Audio.pcm.iec958_device

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/USB-Audio.conf

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

After I had submitted the bug I replaced my Ubuntu with Windows 7. But now, having got a response from you, I've installed Ubuntu again alongside Windows. So the logs which I have attached may not correspond a little to the info which I put in the problem description initially. But the problem still exists. Please, give me know if you need any more information from me.

I don't quite understand what 'digital' means so I've attached the whole /usr/share/alsa/cards/USB-Audio.conf file which I now have.

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

launchpad has refused me to add two files simultaneously. Here is USB-Audio.conf

Revision history for this message
Raymond (superquad-vortex2) wrote :

do device 0 use for analog (stereo and surround51) and device 1 for digital optical spdif (iec958) ?

since the default device of iec958 is also zero in usb-audio.conf

post the output of alsa-info.sh

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

At least I can see in System Settings -> Sound that, indeed, I have two devices: digital spdif and 5.1 analog surround (which actually I'm using). But I'm not certain about their numbers.

alsa-info.sh returned me the following link:
http://www.alsa-project.org/db/?f=4fed3aa723ec7515d6651707c6bc59356f6348a4

Please, let me know if you cannot follow this link (I could).

Revision history for this message
Raymond (superquad-vortex2) wrote :

try

speaker-test -D hw:1,0 -c 2 -t wav

speaker-test -D hw:1,0 -c 6 -t wav

speaker-test -D surround51 -c 6 -t wav

speaker-test -D hw:1,1 -c 2 -t wav

speaker-test -D iec958:1 -c 2 -t wav

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

krokoziabla@music:1:~> speaker-test -D hw:1,0 -c 2 -t wav

speaker-test 1.0.25

Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
 0 - Front Left
 1 - Front Right
Time per period = 5.480553

krokoziabla@music:1:~> speaker-test -D hw:1,0 -c 6 -t wav

speaker-test 1.0.25

Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 87381
Period size range from 48 to 43690
Using max buffer size 87380
Periods = 4
was set period_size = 21845
was set buffer_size = 87380
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE
Time per period = 6.828693

krokoziabla@music:1:~> speaker-test -D surround51 -c 6 -t wav

speaker-test 1.0.25

Playback device is surround51
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Channels count (6) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

krokoziabla@music:1:~> speaker-test -D hw:1,1 -c 2 -t wav

speaker-test 1.0.25

Playback device is hw:1,1
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
 0 - Front Left
 1 - Front Right

krokoziabla@music:1:~> speaker-test -D iec958:1 -c 2 -t wav

speaker-test 1.0.25

Playback device is iec958:1
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
 0 - Front Left
 1 - Front Right
Time per period = 5.481259

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

I forgot that the last time I also had system level EQ on my Ubuntu (http://www.webupd8.org/2011/04/system-wide-pulseaudio-equalizer.html). I've installed it now and gathered verbose pulse logs once more. With this plug-in the sound starts crackling more likely.

Revision history for this message
Raymond (superquad-vortex2) wrote :

do the channel map correct when playing 5.1 on hw:0,0 or need to use surround51:1 ?

do you get any sound from the optical spdif,or the device has any hardware switch to select analog and optical ?

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

Could you explain how the map should look like? I'm a bit confused. When I ran speaker-test there were hw:1,0 and hw1:,1. For both of them I could hear the sound clearly.

Actually I don't know which device I use usually when I listen to music. Sorry, but I cannot answer your first question without some help.

As to spdif I don't use it at all and I cannot observe any hardware switch on my sound card.

Revision history for this message
Raymond (superquad-vortex2) wrote :

since thereis a route table in surround5.1

do the female voice come out from the correct speaker ?

speaker-test -D hw:1,0 -c 6 - t wav -d

speaker-test -D hw:1,1 -c 6 - t wav -d

speaker-test -D surround51:1 -c 6 -t wav -d

USB-Audio.pcm.surround51.0 {
 @args [ CARD ]
 @args.CARD { type string }
 @func refer
 name {
  @func concat
  strings [
   "cards.USB-Audio."
   { @func card_name card $CARD }
   ".pcm.surround51:CARD=" $CARD
  ]
 }
 default {
  type route
  ttable.0.0 1
  ttable.1.1 1
  ttable.2.4 1
  ttable.3.5 1
  ttable.4.2 1
  ttable.5.3 1
  slave {
   pcm {
    type hw
    card $CARD
    device 0
   }
   channels 6
  }
 }
}

can.you.post the output of lsusb -vvv of you x-fi pro?

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

speaker-test -D hw:1,0 -c 6 -t wav gave woman's voice from incorrect speakers.
speaker-test -D hw:1,1 -c 6 -t wav -d failed to execute:

krokoziabla@music:1:~/sandbit> speaker-test -D hw:1,1 -c 6 -t wav -d

speaker-test 1.0.25

Playback device is hw:1,1
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Channels count (6) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

Only speaker-test -D surround51:1 -c 6 -t wav -d gave the expected result.

The output of lsusb is in the attachment.

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://ubuntuforums.org/showpost.php?p=9385594&postcount=4

may be device 1 is also used for spdif on you x-fi pro,

so you need to define the device of iec958 and you have to send email to <email address hidden> about the name "Pro" or "SB X-Fi" or " SB X-Fi Surround 5.1 Pro"

card 1: Pro [SB X-Fi Surround 5.1 Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1

!-------Mixer controls for card 1 [Pro]

Card hw:1 'Pro'/'Creative Technology Ltd SB X-Fi Surround 5.1 Pro at usb-0000:0b:00.0-1, full sp'
  Mixer name : 'USB Mixer'
  Components : 'USB041e:30df'
  Controls : 1
  Simple ctrls : 1
Simple mixer control 'Power LED',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]

# If a device does not use the first PCM device for digital data, the device
# number for the iec958 device can be changed here.
USB-Audio.pcm.iec958_device {
 # "NoiseBlaster 3000" 42
+ "SB X-Fi" 1
+ "Pro" 1

 # The below don't have digital in/out, so prevent them from being opened.
 "Blue Snowball" 999
 "Logitech Speaker Lapdesk N700" 999
 "Logitech USB Headset" 999
 "Logitech Wireless Headset" 999
 "Plantronics GameCom 780" 999
 "Plantronics USB Headset" 999
 "Plantronics Wireless Audio" 999
 "SB WoW Headset" 999
 "Sennheiser USB headset" 999
 "USB Device 0x46d:0x992" 999
}

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

Why, I've added "SB X-Fi" 1 line into my /usr/share/alsa/cards/USB-Audio.conf but it hasn't given any effect.

Actually, how can sound cracking be connected with spdif output which I'm not using?

Revision history for this message
Raymond (superquad-vortex2) wrote :

the main point is that your USB does not have any volume control , does pulseaudio server implement software volume?

Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

Yes, it does, I can control the sound volume. And, indeed, e.g. in alsa-mixer I don't see any lever to influence my sound card.

But again, how is sound volume control connected with sound problems? And what possible ways could be to solve the problem?

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Kirsanov Vitaliy (krokoziabla) wrote :

Well, the guy changed the format. But where can it be changed?

Revision history for this message
ThomasMartitz (thomas-martitz) wrote :

FWIW, I'm on archlinux but experience the same issue (and I did so back when I used ubuntu).

I thought I'd share that I could fix the crackling noise by disabling realtime scheduling. Here's my daemon.conf which produces fine sound:

$ cat ~/.config/pulse/daemon.conf
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-format = s16le
realtime-scheduling = no

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.