Linux Audio the way to go!?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
The problem is most probably nvidia driver compiled for the previous version of kernel. The kernel got updated during the upgrade, the driver stayed old. In debian it happens always, I would expect ubuntu to handle it automatically. It certainly is still beta.

The easiest fix is to change driver "nvidia" to "nv" in /etc/X11/xorg.conf. nv is the open source version, independent of kernel.

If you want the proprietary version (certainly more performance): Once you reboot to the new kernel, stay in the command line (no graphics needed), login, run

sudo module-assistant -t auto-install nvidia

It will recompile the nvidia module for the new kernel. Sometimes it needs to reinstall a new version of nvidia-glx corresponding to the new kernel's nvidia driver.

sudo apt-get install nvidia-glx

Reload the new driver (modprobe nvidia) or reboot.
 
Hello,

I had ubuntu 7.10 installed for about 2 months and I have noticed a clear improvement compared to xp+foobar+alsa setup, even with my very cheap, (soon to be replaced) Creative sound card.

Last night I have installed ubuntu studio 8.04 (twice as the first time for some reason the installer didn't questioned me about the username and password and when the system rebooted I couldn't log on - frustrating. However the second time everything ran smooth and I was surprised to see that the system was even playing flac. files. I couldn't evaluate the sound as it was late in the night.

During the next day the system stood shut down and when I've arrived home from work.. guess what, no sound! I am currently downloading all the updates and i hope it will repair itself. I can't fin anything wrong in the sound panel as it seems to recognize the devices.. I don't have a clue what's going one..
 
Hello soundcheck

Thank you for your support.

1. The folder asound contains the following folders: AudioPCI, card0, oss and seq. And the files are cards, devices, modules, pcm, timers and version. However it seems to me that there are some files which contains the name ES1371 (so it seems the card is installed).

2. In the sound panel, all the tabs are on autodetect, ans when I chenge them to ES1371 or ALSA there is no change. Sometimes when I press the test button repeatedly i get an error like this: audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink: Could not open audio device for playback. Device is being used by another application.
However I suspect is because of some kind of latency/buffer related problem.

3. $aplay -L gives this: default:CARD=AudioPCI
Ensoniq AudioPCI, ES1371 DAC2/ADC
Default Audio Device
front:CARD=AudioPCI,DEV=0
Ensoniq AudioPCI, ES1371 DAC2/ADC
Front speakers
surround40:CARD=AudioPCI,DEV=0
Ensoniq AudioPCI, ES1371 DAC2/ADC
4.0 Surround output to Front and Rear speakers
iec958:CARD=AudioPCI,DEV=0
Ensoniq AudioPCI, ES1371 DAC2/ADC
IEC958 (S/PDIF) Digital Audio Output
null
Discard all samples (playback) or generate zero samples (capture)

I guess it's ok. The $lsmod gives me:
snd_ens1371 26912 56
gameport 16776 1 snd_ens1371
snd_ac97_codec 101284 1 snd_ens1371
ac97_bus 3200 1 snd_ac97_codec
snd_pcm_oss 42400 0
snd_mixer_oss 18048 1 snd_pcm_oss
snd_pcm 78724 3 snd_ens1371,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy 4868 0
snd_seq_oss 35968 0
snd_seq_midi 9376 0
snd_rawmidi 25632 2 snd_ens1371,snd_seq_midi
parport_pc 36516 1
parport 38600 3 ppdev,lp,parport_pc
evdev 13312 3
snd_seq_midi_event 8576 2 snd_seq_oss,snd_seq_midi
snd_seq 54992 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
serio_raw 7940 0
snd_timer 24836 2 snd_pcm,snd_seq
snd_seq_device 9612 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
psmouse 41104 0
snd 57636 297 snd_ens1371,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
ipv6 275108 8
usblp 16000 0
soundcore 9312 1 snd
snd_page_alloc 11400 1 snd_pcm
pcspkr 4224 0
shpchp 34708 0
pci_hotplug 31776 1 shpchp
button 9232 0
i2c_nforce2 7680 0
i2c_core 25344 1 i2c_nforce2
nvidia_agp 9756 1
agpgart 34900 1 nvidia_agp

The test command results in this: $ aplay -Dplughw:0,0 test.wav .....
test.wav: No such file or directory and in this : aplay -Dhw:0,0 test.wav .....
test.wav: No such file or directory


I think I'll have to reinstall the hole system as I really don't figure it up. Any ideas?
 
Hello Soundcheck,

I have re-installed the system and now Katie Melua is singing through my speakers :).

Thank you so much for your support. I will come back with some impressions regarding the sound quality. What do you recommend to use as a player? Still xmms? I know you have developed your own player, am I right?

By the way. For some reason I enjoy ubuntu studio more than plain ubuntu. Maybe beacuse it's more like what a media server suppose to be. Also, for some reason it seems that studio runs slower (much slower) than ubuntu used to. It is because of the rt kernel? My machine is slow anyway but I can feel a difference..

Cheers!
 
Hello kuroguy,

