Re: why oh why...

2010-06-21 Thread Daniel Hill

 And finally with the last few versions of Ubuntu there is a push for
 pulseaudio which I think is utter rubbish.  It seems to me the real
 problem lies in ALSA's inability to work with more then one source.  There
 are some workarounds that disable ALSA from locking the card to one app.
   
I remember ALSA brought out a patch that allow software mixing for
hardware that didn't support it by default, I can't seem to reproduce it
though, but my .asoundrc file works quite well


Re: why oh why...

2010-06-21 Thread Stephen Irons


On Wed, 2010-06-16 at 10:23 +1200, solor...@epic.geek.nz wrote:
 On Wed, June 16, 2010 09:43, Steve Holdoway wrote:
  ... cant linux get it's sound sorted out properly?

 I share your frustration with Linux sound.  We started with OSS, which was
 okay *if* you had a card that was supported.  Then ALSA came along and it
 was struggle for a bit in the beginning.  To date it still has issues
 playing from more then one source at a time.  So several sound daemons
 were made, esd, arts, etc. that tried to solve that problem.  But then
 they don't play with apps that need real-time access to the hardware.
 
 And finally with the last few versions of Ubuntu there is a push for
 pulseaudio which I think is utter rubbish.  It seems to me the real
 problem lies in ALSA's inability to work with more then one source.  There
 are some workarounds that disable ALSA from locking the card to one app.

The problem is deeper than just alsa...

Alsa has a plugin called dmix, which allows multiple applications to
open an alsa output stream at the same time; the individual sources are
added together.

Similarly, there is a plugin called dshare, which allows multiple
applications to open an alsa input stream simultaneously; the individual
applications get their own copy of the data.

This is an almost good enough solution. The problem is that dmix and
dshare can only operate at a single sample rate at a time. The sample
rate of the sound card is set by the application that first uses a dmix
device.

So if you try to play a DVD or other video source with a 48kHz audio
sample rate at the same time as a CD or other audio source with a
44.1kHz audio sample rate then suddenly the second application finds
that it cannot open the device because the sample rate that it wants
conflicts with the sample rate set by the first application.

Some sound cards (but not many) can have multiple streams operating at
different sample rates. Your typical cheap sound card has a single
stream in each direction that runs at a single sample rate.

Now, alsa has other plugins that do sample rate conversion. So you could
set up a chain of alsa plugins as follows:

DVD-player -- dmix (48 kHz) -- sample-conversion (48--44.1) -- dmix
(44.1) -- sound card

CD-player -- dmix (44.1) -- sound card

Then applications could open either the 48 khz or the 44.1 kHz dmix
device and everything would be fine. However, the application would have
to know to open a different audio device depending on the sample rate. A
music-playing application might have audio sources with BOTH sample
rates, so it would have to open both devices.

A further problem is that these plugins are set up in configuration
files (/etc/asound.conf, ~/.asoundrc). So if someone wants to play or
record at 22050, 24000, 88.2 kHz, 96 kHz sample rate and who knows what
else, he has to modify the config files. And then my digital camera
records audio at 11024 (rather than the more logical 11025 which is 1/4
of CD sample rate)...

You have a similar problem in the reverse direction for audio input --
if we want to record audio for digital video and CD simultaneously.

JACK provides a robust mechanism for coordinating audio at the sample
level between multiple applications, and is ideal for studio-grade
applications. However, it operates at a fixed sample rate and hence does
not solve the DVD-CD sample rate mismatch. It relies on the applications
to do sample rate conversion, or more typically, for the user to ensure
that all his sources use the same sample rate.

Now pulseaudio can provides multiple alsa-compatible devices and does
automatic sample rate conversion and sound-card sharing. It also does
esd-compatible network audio input and output, so that when I am logged
into my Linux box from a Windows box (using Cygwin/X and puTTY), I can
play a video on the Linux box that displays on the Windows screen, and
the sound comes out of the Windows sound card.

So, I believe that pulseaudio really does provide useful functionality.
But it all comes at the cost of higher latency, complexity, and bugs as
the system gets itself worked out.

Stephen Irons



Re: resolution Problem Ubuntu 10.4

2010-06-21 Thread chris
On Fri, 2010-06-18 at 20:06 +1200, Nick Rout wrote:
 On Fri, Jun 18, 2010 at 8:03 PM, chris che...@gmail.com wrote:
  On Fri, 2010-06-18 at 19:29 +1200, Nick Rout wrote:
  On Fri, Jun 18, 2010 at 7:23 PM, Christopher Sawtell csawt...@gmail.com 
  wrote:
   On 18 June 2010 19:17, Nick Rout nick.r...@gmail.com wrote:
   On Fri, Jun 18, 2010 at 6:54 PM, chris che...@gmail.com wrote:
snip
   most of the X ugliness is revealed in /var/log/Xorg.0.log
  
  
   http://amlc.berlios.de/
  
   It just works.
 
  IME not always. In fact there must be a change in X if it is not
  working now and did in a previous edition.
 
  Look for the wrong/non existent edid in the log file.
snip
 
 http://en.wikipedia.org/wiki/Extended_display_identification_data

After following the suggestions offered, I downloaded -compiled the
script, which worked and gave me new modes etc.

However, there is no edid information in the xorg.log files.
Also in the preferencesmonitor gui, it only offers Default monitor,
and all other options greyed out.

I have after some work obtained the edid information for this monitor, a
Viewsonic wms wide 22.  I used the viewsonic edid.exe program on the XP
partition of this box to obtain the edid information. (As an aside, this
programme will not run under Vista);but I am stuck at this point as to
how to get it into the system.

Also, just to check there is not a hardware issue, I installed Linux
mint 10, into am Asus p4, that I have hanging around.  Same result, and
the same limited resolutions.

Further suggestions more than gratefully appreciated, as my 70 year old
brain is nearly at its limit.

(Moans, Oh why could I not have stayed with CPM?)
regards Chris T