Re: [Alsa-user] Output latency

2008-06-11 Thread Clemens Ladisch
stan wrote:
 Florian Faber wrote:
  You want hardware monitoring - there are sound cards that support
  hardware mixing. With good converters you have latencies down to 5
  samples at 192kHz, that would be 0.026ms for each way, 0.052ms over
  all.

 I'm not the original poster, but I'm curious about this.  Can you name a
 card that has this capability supported in alsa?

I know that CMI8788-based cards can do this.

There may be other cards, like the ESI Julia, but I don't know if
monitoring is supported by the driver.


Regards,
Clemens

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output latency

2008-06-11 Thread Clemens Ladisch
Alexander Carôt wrote:
 3.) Rather than using a double buffer for the playout wouldn't it be
 possible to choose only one physical playout buffer and parse the
 captured data in right at the interrupt.

It's unlikely that any code could be fast enough to write the entire
buffer before the hardware starts reading from the buffer; in fact, the
hardware is likely to read the first sample from the buffer at the same
time it is triggering the interrupt for the previous period.

To reduce output latency, just reduce the output buffer size.  For
example, you could use a buffer with 128 samples (with 2 64-sample
periods).


HTH
Clemens

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Audio hardware with pause support

2008-06-11 Thread Florian Winter
Hi,

The snd_pcm_pause function of the ALSA API is not supported on all audio 
hardware.
Is there an official list (e.g. on the web) of known sound hardware, 
which supports this feature? Is there another way to determine whether a 
certain hardware supports snd_pcm_pause without having to test the hardware?

Best regards,
Florian

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Audio hardware with pause support

2008-06-11 Thread Clemens Ladisch
Florian Winter wrote:
 Is there another way to determine whether a certain hardware supports
 snd_pcm_pause without having to test the hardware?

$ grep -rl SNDRV_PCM_INFO_PAUSE sound
sound/arm/pxa2xx-pcm.c
sound/arm/sa11xx-uda1341.c
sound/core/pcm_native.c
sound/drivers/vx/vx_pcm.c
sound/pci/als300.c
sound/pci/atiixp.c
sound/pci/au88x0/au88x0_pcm.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs5535audio/cs5535audio_pcm.c
sound/pci/echoaudio/darla20.c
sound/pci/echoaudio/darla24.c
sound/pci/echoaudio/echo3g.c
sound/pci/echoaudio/gina20.c
sound/pci/echoaudio/gina24.c
sound/pci/echoaudio/indigo.c
sound/pci/echoaudio/indigodj.c
sound/pci/echoaudio/indigoio.c
sound/pci/echoaudio/layla20.c
sound/pci/echoaudio/layla24.c
sound/pci/echoaudio/mia.c
sound/pci/echoaudio/mona.c
sound/pci/emu10k1/emupcm.c
sound/pci/ens1370.c
sound/pci/es1968.c
sound/pci/fm801.c
sound/pci/hda/hda_intel.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/oxygen/oxygen_pcm.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/pci/trident/trident_main.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/ymfpci/ymfpci_main.c
sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
sound/soc/at91/at91-pcm.c
sound/soc/davinci/davinci-pcm.c
sound/soc/omap/omap-pcm.c
sound/soc/pxa/pxa2xx-pcm.c
sound/soc/s3c24xx/s3c24xx-pcm.c
sound/usb/usbaudio.c


Please note that the dmix plugin does not support pausing even if the
hardware device does.


HTH
Clemens

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Audio hardware with pause support

2008-06-11 Thread Florian Winter
Thanks for the hint, Clemens.

If I interpret this information correctly, then it seems that many 
different sound drivers actually support pause, and consequently many 
audio architectures have the functionality as well (or it is emulated by 
the drivers). The real problem is the dmix plugin. In particular, I see 
hda_intel in the list. When I used ALSA with HDA Intel onboard hardware, 
pause was not available, probably due to the dmix plugin being used.

So my next questions are:

 - What is the dmix plugin and what are the benefits of using it?
 - Is it possible to disable the dmix plugin?
 - What consequences does disabling the dmix plugin have? What essential 