thank you for the recommendation. I have installed moc with synaptic. However, how can i play a file wit it? I understand I have to use a command line in the terminal. I couldn't find a list of commands on the site or on the forum. Coul you help me with some basic stuff?
 
SunRa,

good to hear your sound is working again. Though it will be more useful to learn how to fix problems without reinstalling. In linux reinstalling is the very ultimate option, almost never required unless you encounter a major disaster like hard drive corruption etc. As a matter of fact, once you have your ubuntu fine-tuned to your likes, you will most likely never have to reinstall again. Even upgrades to new version are basically just about installing a bunch of new packages.

On older machines Ubuntu Studio is way slower than standard ubuntu. As default it boots into full real time preemption kernel. Every benefit has its cost - the real time features consume more CPU resources and the non-realtime-enabled applications run slower. It is there mostly to let the jackd server run in real-time which is important when recording. For pure playback and the PCI card of yours, you generally do not need the real time features.

You can easily switch to the standard kernel by choosing the other type of kernel in the grub menu at startup. You will feel the difference (at least I did).

BTW, Ubuntu Studio is regular ubuntu with a few other ubuntu packages installed by default, among them the linux-rt - realtime kernel metapackage. Every ubuntu has the linux-rt package available. I really like this stragegy - a meta package listing other packages turns the general-purpose distribution to a highly specialized professional tool.
 
Thanks for the short Ubuntu Studio description. Just what I needed to be convinced (and thus will choose it over the regular flavour end of the month :) ).

Could somebody comment on the "audiophile" capabilities of the different sound engines? My personal favourite player is Amarok, which uses xine by default and I wondered if I should consider an alternative.
 
SunRa said:
Hello kuroguy,

thank you for the recommendation. I have installed moc with synaptic. However, how can i play a file wit it? I understand I have to use a command line in the terminal. I couldn't find a list of commands on the site or on the forum. Coul you help me with some basic stuff?


If you have MOC and all of the dependants installed. You start MOC by typing MOCP. hit 'h' for the help screen. I use MOC on a converted network attached storage device (linkstation) and it uses about 20% of the processor power. Not bad for a 200 MHz PPC device.
 
Hi.

The lowest common audio layer within Linux is ALSA or OSS.
Part of the kernel is Alsa. OSS is delivered by http://www.4front-tech.com/ .
OSS might be useful for special setups, e.g. if your soundcard is not supported by Alsa, such as Lynx products.
Just a word to the original OSS. OSS was the former audio layer of Linux. It was replaced by Alsa. There are still applications using
Oss. Alsa comes with an OSS emulation. ( That's something else than the OSS audio layer from 4front.

All applications are using Alsa as audio layer. Amarok uses Xine and Xine uses Alsa. Xmms uses Alsa......
You can also put another layer in between. Jack.
Jack is a realtime and sse2 optimised layer connecting different ports - mostly used by professional musicians. Most applications will have a Jack interface. The good thing
about Jack. It is made for lowest latency and/or highest processing
efficency. However it is still using Alsa. There is a good chance that for certain setups it's better to use Jack instead of a standard
Alsa interface.

The rt-kernel is mandatory to get best audio results. ( I absolutely
don't agree to phofmans post made earlier). It's not only the In-/Out-Latency, which is improved by the rt-kernel. The whole audio chain gets prioritized and optimized.

For standard playback I prefer Amarok. It's IMO the most advanced player under Linux. What I don't like is the limited
configuration capabilites of Xine through Amarok. It is also
a KDE based application. Though it works quite well under
Gnome.

XMMS is still one of the best sounding ones. However it is not really well supported any longer. You might want to give Audacious a try. This comes with Ubuntu Studio. Afaik it even comes with Secret Rabbit Cade upsampler as an option nowadays.

My absolute winner is still brutefir ( which is actually not a player)when it comes to sound quality and pure processing capabililities.
It is well integrated into Alsa. Runs SSE2, assembler and 64bit floats for processing purposes. It's realtime optimised.

If you want to go ahead with convolution and/or FIR crossovers
you won't get around brutefir under Linux. Of course you can use brutefir as another audio-layer, like xine. You could use e.g.
an application such as Amarok, setting it's output to stdout ( standard output) and the brutefir input to stdin (standard input).
You could run brutefir as a deamon in this case.

The before mentioned MOC seems to be a very nice one indeed.
I need to try it.


In general terms I have to admit that applications such as Foobar, J.River, EAC or mastering software such as Samplitude are much more advanced then it's Linux counterparts.
The good thing though. Many of them are running under Wine and interfacing - again - with Alsa.

Applications such as Jack and Brutefir you won't find on other OS
at the same quality.



Cheers
 
The beauty of MOC is that it is a console app. As a result, the processor doesn't need to deal with the huge overhead required by Gnome, KDE, etc. As I said, I run it on a NAS device and the processor is never loaded more than 20%. Give it a shot. Its simplicity is its greatest benefit.
 
Soundcheck,

I truly respect the work you have done in evangelizing linux audio. Nevertheless the issues around real-time, latencies etc. are not a major criterium for PCI cards in playback mode, provided the system throughput is big enough to deliver data to the card before the cards buffer gets exhausted. And ZMN is talking about his PCI card.

The principle of the PCI sound card communication is very nicely described in http://0pointer.de/blog/projects/pulse-glitch-free.html Provided the system supplies ENOUGH UNMODIFIED data until the next interrupt from the sound card, there is no way how the system (kernel, alsa, player) could influence the resulting sound. If it cannot deliver enough data, there is an audible dropout. The SW has no influence on jitter either, as the output is clocked by a separate crystal clock on the card. Quality PCI cards have separate crystals for 44.1 kHz and 48kHz frequency multiples.

For the adaptive USB/FW cards the process is a bit complicated as the card's clock is partially dependent on the rate of incoming data from the USB controller. But I am talking about PCI cards only and I always make sure not to fail to emphasize this condition (which holds for ZMN).
 
Soundcheck,

Thanks for summarizing and sharing your experience! There are lot of options in sense of system configurations, audio engines and players on linux that work best in different combinations. It is a search for an optimal sollution, or parallel solutions as you also mention.

The info (and guidance) is appreciated. Great! :)
 
@Phofman:

It is not worth to argue about the issue. I never tried a quality PCI card. If you're telling us there is no difference, fair
enough. ;)

