Showing posts with label sound. Show all posts
Showing posts with label sound. Show all posts

0.4 Watt Less During Audio Playback - (Updated:) Power Performance: Pulseaudio + Interrupt-Less Alsa

Diposkan oleh Unknown on Saturday, April 16, 2011

(Skip to the update)
Ok, so with some help from Pierre-Louis from Intel I've managed to get it working and do some performance/power tests. But let me start at the beginning: Recently, pulseaudio not only switched to a more power efficient (and otherwise) timing system, as far as I understand a callback API. It also provided the infrastructure to use ALSA devices without causing any interrupts ("period wakeup disabling"), so you CPU can stay longer in standby mode (e.g. "C6 residency"), saving you power and avoiding playback glitches at the same time. See here and here or more background information. With kernel 2.6.38 the first driver (snd-hda-intel) supports this infrastructure out of the box, the snd-hda-intel driver. This combination is what I tested for power efficiency...
Read more »
More about0.4 Watt Less During Audio Playback - (Updated:) Power Performance: Pulseaudio + Interrupt-Less Alsa

Creative X-fi Surround USB Review and Guide for Ubuntu 9.10 or Newer

Diposkan oleh Unknown on Tuesday, June 1, 2010

This article will review the Creative X-fi surround usb first quickly in Windows XP and then in Linux. It will give you some basic performance ideas and hints for fixing problems and having more fun with it.

After my survey of the possibilities for USB surround sound in Linux, I ended up ordering a Creative X-fi Surround USB. As you could read there, there is a helpful webpage that includes e.g. ready made .asoundrc files.

Windows XP
On my netbook, without installing any special drivers, playing a song on an otherwise unoccupied Windows XP utilizes about 20% CPU, minus the almost 5 % that somehow seem to be there almost always...

I've read reports that there are clicking sounds, which I can imagine well with a heavy system load. I've heard them at first after plugging it in, but by now they disappeared. It sounds crisp on my Sennheiser headphones and the base is noticeably better than my onboard sound, obviously, but that doesn't say much.

Now let's see how it fares in Linux...

Reboot. Plug. Play. It could hardly be easier. All I had to do was to tell mplayer which device to use (mplayer -ao alsa:device=hw=S51). Then it happily started playing over my new external sound card. The sound is as excellent as under Windows. But better than Windows: Surround sound works out of the box in my Kubuntu 9.10 system.

The combination of AC-3 surround with VAAPI accelerated 720p movie on my netbook utilizes around 10-12 % CPU. There is no stuttering in Linux, even with heavier load. Just playing music hardly seems to have any impact -- maybe around 5 % CPU. I'll have to let the Phoronix suite benchmark all this sometime. In Windows even just playing music in VLC and increasing the volume setting with the knob on the device can create stutters.

Right now for some reason the slightly dusty Chromium version on this netbook keeps bringing the system into a hard stutter making characters appear slowly on the screen up to a second after I type and the mouse does not move smoothly. But the sound plays smoothly in the background. Just plain wonderful.

Resume

I can definitely recommend the sound card for USB (surround or stereo) sound in Linux. I'm not sure if I would use it for Windows. Let's see after I installed the drivers, which will probably drive me mad.

But be aware that there are clicking sounds when the card is first intialized. If you want to use it for e.g. system sounds, you may not be very happy with that. They also seem to appear during heavy disk access (apt-get dist-upgrade), even if I'm not playing any music. That's definitely weird...

The microphone input works flawlessly. I didn't have problems with over-amplification, though I can imagine that being an issue with the lack of hardware mixing. And I definitely have a sound card for surround sound HD movie nights now. And the crazy thing is I can do it all perfectly with my little netbook. Thank you, Linux. Thanks also to you, Mandar.

Post Scriptum
Some additional information for nerds: When the card is not in use, it produces not wakes in powertop, when in use, it produces about 200-300 wakes/s (no matter if surround or stereo sound).

Update
The clicking sound seems to be related to the power supply. The problem disappears in the same work load (e.g. heavy disk updatedb) if I plug the power adapter into my netbook.

Update2
As I almost expected the device is not anywhere as good in Windows as in Linux. The crystalizer does sound nice, but there are many glitches in the Windows driver. E.g.

  • sometimes when you pause they playback, the result is a constant beep until you press play again, 
  • during forwarding in movies, there are short beeps. 
  • Once after removing the plug and putting it back inside, the entire system hung, only working again after removing it again and then showing and error message. 
  • the driver uses much more CPU than in Linux and it's a 50 MB package
  • there are no volume controls for rear, center, lfe and front channels, only 1 master control (in Linux you can fix this -- maybe MatrixMixer works for Windows?)
  • the microphone input sounds slightly noise shaped, esp. in combination with the "crystalizer"