features of ALSA will be missing without it?

Best regards,
Florian

Clemens Ladisch wrote:
 Florian Winter wrote:
   
 Is there another way to determine whether a certain hardware supports
 snd_pcm_pause without having to test the hardware?
 

 $ grep -rl SNDRV_PCM_INFO_PAUSE sound
 sound/arm/pxa2xx-pcm.c
 sound/arm/sa11xx-uda1341.c
 sound/core/pcm_native.c
 sound/drivers/vx/vx_pcm.c
 sound/pci/als300.c
 sound/pci/atiixp.c
 sound/pci/au88x0/au88x0_pcm.c
 sound/pci/cmipci.c
 sound/pci/cs4281.c
 sound/pci/cs5535audio/cs5535audio_pcm.c
 sound/pci/echoaudio/darla20.c
 sound/pci/echoaudio/darla24.c
 sound/pci/echoaudio/echo3g.c
 sound/pci/echoaudio/gina20.c
 sound/pci/echoaudio/gina24.c
 sound/pci/echoaudio/indigo.c
 sound/pci/echoaudio/indigodj.c
 sound/pci/echoaudio/indigoio.c
 sound/pci/echoaudio/layla20.c
 sound/pci/echoaudio/layla24.c
 sound/pci/echoaudio/mia.c
 sound/pci/echoaudio/mona.c
 sound/pci/emu10k1/emupcm.c
 sound/pci/ens1370.c
 sound/pci/es1968.c
 sound/pci/fm801.c
 sound/pci/hda/hda_intel.c
 sound/pci/ice1712/ice1712.c
 sound/pci/ice1712/ice1724.c
 sound/pci/intel8x0.c
 sound/pci/intel8x0m.c
 sound/pci/maestro3.c
 sound/pci/mixart/mixart.c
 sound/pci/nm256/nm256.c
 sound/pci/oxygen/oxygen_pcm.c
 sound/pci/pcxhr/pcxhr.c
 sound/pci/riptide/riptide.c
 sound/pci/rme32.c
 sound/pci/rme96.c
 sound/pci/trident/trident_main.c
 sound/pci/via82xx.c
 sound/pci/via82xx_modem.c
 sound/pci/ymfpci/ymfpci_main.c
 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
 sound/soc/at91/at91-pcm.c
 sound/soc/davinci/davinci-pcm.c
 sound/soc/omap/omap-pcm.c
 sound/soc/pxa/pxa2xx-pcm.c
 sound/soc/s3c24xx/s3c24xx-pcm.c
 sound/usb/usbaudio.c


 Please note that the dmix plugin does not support pausing even if the
 hardware device does.


 HTH
 Clemens
   
-- 
Florian Winter
Software-Entwickler


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] snd-dummy 2nd card

2008-06-11 Thread Dominique Michel
Le Tue, 10 Jun 2008 17:47:58 +0300,
alexander merkulov [EMAIL PROTECTED] a écrit :

 need to setup 2nd dummy card
 how to do it?

You must add some device definitions in /etc/modules.d/alsa (or whatever file
your distribution is using):

##  ALSA portion
alias snd-card-0 snd-...
options snd-... index=0
alias snd-card-1 snd-dummy
options snd-dummy index=1
##  OSS/Free portion
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
##  OSS/Free portion - card #2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
## alias
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
# Set this to the correct number of cards.
options snd cards_limit=2

Don't forget to run update-modules.

I use this for virmidi instead of dummy, but I think that must work the same
for the dummy sound card.

Cheers,
Dominique

-- 
Dominique Michel

Mes 3 projets préférés auxquels je contribue:
 * FVWM-Crystal, le bureau basé sur FVWM:
  http://fvwm-crystal.org
 * AlsaPlayer, le lecteur audio avec contrôle de vitesse en continu:
  www.alsaplayer.org
 * L'overlay pour la MAO sous gentoo:
  http://proaudio.tuxfamily.org/wiki/index.php?title=Main_Page

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output latency