On USB cards, doesn't matter which transfer mode, reclocked or
not it has a quite an impact. This I can promise all USB-DAC owners around here.

I am also not talking about Xruns. It's more about Jitter.
And as you know jitter is cumulative. In that sense the PCI card has a clear advantage over USB or firewire I'd say.
However some of the best sounding cards money can buy are Firewire - Metric Halo ULN-2 or Apogee Ensemble - unfortunately available for MAC only :mad: . Even a Lynx Two is not better then these. If this has something to do with the datastream or the card itself is another question. ;)

@kuroguy

I am running brutefir from the console terminal too. No X.
My HDD,GPU and screen are off during playback.

Does MOC support stdout ouput mode? Could be nice to use it
with brutefir!

Cheers
 
Phofman,

On my humble little miniPC system there is a PCI (chaintech AV710) and USB (Alien DAC, or OPUS USB) chip to feed audio to. I experienced occasional "glitches" on both in case of 100% load (no RT kernel), but arbitrarily less so with the USB. You mention that USB signal problems can influence the "clock". That is new for me and something I would like to know more about. Where should I look?

I would have guessed a RT kernel would improve scheduling tasks for the USB (audio) as well as PCI (especially under heavy load) and in general "stabilize" audio stream by prioritizing the related processes better.

Concerning glitches: The article you linked makes me hope pulseaudio 0.9.11 will make it into 8.04 final. :)
 
Another Angle

I think the best thing we've got going on in this conversation is the varying approaches taken by all parties here. There's a slightly different implementation for everyone, and I think the more angles on this the better.

So to add my ingredient to the mix; I've been running MPD and been trying out different clients the last week or so, and the audio quality has been very good. As I pointed out before I need a good external DAC to achieve the next step up, but outputting digital from an M-Audio Audiophile 2496 and doing D-A in a decent Sony minidisc deck is good enough for now. I paid £150 for that soundcard about 7 years ago, but you can pick them up for about £60 now. It's a decent bit of hardware and the drivers have been around for ALSA for a long time.

The whole RT linux thing wont really affect me I dont think, but with a USB solution I can see why I would make sense to switch to a realtime kernel. I have the advantage of my linux box not being embedded - its a big quiet grey box in the corner (due to a Scythe fanless heatsink).

Im not too sure if MPD will redirect sound to stdout, but you could put a JACK layer imbetween and that should work.

One question for soundcheck - why dyou use brutefir? Ive read about it several times, and understand what it can do - but what do you use it to achieve exactly? What kind of configuration do you use with it?

mafro
 
soundcheck said:
@Phofman:
However some of the best sounding cards money can buy are Firewire - Metric Halo ULN-2 or Apogee Ensemble - unfortunately available for MAC only :mad: . Even a Lynx Two is not better then these. If this has something to do with the datastream or the card itself is another question. ;)
Cheers

Yo,
It's been a long time. I'm back, lol.
FireWire is better for several reasons.

1- It has a big "PROFESSIONAL" reputation, therefore the best designers, and the best manufacturers, will be most likely to use FireWire on their best, most expensive products, that they can sell to their richest clients.

2- The design actually makes sense. For instance,
- USB ticks come from a crappy IRQ timer, calling the CPU, which then wakes up, grabs the bytes, and sends them to the USB pipe, after having finished whatever it was doing before
- FireWire ticks come from a hardware timer and the FW chip goes on its own to grab the data in RAM and send it
- The DAC box can elect itself Clock Master and then there is no more problems

And about the difference in sound from your resampling experiments :

If you use a non-oversampling DAC, applying sample rate conversion before will change the frequency response. Basically it will shift the sinx/x response of the NOS DAC higher. Therefore it is natural that the sound changes, not subtly.

If you use an oversampling DAC, though, it is different, and the effect you mention of 48k being a multiple of the USB tick frequency makes a lot of sense.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.