Hence I would make my recommendation more clear: I wouldn't recommend it for surround sound in Windows I think. It might still be your best option due to the lack of alternatives, though.

And here's my .asoundrc so far:

pcm.!default {
type plug
slave.pcm "softvol" #make use of softvol
}

# create softvol master channel
# see http://alsa.opensrc.org/index.php/How_to_use_softvol_to_control_the_master_volume
pcm.softvol {
type softvol
slave {
pcm "dmixer2" #redirect the output to dmix (instead of "hw:0,0")
}
control {
name "Master" #override the PCM slider to set the softvol volume level globally
card S51
}
}

# create stereo dmixer, because using the 6 channel one causes stutter if the channels are empty
pcm.dmixer2 {
type dmix
ipc_key 2343
slave {
pcm "hw:S51"
channels 2
}
}

pcm.dmixer6 {
type dmix
ipc_key 2342
slave {
pcm "hw:S51"
rate 48000
channels 6
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096
}
}

# reroute the channels because rear and sub/lfe are exchanged
pcm.mysurround {
type route
slave.pcm "dmixer6"
slave.channels 6

ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
}
More aboutCreative X-fi Surround USB Review and Guide for Ubuntu 9.10 or Newer

USB Surround Sound in Linux

Diposkan oleh Unknown on Monday, May 24, 2010

It's an annoying topic. Not many USB surround sound cards exist anyway, even less of those are good ones. But after an hour of searching the web and reading various articles, I've finally found a USB surround sound card that works well in Linux:

Terratec Aureon 5.1 USB MK-II

Usually the problem is that terratec's drivers are not too good. Luckily, the Linux drivers are often excellent due to the open source community's investments in them. And here the case is similar: Terratec was smart enough to use the standard USB interface, so they need not write drivers for any OS and the Linux USB Audio driver works perfectly - already for a long time.

But German reviews on Amazon suggest that the digital output does not work with surround sound, but only stereo. This means it's just an option if you want analogue sound.

"Enforce USB bandwidth allocation (EXPERIMENTAL)" must be deactivated in the kernel.

If you still need some help with the setup, e.g. for games, try this page.

If you want a really good USB stereo sound card with digital out for Linux (cost "< 20 €"), and you're up for some work, here's a German guide how to build your own.

But according to German Amazon reviews and this website, the

Creative SoundBlaster X-Fi Surround 5.1 USB

is also supported in Linux - at least for stereo. A German guide is in the Ubuntu forums, but it seems it should work with any current Linux.

Both cards have driver issues. It seems the Creative card doesn't work well in Vista x64 (no/bad subwoofer sound). I think in the end I will decide for the Creative card anyway. It's much newer and probably has better sound than the much older Terratec box.
More aboutUSB Surround Sound in Linux

Debugging Alsa HDA Audio

Diposkan oleh Unknown on Tuesday, March 24, 2009

If you're using the snd-hda-intel module and you've got audio problems, you might want to try out manually using a specific model, the list is in e.g. patch_realtek.c:
11687 static const char *alc268_models[ALC268_MODEL_LAST] = {
11688 [ALC267_QUANTA_IL1] = "quanta-il1",
11689 [ALC268_3ST] = "3stack",
11690 [ALC268_TOSHIBA] = "toshiba",
11691 [ALC268_ACER] = "acer",
11692 [ALC268_ACER_DMIC] = "acer-dmic",
11693 [ALC268_ACER_ASPIRE_ONE] = "acer-aspire",
11694 [ALC268_DELL] = "dell",
11695 [ALC268_ZEPTO] = "zepto",
11696 #ifdef CONFIG_SND_DEBUG
11697 [ALC268_TEST] = "test",
11698 #endif
11699 [ALC268_AUTO] = "auto",

e.g.
sudo modprobe -r snd-hda-intel; sudo modprobe snd-hda-intel model=test


See here for more.
More aboutDebugging Alsa HDA Audio

Set the Default Sound Card in Ubuntu

Diposkan oleh Unknown on Saturday, January 24, 2009

If you have more than one sound card, you might want to set the preferred/default one:

You can find out the sound cards' names with
asoundconf list
and change the default one with
sudo asoundconf set-default-card xxx
More aboutSet the Default Sound Card in Ubuntu