2008-06-11 Thread Helge Fredriksen
Did you try the settings in /etc/security/limits.conf suggested on the
Frinika
front page? (http://frinika.sourceforge.net). I noticed quite some
difference in delay for
Terratec Aureon 5.1 Fun cards using JavaSound.

Helge F.

On Wed, Jun 11, 2008 at 10:11 AM, Clemens Ladisch [EMAIL PROTECTED]
wrote:

 Alexander Carôt wrote:
  3.) Rather than using a double buffer for the playout wouldn't it be
  possible to choose only one physical playout buffer and parse the
  captured data in right at the interrupt.

 It's unlikely that any code could be fast enough to write the entire
 buffer before the hardware starts reading from the buffer; in fact, the
 hardware is likely to read the first sample from the buffer at the same
 time it is triggering the interrupt for the previous period.

 To reduce output latency, just reduce the output buffer size.  For
 example, you could use a buffer with 128 samples (with 2 64-sample
 periods).


 HTH
 Clemens

 -
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services for
 just about anything Open Source.
 http://sourceforge.net/services/buy/index.php
 ___
 Alsa-user mailing list
 Alsa-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/alsa-user

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output latency

2008-06-11 Thread Alexander Carôt
Hi Helge,

what we actually discuss is more a principle of the driver related to buffer 
management and in how far this could reduce the latency. But thanks anyway !

-- A l e x

 Original-Nachricht 
 Datum: Wed, 11 Jun 2008 18:06:27 +0200
 Von: Helge Fredriksen [EMAIL PROTECTED]
 An: Clemens Ladisch [EMAIL PROTECTED]
 CC: alsa-user@lists.sourceforge.net, Alexander Carôt [EMAIL PROTECTED]
 Betreff: Re: [Alsa-user] Output latency

 Did you try the settings in /etc/security/limits.conf suggested on the
 Frinika
 front page? (http://frinika.sourceforge.net). I noticed quite some
 difference in delay for
 Terratec Aureon 5.1 Fun cards using JavaSound.
 
 Helge F.
 
 On Wed, Jun 11, 2008 at 10:11 AM, Clemens Ladisch
 [EMAIL PROTECTED]
 wrote:
 
  Alexander Carôt wrote:
   3.) Rather than using a double buffer for the playout wouldn't it be
   possible to choose only one physical playout buffer and parse the
   captured data in right at the interrupt.
 
  It's unlikely that any code could be fast enough to write the entire
  buffer before the hardware starts reading from the buffer; in fact, the
  hardware is likely to read the first sample from the buffer at the same
  time it is triggering the interrupt for the previous period.
 
  To reduce output latency, just reduce the output buffer size.  For
  example, you could use a buffer with 128 samples (with 2 64-sample
  periods).
 
 
  HTH
  Clemens
 
 
 -
  Check out the new SourceForge.net Marketplace.
  It's the best place to buy or sell services for
  just about anything Open Source.
  http://sourceforge.net/services/buy/index.php
  ___
  Alsa-user mailing list
  Alsa-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/alsa-user
 

-- 
Dipl.-Ing. Alexander Carôt
PhD Candidate
Email : [EMAIL PROTECTED]
Tel.: +49 (0)177 5719797



Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output latency

2008-06-11 Thread Alexander Carôt
Hi Jochen,

 2. use a lower frame size, than my codec/systems framing. (e.g. 128  
 instead of 256, but still transmit 256 in one pass)

Yes - a good idea, however, sometimes depending on the actual machine and OS 
(or even low-latency patches) problems might occur when running below 256 
samples/frame - especially when running the coding and network functionality. 
This is why I am trying to approach a solution that simply gets rid of the 
playout latency. 
 
 You know that you can have one frame(-1 sample) additional delay,  
 depending on the absolute framing of sender and receiver sound cards?  
 E.g. the sender starts to grab samples at sample time 0, encodes it  
 and sends it to the receiver. lets say the receiver has exactly the  
 same framing as the sender and starts its play-out at sample time 0 as  
 well. The transmission/decoding/etc needs one sample time and so the  
 receiver has the current frame available at sample time 1. It just  
 played out the last frame (at time 0) and the current frame needs to  
 wait framesize-1 samples, and therefore almost one frame of additional  
 delay. 
 Regarding a double/multi buffers in ALSA, I have not played around  
 yet, but maybe the threshold values for starting the play-out are a  
 good starting point. Did you try those? You know, at play-out, the  
 delay is not introduced by the number of 'periods', but the time the  
 play-out starts.

