View Full Version : Intel On Rebuilding The X.Org Linux Desktop
phoronix
02-09-2009, 01:00 PM
Phoronix: Intel On Rebuilding The X.Org Linux Desktop
At FOSDEM 2009 in Keith Packard's talk on the rebuilt Linux desktop, he shared the progress made in composited 3D, monitor auto-plugging, 2D/3D/media shared objects, kernel mode-setting, and kernel-based 2D drawing. Allowing these problems to be addressed was the Graphics Execution Manager for kernel memory management. The Graphics Execution Manager was used instead of TTM (which we talked about several times before at Phoron
http://www.phoronix.com/vr.php?view=13477
This blip.tv-Flash-crap sucks; why cannot we have a free video format, or at least MPEG4, via ordinary HTTP/FTP/younameit?
RealNC
02-09-2009, 01:45 PM
This blip.tv-Flash-crap sucks; why cannot we have a free video format, or at least MPEG4, via ordinary HTTP/FTP/younameit?
Because I want to click and view without prior setup of voodoo.
val-gaav
02-09-2009, 01:58 PM
Because I want to click and view without prior setup of voodoo.
for many people setting up flash under Linux is a voodoo ;)
blip.tv allows you to download the original files too.
As an nvidia user, I am wondering what exactly are they rebuilding. Fixing their drivers so that similarly specced hardware can perform the same?
RealNC
02-09-2009, 02:18 PM
As an nvidia user, I am wondering what exactly are they rebuilding. Fixing their drivers so that similarly specced hardware can perform the same?
Fixing the whole architecture. NVidia performs as well as they do because they invented their own stuff instead of using the archaic and broken X.Org APIs.
[Knuckles]
02-09-2009, 02:37 PM
Sound is broken for Eric's talk...
Ahh. Experience with gtk/cairo/pango vs qt's homemade stuff tells me that this is the good way to go. I hope this improves well enough then for nvidia to switch over.
bugmenot
02-09-2009, 02:58 PM
blip.tv allows you to download the original files too.
Good to know! This in not normal. I found the links, thanks. If anyone wants, I can create torrent files for the videos.
edit: don't know how and why this post appears in this thread, but it applies here, too. So anyway...
russofris
02-09-2009, 03:16 PM
Where can I get me one of those newfangled talking desks? Does it run linux?
MartjeB
02-09-2009, 03:48 PM
Are we supposed to see something on that screen? :)
mattst88
02-09-2009, 04:00 PM
Hmm. I cannot see the person speaking. I cannot see anything on the slides. The signal to noise ratio is very low.
I guess I'll wait until FOSDEM posts the videos on their website (http://fosdem.unixheads.org/) before attempting to watch.
mattst88
02-09-2009, 04:01 PM
Just tried to watch the video of Eric's presentation.
Thank you for killing my ability to hear. Why haven't you fixed this video? If nothing more, remove it.
yogi_berra
02-09-2009, 05:19 PM
As an nvidia user, I am wondering what exactly are they rebuilding. Fixing their drivers so that similarly specced hardware can perform the same?
Intel is pushing for realtime ray tracing as the next "Next Gen" which simply won't work with their current system, so it would make sense that they'd at least attempt to fix their rather bad solution on the platform.
llama
02-09-2009, 06:43 PM
blip.tv allows you to download the original files too.
Then why not link to them, for the benefit of people who don't run non-Free software in their main browser? Part of the point of having non-flash vids is defeated by having the only links to them _inside the flash content_.
I don't want any stupid plugins in my main browser, since I want to be able to have it running for weeks at a time. Flash tends to crash my browser, and I _HATE_ that. So much so that I only have flash set up in seamonkey, not firefox. (via nspluginwrapper, since at least it's AMD64 seamonkey, not a 32bit chroot anymore.)
Besides the stability thing, flash likes to grab the sound device. (I like to avoid crappy software resampling to 48kHz, so I avoid pulseaudio and have mplayer set up to default to ao=alsa:device=hw, rather than the default pcm, which goes through stupid dmix that resamples even when only one thing is playing. Working around the crappy state of Linux audio is another reason to avoid plugins in a browser don't want to have to restart.)
Just tried to watch the video of Eric's presentation.
Thank you for killing my ability to hear. Why haven't you fixed this video? If nothing more, remove it.
Me too. There are brief snatches where the mic wasn't loose or something, where you can hear a few sentences of Eric's talk. The mic levels are well below the full-scale noise, so if you turn it up to hear the talk, then you'll be blasted with clipping as soon as the plug comes loose again. I'm going to try downloading it (which is apparently possible, yay) and playing it through mplayer with -af something_clever.
RealNC
02-09-2009, 07:23 PM
I don't want any stupid plugins in my main browser, since I want to be able to have it running for weeks at a time. Flash tends to crash my browser, and I _HATE_ that. So much so that I only have flash set up in seamonkey, not firefox. (via nspluginwrapper, since at least it's AMD64 seamonkey, not a 32bit chroot anymore.)
There's a 64-bit Flash now.
Besides the stability thing, flash likes to grab the sound device.
ALSA offers dmix and OSS 4 (I use that) offers vmix. All apps, including Flash simply /dev/dsp here at the same time with no problems.
misiu_mp
02-10-2009, 02:30 AM
Looks like they had a problem with the mike when they recorded, so I dont think there is a working version of it. Thats really sucks, the tech team should show more professionalism.
Maybe there is a transcription, so we can still take part of all that interesting stuff that was said?
sylware
02-10-2009, 02:32 AM
As a supporter of free software, could you support open standards and allow the videos to be seen with the <video> html element, please?
srg_13
02-10-2009, 05:02 AM
As a supporter of free software, could you support open standards and allow the videos to be seen with the <video> html element, please?
What, so nobody can see it unless they're using pre-release browsers?
RealNC
02-10-2009, 06:31 AM
Someone forgot that Flash *is* an open standard now.
sylware
02-10-2009, 06:52 AM
What, so nobody can see it unless they're using pre-release browsers?
The web is powerfull. Indeed, on the same page you can have more than 1 way to see a video.:D
sylware
02-10-2009, 06:54 AM
Someone forgot that Flash *is* an open standard now.
Could you provide what that make you said that? Last time I check, only an old action script engine was GPLized.:confused:
RealNC
02-10-2009, 07:25 AM
Could you provide what that make you said that? Last time I check, only an old action script engine was GPLized.:confused:
You don't need to GPL it for it to be an open standard. You're talking about code. You complained about the standard, not the implementation. Adobe's implementation of course isn't open. But it looks to me that the Flash standard is.
I'm talking about this one: http://www.openscreenproject.org/about/faq.html
I didn't delve too deep into it, but it seems it is possible to write your own Flash player based on the opened specifications.
Tomasu
02-10-2009, 08:17 AM
The audio is completely broken on the second video. I hope theres a version where it isn't broken. :(
llama
02-10-2009, 10:36 AM
There's a 64-bit Flash now.
Yeah, I think I heard about that. I still don't want it crashing my Firefox. I'll probably only get to it when Ubuntu's flashplugin-nonfree installs that, since nspluginwrapper works well enough.
ALSA offers dmix and OSS 4 (I use that) offers vmix. All apps, including Flash simply /dev/dsp here at the same time with no problems.
I just said later in that paragraph that I don't like dmix, because it resamples to 48kHz even when only a single 44.1kHz stream is playing. And it doesn't work for 5.1 output. (If anything has the default dmix pcm open, then nothing can open the surround51 pcm). (Yes, I do have 5.1 speakers, Z-5500. :D The TOSLINK output is a separate ALSA pcm device, but when I need 5.1 analog output, e.g. for AAC, I need exclusive access to pcm0.0. Hmm, I wonder if one could write an alsa config that used 6 channel dmix to solve this problem? I wouldn't use it unless it also avoided resampling when only one thing was playing, though. That's my major complaint about dmix.)
Thanks for the reply, though.
llama
02-10-2009, 10:54 AM
The audio is completely broken on the second video. I hope theres a version where it isn't broken. :(
Only for part of the time. Including several minutes at the start...
download the mpeg (http://blip.tv/file/get/Phoronox-05intel926.mpg?referrer=blip.tv&source=1) and play it with something like
mplayer -softvol -softvol-max 1000 -volume 100 -af-adv force=5 -af volnorm=2,equalizer=-30:-25:-8:0:0 Phoronox-05intel926.mpg Boosting the volume with softvol increases the volume of Eric's voice up to near full-scale, but it doesn't make the clipped buzzing any louder because it was already clipped. -af equalizer is doing a bit of high-pass to remove some of the bass component of the clipping. But still turn off your subwoofer, if you have one. :rolleyes:
Also, you'll probably need to reduce the softvol setting a bit to avoid clipping in Eric's voice ( / and * keys on the numpad). Since -softvol is enabled, you're adjusting the softvol amplification, not your ALSA mixer.
During the bits when the audio hookup was loose and buzzing, either skip by 15 second intervals (right arrow), or turn on fast-forward ( ] key, backspace to set speed=1.0).
The first part of the talk that's not interrupted for long enough to be worth listening to is at about 19.5 minutes in. (hit pageup twice, then left arrow twice. The o key cycles through on-screen clock settings.)
I didn't spend time looking for LADSPA filters that could do anything better with the clipping. Probably a notch filter at 60Hz or 120 (err this was Europe, so 50Hz or 100Hz probably) would do the trick.
So you can get some interesting bits of the talk, but I'm sure there are more interesting bits that didn't get recorded. This is the worst talk-video I've _ever_ seen. The speaker isn't even in-frame, and you can't see much of anything on the projector screen the camera is aimed at (same problem with the other video). But at least you could hear most of that one.
sylware
02-10-2009, 11:16 AM
You don't need to GPL it for it to be an open standard. You're talking about code. You complained about the standard, not the implementation. Adobe's implementation of course isn't open. But it looks to me that the Flash standard is.
I'm talking about this one: http://www.openscreenproject.org/about/faq.html
I didn't delve too deep into it, but it seems it is possible to write your own Flash player based on the opened specifications.
:eek: I haven't known that.
Basically, this is another framework. It's huge (SWF/FLV/AMF/ActionScript). Adobe tries to create a parallel web. Very dangerous.
The cost of implementing of compliant "flash framework" is huge. Supporting the <video> html element is quite less work for a web browser.
Hopefully, the web masters from phoronix will understand that and support the use of the <video> html element (it's less work than embedding a flash player).
RealNC
02-10-2009, 11:55 AM
I just said later in that paragraph that I don't like dmix, because it resamples to 48kHz even when only a single 44.1kHz stream is playing.
What's bad about resampling?
Anyway, FWIW, OSS 4 here offers a vmix option to do 44.1kHz instead of 48.
bugmenot
02-10-2009, 12:08 PM
RealNC: I think most people here agree that flash is simply bad for the web. And if you have another opinion then this does not matter. No one should be forced to use a proprietary software. And Michael supports the use of non-free software here, because
1. he did not link to a real video file (would be most easily possible)
2. he did not choose a platform that is supported by gnash (e.g. youtube)
3. he did not say that the video service provides also the source video files.
I'd say there is much room for improvement and it does not matter if flash works or not, nor if it is an open standard (if no open source software implements this). The opinion of people who don't want to run software of which they cannot read the code must be accepted.
And most users of this page would be probably more happy about a video element, because if the browser does not support that the world does not go under.
Please stop defending flash. It is the decision of the user. No difference if flash works or not. Thanks.
RealNC
02-10-2009, 12:46 PM
No one's forcing you to use flash. I just find it funny that you don't want to use it even though the rest of the world does. It works. It's easy to install. It's better than having to download videos manually. You just click and view. I would be not happy if the primary way Michael chooses to link to videos were NOT flash.
Additional links are always good, I agree. But your reasons of not using flash are laughable.
mattst88
02-10-2009, 12:50 PM
No one's forcing you to use flash.
I only quote this piece of your message because the rest is entirely irrelevant.
If he wishes to watch the video, then he has to use flash. From basic logic, see if you can figure out where I'm going.
RealNC
02-10-2009, 12:52 PM
No one's forcing him to watch the video either :D
llama
02-10-2009, 01:26 PM
What's bad about resampling?
It's not a lossless transformation. I didn't spend 350$ on speakers just to feed them distorted signals. I admit I would probably be hard-pressed to tell the difference in a blind listening test, but I'm a perfectionist, so it offends me when my computer does something stupid.
I have a digital audio output on my PC, so the DAC in my speaker system (Logitech Z-5500, which I highly recommend) will see the 44.1KHz PCM data direct from the FLAC decode, or mp3 or whatever, if I send it out the alsa "hw" pcm device.
wikipedia has an article on it http://en.wikipedia.org/wiki/Sample_rate_conversion, but it doesn't go into detail about the kinds of distortion. It does make it clear that there is some distortion, though.
Anyway, FWIW, OSS 4 here offers a vmix option to do 44.1kHz instead of 48. Good to know.
llama
02-10-2009, 01:40 PM
No one's forcing you to use flash. I just find it funny that you don't want to use it even though the rest of the world does. It works. It's easy to install. It's better than having to download videos manually.
Not for the second one, which requires some audio filtering to make it easier on the ears to skip past the disconnected-mic noisy bits.
You just click and view. I would be not happy if the primary way Michael chooses to link to videos were NOT flash.
Additional links are always good, I agree. But your reasons of not using flash are laughable. Non-flash video doesn't require a download-then-play setup. There are moz plugins for mplayer, vlc, and gstreamer. Then you can use a decent codec like h.264. Which could probably compress the hell out of a static scene like these vids with much less fuzz far from a keyframe. (anyone else notice the text on the blackboard drifting into unreadable fuzz a while after a keyframe?) Or you could use ogg(theora+vorbis), and it would play with software that could be included by any GNU/Linux distro as part of the default install without legal worries.
Flash (adobe's implementation) is not very good compared to e.g. mplayer. It doesn't use HW acceleration to scale video to fullscreen, so if you have anything slower than a core2, it will be all jerky if you fullscreen. Even on a core2, it uses tons of CPU. If you embed a normal video file, and someone wants to download a copy, oh look, they already have a copy in /tmp. Plus, Adobe's flash plugin only goes fullscreen if the flash applet has a button for it. And with youtube, it opens a new popup window, and seems to re-download the video or something stupid. mplayer's browser plugin just goes fullscreen with Xv like standalone mplayer. (the plugin really just runs mplayer with -wid <window ID> or something, so it's normal mplayer rendering into a window.)
I admit flash does some things pretty well, but it's not the best solution for everything. BTW, fellow flash-dislikers, there is a FF extension that helps: http://flashblock.mozdev.org/. Then the flash plugin doesn't even run unless you click on the flash icon in the rectangle where it would appear. So no more flash adds screwing up your browser. I still just disable flash entirely in Firefox, and run Seamonkey when I find something in flash that I actually want to look at. It's pretty easy to drag&drop a link from the location bar. If you have plenty of RAM, it's nicer than having your main browser with all your tabs crash sometimes.
KDesk
02-10-2009, 03:55 PM
It is also possible to change the resampling of dmix in Alsa and force it to 44.1KHz, without the need of the useless and deprecated Open Sound System.
http://blog.sarine.nl/2008/12/21/dmix-the-pain-or-mpd-high-cpu-usage/
So, the solution would be to put this in the asound.conf or asoundrc (http://alsa.opensrc.org/.asoundrc) file.
pcm.!default {
type plug
slave.pcm {
type dmix
ipc_key 1024
slave {
pcm “hw:0,0″
rate 44100
}
}
}
ALSA should start working with this crap dmix to be able to have a good sound quality without complicated configurations, compared to windows... one day, maybe after the Linux graphics battle finish.
Wasn't Intel planning to make a GPU with dedicated video memory? Why they don't make a working GEM/TTM and EXA/UXA for every one, not only for one graphics company...
spykes
02-10-2009, 04:21 PM
Wasn't Intel planning to make a GPU with dedicated video memory? Why they don't make a working GEM/TTM and EXA/UXA for every one, not only for one graphics company...
Maybe because they don't have the hardware specs from others companies (and also because they are not paid to work directly for the competitor).
Even if they work for themselves (like Nvidia), at least they are making free and open things, that others can use and/or adapt if they want.
No one's forcing you to use flash. I just find it funny that you don't want to use it even though the rest of the world does. It works. It's easy to install. It's better than having to download videos manually. You just click and view. I would be not happy if the primary way Michael chooses to link to videos were NOT flash.
Additional links are always good, I agree. But your reasons of not using flash are laughable.
Flash sucks. Get over it.
The reason the "rest of the world" uses it is just illustrates the piss-poor state of Windows default players, not how wonderful or useful flash is.
People tried for ages to embed quicktime or realplayer or windows media player bullshit into their browsers and that software is so shitty that most users rejected it outright.
Flash video players exist not because they are so good, but because WMP is so shitty.
In Linux we don't have this problem. VLC or Mplayer or Totem can handle playing videos just fine.
Flash is wonderful and useful if you like:
1. Having videos play using twice the CPU and twice the memory usage
2. You like having to re-download the same video over and over and over again each time you want to use it.
3. You like having long waits and really really really really shitty seek performance.
Hell I can't even figure out how to make this particular flash player seek at all. I guess I have no choice but to sit and watch the stupid thing all the way through and god forbid I want to close my browser.
Because I LOVE the fact that I have to run proprietary software that has shitty and buggy performance compared to the number of high quality and fast media players.
Anyways the quality of the video is extremely poor and you can't hear what the person is saying nor what is on the screen. Using mplayer I can make it somewhat bearable and control audio through filters and whatnot to make it hearable, but on this flash player it is impossible.
Let me see how critically difficult it is to play videos that I have to download.
Hrmm....
1. Click download link
wait
2. Video plays.
Your right. That is way too difficult.
It is also possible to change the resampling of dmix in Alsa and force it to 44.1KHz, without the need of the useless and deprecated Open Sound System.
Well it's the audio card driver to know what sound formats the cards can accept and then translate that into something that the card can receive without puking or having high cpu load.
So if people are having issues with wrong audio formats being sent to the card then this is a driver issue and if you don't want to deal with it in the future a good way is to file a bug report and hopefully it'll get fixed.
RealNC
02-10-2009, 04:43 PM
It is also possible to change the resampling of dmix in Alsa and force it to 44.1KHz, without the need of the useless and deprecated Open Sound System.
I'm using OSS 4, not the deprecated OSS inside the Linux kernel.
ALSA should start working with this crap dmix to be able to have a good sound quality without complicated configurations
Like OSS 4? :D
bugmenot
02-10-2009, 07:40 PM
Flash sucks. Get over it.
The reason the "rest of the world" uses it is just illustrates the piss-poor state of Windows default players, not how wonderful or useful flash is.
People tried for ages to embed quicktime or realplayer or windows media player bullshit into their browsers and that software is so shitty that most users rejected it outright.
Flash video players exist not because they are so good, but because WMP is so shitty.
In Linux we don't have this problem. VLC or Mplayer or Totem can handle playing videos just fine.
Flash is wonderful and useful if you like:
1. Having videos play using twice the CPU and twice the memory usage
2. You like having to re-download the same video over and over and over again each time you want to use it.
3. You like having long waits and really really really really shitty seek performance.
Hell I can't even figure out how to make this particular flash player seek at all. I guess I have no choice but to sit and watch the stupid thing all the way through and god forbid I want to close my browser.
Because I LOVE the fact that I have to run proprietary software that has shitty and buggy performance compared to the number of high quality and fast media players.
Anyways the quality of the video is extremely poor and you can't hear what the person is saying nor what is on the screen. Using mplayer I can make it somewhat bearable and control audio through filters and whatnot to make it hearable, but on this flash player it is impossible.
Let me see how critically difficult it is to play videos that I have to download.
Hrmm....
1. Click download link
wait
2. Video plays.
Your right. That is way too difficult.
Well said, drag!
I really hope those running Phoronix consider what you've written as well as others who have echoed your sentiments.
numasan
02-10-2009, 08:46 PM
Hmm.. I'm not anti-flash, but would definitely prefer a free alternative! I Look forward to the ogg video html inclusion in Firefox 3.1, and it would be only logical for Phoronix to make use of that. On one condition:
Don't ever post a POS quality video (also the TI mini-projector video) like that again! Seriously, have Phoronix checked the videos before posting them? Assuming you did, where is the "Excuse us for the technical problems, and expect a shock if you wear headphones" note? I appreciate Phoronix trying to deliver videos from conferences, but in these cases it would be more professional to simply remove them. Also, why post videos at all, when all they show (or not show..) is irrelevant? Delivering mp3/ogg of the speeches would make more sense.
llama
02-10-2009, 09:10 PM
Hmm.. I'm not anti-flash, but would definitely prefer a free alternative! I Look forward to the ogg video html inclusion in Firefox 3.1, and it would be only logical for Phoronix to make use of that. On one condition:
Don't ever post a POS quality video (also the TI mini-projector video) like that again! Seriously, have Phoronix checked the videos before posting them? Assuming you did, where is the "Excuse us for the technical problems, and expect a shock if you wear headphones" note? I appreciate Phoronix trying to deliver videos from conferences, but in these cases it would be more professional to simply remove them. Also, why post videos at all, when all they show (or not show..) is irrelevant? Delivering mp3/ogg of the speeches would make more sense.
Were you still watching by the last half of the first talk, when keithp got up and was demoing keystone-distortion correction with randr 1.3? You could see to white part of the projector output make the shapes he was talking about reshaping his desktop to... See, the video wasn't useless. :p But yeah, that was about it for the utility of the video.
I would have liked phoronix to mention that the quality sucks and you can't see much, so only take the time to listen (and probably not watch) if you're really interested. And seriously, edit the second vid to remove the minutes-long sections of lost audio. But I don't wish that the videos were taken down or never posted. I'm glad I heard the talks. I find it interesting to know something about the personality of the devs, which you can tell from the way they joke about things in their talk, and stuff like that.
llama
02-10-2009, 09:28 PM
It is also possible to change the resampling of dmix in Alsa and force it to 44.1KHz, without the need of the useless and deprecated Open Sound System.
That just changes to another fixed frequency. I don't want any 48kHz things resampled to 44.1kHz either! Although it's mostly movies, which I play with mplayer which I have configured to use the hw pcm, not the default dmix pcm. They use the TOSLINK passthrough for AC3 & DTS, anyway. :cool: Still, there are games that output 48kHz, and stuff.
Still, probably useful. Thanks.
Wasn't Intel planning to make a GPU with dedicated video memory? Why they don't make a working GEM/TTM and EXA/UXA for every one, not only for one graphics company... EXA does work for everyone. One of the talks, probably Eric's IIRC, referred to EXA as being mostly the radeon accel architecture. As other have said, other drivers can convert to UXA and/or GEM whenever they want.
It makes a lot of sense to do all this experimental work on just one driver (intel), because they've had to go back and re-write whole chunks of things after getting feedback from the kernel people, for example. So if they'd spent extra time because of more kinds of HW to worry about when they were just getting the first version written, it would have been more wasted work that they had to throw out.
There's also the fact that several of the key people (keithp and Eric Anholt, for example) are Intel employees paid to make the Intel driver work well. It's great that they're doing it by making the whole infrastructure suck less. (listen to the talks about how much memory copying used to happen, and how mesa used to need to keep a second copy of every texture in case the (lack of) memory manager tossed the old one. I remember vegastrike using huge amounts of memory on g965 a couple years ago. I think it's better now, but I also have 4GB instead of 2GB, and a lot of things have changed in vs (precompressed textures!)...)
KDesk
02-10-2009, 10:51 PM
Well it's the audio card driver to know what sound formats the cards can accept and then translate that into something that the card can receive without puking or having high cpu load.
That's not a driver problem nor sound card problem, that's ALSA's problem.
http://alsa.opensrc.org/index.php/Dmix#Does_dmix_affect_sound_quality.3F
Dmix by default uses 48kHz sample rate. So, if your source is 44.1kHz, it will be upsampled to 48khz.
To resample from 44.1KHz to 48KHz is bad for the quality and the cpu usage.
So if people are having issues with wrong audio formats being sent to the card then this is a driver issue and if you don't want to deal with it in the future a good way is to file a bug report and hopefully it'll get fixed.
The problem has always been arts, esd, dmix, and currently it is Dmix or pulseaudio. If you want higher resample quality the CPU usage increases.
A dmix as a software mixer is bad, but now it's better than it was some years ago.
But sure in many cases are driver bugs.
And yes, Flash sucks, even more if it's close sources, it sucks more!
I'm using OSS 4, not the deprecated OSS inside the Linux kernel.
I haven't used OSS 4.x so I can't know if it is complicated to configure or not, but to install and configure OSS (http://www.opensound.com/wiki/index.php/Configuring_Applications_for_OSSv4) without having problems... to many problems... like with pulseaudio.
That just changes to another fixed frequency. I don't want any 48kHz things resampled to 44.1kHz either! Although it's mostly movies, which I play with mplayer which I have configured to use the hw pcm, not the default dmix pcm. To use the passthrough for AC3 & DTS. Still, there are games that output 48kHz, and stuff.
Yes, you are right, that's a problem, it is fixed. But to mix the sound, it has to be in one fixed frequency, so there is where we have to choose between the common audio CD 44.1KHz or DVD, games, etc.
I would like to know how Vista or OS X does this of resampling and mixing audio.
llama
02-11-2009, 12:05 AM
Yes, you are right, that's a problem, it is fixed. But to mix the sound, it has to be in one fixed frequency, so there is where we have to choose between the common audio CD 44.1KHz or DVD, games, etc.
When there's only one stream, why not play it at native rate? Then either keep the HW at the sample rate of the first stream, or switch to your favourite fixed frequency when more than one client has the sound device open. Or when more than one client has the sound dev open & not paused. But switching sample rates probably unavoidably introduces audible glitches and latency (HW HW dependent), so you want to avoid doing it too frequently. Maybe keep resampling for a few seconds after dropping back to 1 stream, in case another second stream appears right away.
Oh yeah, that's the other downside to dmix: It doesn't support pause, so when you single-step frame-by-frame in mplayer, the audio gets ahead of the video and the video goes in a big burst when you unpause. mplayer could be smarter about this, but it isn't, and only works well with -ao alsa when HW pause is supported.
dmix could be a lot better with more special-casing for one stream. That would solve both of those complaints (for me, since I don't run any crappy desktop stuff that keeps a sound device open for your whole session. Nor any of the stupid audio players like rhythymbox that only has a pause button, not a stop button. let go of my audio device, you bastard...) That would make dmix a lot less sucky for something that's enabled in the default config.
SURVEY QUESTION: Do you usually only have a single client for your dmix pcm when you're not actually listening to two things at once? e.g. just watching a movie or listening to some music. Try sudo lsof /dev/snd/* (yes, you need root, because e.g. pulseaudio will have permissions you don't, so you can't access its /proc/pid/fd) If you see more than one process on /dev/snd/pcmC0D0p, you have more than one thing playing on device 0 of card 0, paused or otherwise.
Does anyone know how pulseaudio compares on any of this? I usually killall pulseaudio, but I haven't gotten around to weeding it out of the default X startup script, and it's part of Ubuntu's default install. I should probably just remove the package, since it's easy enough to reinstall if I want it. But I guess I keep meaning to check it out and see if it's better than dmix. So, is it?
mirza
02-11-2009, 08:37 AM
Actually, considering that recording took place in room next to one where Keith Packard had talk, quality is not all that bad.
RealNC
02-11-2009, 09:48 AM
To resample from 44.1KHz to 48KHz is bad for the quality and the cpu usage.
Quality depends on the resampling algorithm. I have 7 choices here: Fast, low, medium, high, high+, production and "none" which probably lets the sound card handle it if it can do hardware mixing/resampling.
Neither of them produce any significant CPU load (not even 1%; I'm on Intel Core 2 E6600.)
Btw, most cards only support 48kHz, so even if you don't resample in software, the card itself will still do it and probably with an inferior algorithm then what ALSA or OSS4 offer, so in these cases it might be better to rather resample to 48kHz to avoid hardware resampling. Of course if you're sure your card doesn't resample, then your concern is valid.
I haven't used OSS 4.x so I can't know if it is complicated to configure or not, but to install and configure OSS (http://www.opensound.com/wiki/index.php/Configuring_Applications_for_OSSv4) without having problems... to many problems... like with pulseaudio.
Yeah, OSS4 will probably not solve everyone's problems. I just mentioned it because it happened to solve mine and I'm very happy with it, so YMMV. Probably for you ALSA is a better option.
llama
02-11-2009, 10:53 AM
Quality depends on the resampling algorithm. I have 7 choices here: Fast, low, medium, high, high+, production and "none" which probably lets the sound card handle it if it can do hardware mixing/resampling.
Neither of them produce any significant CPU load (not even 1%; I'm on Intel Core 2 E6600.)
That's pretty efficient. I thought good-quality resampling took more CPU than that, but maybe not with well-written asm... One of the dmix links someone posted had someone mentioning that ALSA's dmix took 30% of the CPU on his Atom netbook. So yeah, Atom is where this matters for more than audio quality.
Btw, most cards only support 48kHz, so even if you don't resample in software, the card itself will still do it and probably with an inferior algorithm then what ALSA or OSS4 offer, so in these cases it might be better to rather resample to 48kHz to avoid hardware resampling. Of course if you're sure your card doesn't resample, then your concern is valid.
Do you mean most add-in sound cards, like emu10k and descendents from Creative Labs? They support multiple streams in hardware, so don't software mixing either. I thought most AC97 and HDA onboard sound cards supported 44.1KHz. My DG965WH mobo uses a nice Sigmatel STAC9271D codec (http://www.idt.com/?genID=STAC9271&source=products_genericPart_STAC9271, http://www.idt.com/products/getDoc.cfm?docID=18451989) for it's HDA, which supports 44.1, 48, 88.2, 96, 176.4, and 192kHz sample rates, at 16, 20, or 24 bit integers per sample (no hw float support). They claim a 105dB SNR for the DAC, and 95dB for the ADC. That's just for the audio chip, not the whole mobo, but I never hear any hiss when I crank up my speakers and play digital silence. Are other HDA codecs typically worse? I've never been a fan of Realtek's cheap-ass ethernet designs, which burden the CPU, but are their audio codecs actually ok?
Anyway, isn't it mostly just add-in gamer-targetted cards that are 48kHz-only?
RealNC
02-11-2009, 11:18 AM
Maybe. I've used some cards from Creative over the years ("Live" and "Audigy" models) and OSS always reports their "native" sample rates starting at 48kHz. The only case I've seen 44.1kHz in the list was with an Intel HDA on-board, no idea which chip exactly it used. But an older AC97 on-board codec I had (some RealTek chip I think) was also only able to use 48k and up. So I guess it's not only add-in cards that resample 44.1->48.
llama
02-11-2009, 12:30 PM
Maybe. I've used some cards from Creative over the years ("Live" and "Audigy" models) and OSS always reports their "native" sample rates starting at 48kHz. The only case I've seen 44.1kHz in the list was with an Intel HDA on-board, no idea which chip exactly it used.
you can tell what codec chip you have by looking at alsamixer:
Card: HDA Intel
Chip: SigmaTel STAC9271D
View: [Playback] Capture All
...
grep Codec /proc/asound/card0/codec#2
Codec: SigmaTel STAC9271D
(that grep is slow because the kernel takes a long time to generate the file, probably querying hardware settings, not because it's so big that grep has to chew it for a while.)
But an older AC97 on-board codec I had (some RealTek chip I think) was also only able to use 48k and up. So I guess it's not only add-in cards that resample 44.1->48.
Hmm, ok. My old via K7 mobos with AC97 I think had 44.1 kHz capable DACs.
I wonder if dmix can resample to 96kHz/24bit? That would probably avoid any audible distortion, at the expense of a lot more CPU.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.