I once implemented a soundcard synchronisation which parses an incoming buffer 
slightly before the receiving card´s interrupt. The problem in that context is 
that the receiver is also a sender, which messes up this principle into the 
other direction. In turn this means that a sync at T/2 (half of the period) for 
both cards is most useful since it provides an equal delay for both ends. 

The reason why this practically still doen't work is that depending on the 
actual soundcard very often there is a slight soundcard drift which messes up 
this synchronisation over time anyway.

It would be great to keep up the discussion.

Thanks

-- A l e x




 
 Best Regards, jochen
 
 On 10.Jun, 2008, at 17:02 , Alexander Carôt wrote:
 
  If I understand your question correctly, it is because they use two
  different buffers.  If you aren't trying to play the capture  
  buffer, it
  would wreak havoc to try to use it for playback while capture is  
  going
  on.  So there is a buffer for capture and a buffer for playback.  And
  each has a latency.  Someone who understands the system better  
  might be
  able to give a better explanation, or even suggest a workaround.
 
  Sure - there is one input double buffer and one output double  
  buffer. However, I wonder if there is a way to (somehow) get rid of  
  the latter.
 
  The idea is the following :
 
  1.) Of course there has to be an input double buffer which generates  
  the desired block of samples.
  2.) Once this is generated it takes 2,6 ms to generate the next one.
  3.) Rather than using a double buffer for the playout wouldn't it be  
  possible to choose only one physical playout buffer and parse the  
  captured data in right at the interrupt.
 
  Or would this approach lead to timing and synchronisation problems ?  
  I can see that either a parsing slightly too fast or too slow would  
  result in wrong data but anyway - just an idea. What do you think ?
 
  Best regards
 
  -- A l e x
 
 
  -- 
  Dipl.-Ing. Alexander Carôt
  PhD Candidate
  Email : [EMAIL PROTECTED]
  Tel.: +49 (0)177 5719797
 
 
 
  Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
  Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
 
 
 -
  Check out the new SourceForge.net Marketplace.
  It's the best place to buy or sell services for
  just about anything Open Source.
  http://sourceforge.net/services/buy/index.php
  ___
  Alsa-user mailing list
  Alsa-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/alsa-user
 
 - jochen
 gpg: 1024D/FFE35929
 
 

-- 
Dipl.-Ing. Alexander Carôt
PhD Candidate
Email : [EMAIL PROTECTED]
Tel.: +49 (0)177 5719797



GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Output sample rate

2008-06-11 Thread Grant
Where is my output sample rate defined?  I'm trying to make sure mpd
isn't resampling my music before it's sent to the USB DAC.

- Grant

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread stan
Grant wrote:
 Where is my output sample rate defined?  I'm trying to make sure mpd
 isn't resampling my music before it's sent to the USB DAC.

   
If you are playing audio that is in recognized format the rate is 
defined within the audio file itself and was set at time of creation.  
If you want to look at this you can use audacity to load the file and it 
will tell you the frame rate (lower left corner) or you can use sox with 
the stat command to get stats for a file (sox file dummyout.wav stat,  
man sox for more info).  CD quality is 44100 as that is the standard.  
Most digital video sound is at 48000.  Those are the two most common 
frame rates in use today. 
 - Grant
   


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Sergei Steshenko


-Original Message-
From: Grant [EMAIL PROTECTED]
To: alsa-user@lists.sourceforge.net
Date: Wed, 11 Jun 2008 15:35:42 -0700
Subject: [Alsa-user] Output sample rate

 
 Where is my output sample rate defined?  I'm trying to make sure mpd
 isn't resampling my music before it's sent to the USB DAC.
 
 - Grant
 

I initiated a similar thread recently.

The short answer - nowhere.

As I was explained, an application MAY set sample rate.

I think in practical terms use JACK since at launch you must specify sample 
rate and then
it stays constant until you terminate JACK.

Regards,
  Sergei.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 00:35, Grant wrote:

 Where is my output sample rate defined?  I'm trying to make sure mpd
 isn't resampling my music before it's sent to the USB DAC.

Check /proc/asound/card0/pcm0p/sub0/hw_params while mpd is playing (for 
a suitable value of (0,0,0) ofcourse).

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 02:17, Sergei Steshenko wrote:

 From: Grant [EMAIL PROTECTED]

 Where is my output sample rate defined?  I'm trying to make sure mpd
 isn't resampling my music before it's sent to the USB DAC.

 I initiated a similar thread recently.
 
 The short answer - nowhere.
 
 As I was explained, an application MAY set sample rate.

Well, no, an ALSA application _must_ set sample rate -- to the rate of 
the data it then starts feeding the device. The thing is and was just 
that without resampling anything, it's the data and not the card that 
determines this rate. The sampling rate is a property inherent to the data.

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Sergei Steshenko


-Original Message-
From: Rene Herman [EMAIL PROTECTED]
To: Sergei Steshenko [EMAIL PROTECTED]
Date: Thu, 12 Jun 2008 04:12:58 +0200
Subject: Re: [Alsa-user] Output sample rate

The sampling rate is a property inherent to the data.
 
 Rene.

???

Are trying to tell me that sample rate is inherent to analog source connected
to microphone or line input ?

Regards,
  Sergei.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] snd-dummy 2nd card

2008-06-11 Thread Rene Herman
On 11-06-08 17:41, Dominique Michel wrote:

 Le Tue, 10 Jun 2008 17:47:58 +0300,
 alexander merkulov [EMAIL PROTECTED] a écrit :
 
 need to setup 2nd dummy card
 how to do it?
 
 You must add some device definitions in /etc/modules.d/alsa (or whatever file
 your distribution is using):
 
 ##  ALSA portion
 alias snd-card-0 snd-...
 options snd-... index=0
 alias snd-card-1 snd-dummy
 options snd-dummy index=1

options snd-dummy index=1,2 enable=1,1 was more the issue, but:

 ##  OSS/Free portion
 alias sound-slot-0 snd-card-0
 alias sound-slot-1 snd-card-1

--- 8 --- cut here --- 8 ---

 # OSS/Free portion - card #1
 alias sound-service-0-0 snd-mixer-oss
 alias sound-service-0-1 snd-seq-oss
 alias sound-service-0-3 snd-pcm-oss
 alias sound-service-0-8 snd-seq-oss
 alias sound-service-0-12 snd-pcm-oss
 ##  OSS/Free portion - card #2
 alias sound-service-1-0 snd-mixer-oss
 alias sound-service-1-3 snd-pcm-oss
 alias sound-service-1-12 snd-pcm-oss

please note that these aliases have been not necessary for some time now 
as the modules export them themselves:

# modinfo snd-{pcm,mixer,seq}-oss | grep alias
alias:  sound-service-?-12
alias:  sound-service-?-3
alias:  sound-service-?-0
alias:  sound-service-?-8
alias:  sound-service-?-1

 ## alias
 alias /dev/mixer snd-mixer-oss
 alias /dev/dsp snd-pcm-oss
 alias /dev/midi snd-seq-oss

and these should be automatic through the soundcore module handling 
char-major-14 and it requesting sound-slot-? and sound-service-?-?.

So, you can loose everything but the snd-card-?/sound-slot-? aliases.

 # Set this to the correct number of cards.
 options snd cards_limit=2

Or not. I once wasted time tracking down a non-bug due to forgetting I 
had limited the number of cards like this. The default is 8...

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 05:52, Sergei Steshenko wrote:

 From: Rene Herman [EMAIL PROTECTED]

 The sampling rate is a property inherent to the data.

 Are trying to tell me that sample rate is inherent to analog source connected
 to microphone or line input ?

Oh, not again... please get a clue. DATA.

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Sergei Steshenko


-Original Message-
From: Rene Herman [EMAIL PROTECTED]
To: Sergei Steshenko [EMAIL PROTECTED]
Date: Thu, 12 Jun 2008 05:55:40 +0200
Subject: Re: [Alsa-user] Output sample rate

 
 On 12-06-08 05:52, Sergei Steshenko wrote:
 
  From: Rene Herman [EMAIL PROTECTED]
 
  The sampling rate is a property inherent to the data.
 
  Are trying to tell me that sample rate is inherent to analog source 
  connected
  to microphone or line input ?
 
 Oh, not again... please get a clue. DATA.
 
 Rene.
 


Are you trying to tell me that all soundcards support different (at the same 
time)
capture and playback sample rates ?

Are you trying to tell me that in case soundcard is used to play back analog 
data from
a TV or radio card it takes sample rate from the air ? Or from input analog 
signal ?

Yes again - to me ALSA's sample rate implementation looks quite illogical - IMO 
it should
be the other way round - user first mandates sample rate, and then playback 
sources adapt
through resampling if necessary.

Regards,
  Sergei.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 06:30, Sergei Steshenko wrote:

 Yes again - to me ALSA's sample rate implementation looks quite
 illogical - IMO it should be the other way round - user first
 mandates sample rate, and then playback sources adapt through
 resampling if necessary.

Great setup once we have infinitely fast computers to do the resampling 
at any quality level we feel like in realtime. Meanwhile over here in 
the real world we'll continue on our imperfect attempts to make things 
work though.

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Pete Black
Its very simple.

Most sound devices support a number of sample rates. Common ones include 
16 bit @ 44.1khz, 16-bit @ 48khz, 24-bit @ 96 khz etc.

Only one application has exclusive control over the sound hardware at 
any time.

Whatever rate that application opens the soundcard at, is the rate that 
is used to send data to the card.

If the application with exclusive control over the sound hardware is a 
mixer-type daemon (e.g. dmix, esd, artsd, etc.) then all audio streams 
are converted by this application and sent to the sound card using the 
sample rate it opened the hardware with.

Does that make sense?

-Pete





 On 12-06-08 06:30, Sergei Steshenko wrote:

   
 Yes again - to me ALSA's sample rate implementation looks quite
 illogical - IMO it should be the other way round - user first
 mandates sample rate, and then playback sources adapt through
 resampling if necessary.
 

 Great setup once we have infinitely fast computers to do the resampling 
 at any quality level we feel like in realtime. Meanwhile over here in 
 the real world we'll continue on our imperfect attempts to make things 
 work though.

 Rene.

 -
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services for
 just about anything Open Source.
 http://sourceforge.net/services/buy/index.php
 ___
 Alsa-user mailing list
 Alsa-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/alsa-user
   


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 06:53, Pete Black wrote:

 Its very simple.
 
 Most sound devices support a number of sample rates. Common ones
 include 16 bit @ 44.1khz, 16-bit @ 48khz, 24-bit @ 96 khz etc.
 
 Only one application has exclusive control over the sound hardware at
 any time.
 
 Whatever rate that application opens the soundcard at, is the rate
 that is used to send data to the card.
 
 If the application with exclusive control over the sound hardware is
 a mixer-type daemon (e.g. dmix, esd, artsd, etc.) then all audio
 streams are converted by this application and sent to the sound card
 using the sample rate it opened the hardware with.
 
 Does that make sense?

dmix isn't an application (it just mixes behind the scenes) but 
basically, yes, that is how things work.

And given that dmix is default these days (if the card doesn't support 
hardware mixing that is) Sergei's notion of how things might work is how 
things _do_ work in practice right now for anyone who doesn't care 
enough about his audio to disable dmix.

The first A in ALSA stands for advanced though and you can bet your 
testicles that many advanced users do not look favourably upon 
resampling and dmix...

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Demian Martin
Computer audio and sample rate issues are popping up everywhere, driven by
the desire for high quality audio on PC's finally. On Windows and Mac's its
even harder to get it right.

In Alsa (and PC audio architecture in general) the system has a default
sample rate, usually set by the driver it seems, and usually 48 KHz.
Normally all the audio is resampled to this rate to permit mixing audio from
different sources (the system alert noises with your MP3 playback for
instance). However for those of us trying to get very high quality audio out
of the PC it's possible to get the driver, the audio player and the card to
cooperate and play the stream at its original bit perfect' sample rate. It
requires alignment of the audio player app (Xine in my case), Alsa, the
driver for the card (the latest version of the Juli@ driver) and it all
seems to work right after many hours of tweaking.

 

I have NOT played with USB audio. For 44.1 and 48 it should be pretty
straightforward, the higher sample rates will require chip/card specific
drivers something never easy on Linux.

 

On a Mac you pretty much go deep into the system and set the sample rate for
the whole system and change it for every change in source rate. On a PC you
don't want Vista (yet. . . ) and you need to use ASIO and a lot of fiddling.
Which is why I'm using Linux.

 

Demian Martin

Product Design Services

 

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Pete Black
dmix *is* an application, conceptually it is not different to esd, artsd 
or pulseaudio opening the ALSA hardware directly. It just happens to be 
an ALSA plugin and is a part of the signal chain that ALSA-lib sets up 
by default.

You can either:

 a) configure dmix using a custom .asoundrc to use the rate you want and 
restart ALSA.

b) configure an application that will open the sound card with the rate 
you want, and set it to open the sound device directly e.g. hw:0,0 in 
ALSA terms.

The sample rate that is used is determined, plain and simple, by 
whichever application has exclusive control over the sound card.






 dmix isn't an application (it just mixes behind the scenes) but 
 basically, yes, that is how things work.

 And given that dmix is default these days (if the card doesn't support 
 hardware mixing that is) Sergei's notion of how things might work is 
 how things _do_ work in practice right now for anyone who doesn't care 
 enough about his audio to disable dmix.

 The first A in ALSA stands for advanced though and you can bet your 
 testicles that many advanced users do not look favourably upon 
 resampling and dmix...

 Rene.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 07:13, Demian Martin wrote:

 Computer audio and sample rate issues are popping up everywhere, driven 
 by the desire for high quality audio on PC's finally. On Windows and 
 Mac's its even harder to get it right.
 
 In Alsa (and PC audio architecture in general) the system has a default 
 sample rate, usually set by the driver it seems, and usually 48 KHz.

Well, no. I have to comment on this since it gives the wrong impression 
about the design of things. ALSA drivers do not have or set a default 
sampling rate and whether or not the system does depends on you 
considering the dmix plugin intrinsic enough to be the system.

It is enabled by default (as also said in another message just now, if 
the card doesn't support mixing in hardware) which means you might be 
tempted to view it this way, but dmix is still only a fairly recent 
addition and implemented just under prressure of desktop sound needing 
to Just Work (after which everybody goes off and uses soundserver apps 
exclusively anyway it seems, but oh well...).

dmix is a plugin which indeed resamples to 48 kHz. It's easily disabled 
though by just using the hw ALSA device instead of the ALSA device 
named default. To disable dmix from that device is also just a few 
config file edits away...

 Normally all the audio is resampled to this rate to permit mixing audio 
 from different sources (the system alert noises with your MP3 playback 
 for instance). However for those of us trying to get very high quality 
 audio out of the PC it's possible to get the driver, the audio player 
 and the card to cooperate and play the stream at its original bit 
 perfect' sample rate. It requires alignment of the audio player app 
 (Xine in my case), Alsa, the driver for the card (the latest version of 
 the Juli@ driver) and it all seems to work right after many hours of 
 tweaking.

You could've just disabled dmix... :-)

(by editing a card config file under /usr/share/alsa/cards or overriding 
things in /etc/alsa.conf or .asoundrc).

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Output sample rate

2008-06-11 Thread Rene Herman
On 12-06-08 07:17, Pete Black wrote:

 dmix *is* an application, conceptually it is not different [ ... ]

Let's call it a conceptlication then. As said, your basic description 
was correct.

Rene.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user