Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-04-28 Thread Takashi Iwai
At Sun, 27 Apr 2008 02:38:06 +0300,
Sergei Steshenko wrote:
 
 On Sat, 26 Apr 2008 10:10:46 +0200
 Takashi Iwai [EMAIL PROTECTED] wrote:
 
  At Fri, 25 Apr 2008 20:45:03 +0300,
  Sergei Steshenko wrote:
   
   On Fri, 25 Apr 2008 16:23:06 +0200
   Takashi Iwai [EMAIL PROTECTED] wrote:
   
At Fri, 25 Apr 2008 16:19:38 +0200,
I wrote:
 
 At Thu, 27 Mar 2008 01:58:50 +0100,
 Rene Herman wrote:
  
  On 26-03-08 23:57, Bill Unruh wrote:
  
   On Wed, 26 Mar 2008, Helge Fredriksen wrote:
   
   Ok, here's what I found out:
  
   Since these cards seem to lack the support for doing frequency 
   conversion in
   HW, you simply need to use the alsa plugin
   plughw instead of hw when referring to the card:
  
   arecord -Dplughw:0  test.wav
   aplay -Dplughw:0 test.wav
   
   AFAIK, alsa frequency conversion is pretty primative ( linear
   interpolation) which produces a huge amount of noise/distortion.
  
  The default is, but if you install the alsa-plugins package (and 
  libsamplerate) and add a line
  
  defaults.pcm.rate_converter samplerate
 
 Or speexrate.  This is usually much faster.

And forgot to write: you don't have to add anything to asoundrc for
speexrate plugin.  Install it, then alsa-lib will pick it up
automatically.


Takashi

   
   After some web search I see that there are several quality settings for
   speexrate.
   
   How does one choose/change the quality settings ?
  
  Use speexrate_best instead of speexrate, for example.
  See alsa-plugins/doc/speexrate.txt for details.
  
  
  Takashi
  
 
 Thanks.
 
 I've just read
 
 /usr/share/doc/packages/alsa-plugins/speexrate.txt
 
 file and I understand its contents, specifically, the
 
 
 Or, more easily, define a global variable defaults.pcm.rate_converter,
 which is used as the default converter type by plug and rate plugins:
 
 defaults.pcm.rate_converter speexrate
 
 Write the above in your ~/.asoundrc or /etc/asound.conf.
 
 
 part this way:
 
 I can edit /etc/asound.conf file and add, say,
 
 defaults.pcm.rate_converter speexrate_best
 
 line anywhere in the /etc/asound.conf file,
 
 Is this understanding correct ?

Yes.

 I read the file on my SUSE 10.3. laptop, hope it's good enough version.
 
 ...
 
 I've just discovered there is no /etc/asound.conf file on my laptop:
 
 
 [EMAIL PROTECTED]:~ ls /etc/asound*
 /etc/asound.state
 [EMAIL PROTECTED]:~
 .
 
 Should I create /etc/asound.conf ? Should it contain just one
 
 defaults.pcm.rate_converter speexrate_best
 
 line ?

Yes.  But I guess you barely notice the difference of output quality
from the default speexrate (although you'll notice the difference of
CPU usage :)


Takashi

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-04-26 Thread Takashi Iwai
At Fri, 25 Apr 2008 20:45:03 +0300,
Sergei Steshenko wrote:
 
 On Fri, 25 Apr 2008 16:23:06 +0200
 Takashi Iwai [EMAIL PROTECTED] wrote:
 
  At Fri, 25 Apr 2008 16:19:38 +0200,
  I wrote:
   
   At Thu, 27 Mar 2008 01:58:50 +0100,
   Rene Herman wrote:

On 26-03-08 23:57, Bill Unruh wrote:

 On Wed, 26 Mar 2008, Helge Fredriksen wrote:
 
 Ok, here's what I found out:

 Since these cards seem to lack the support for doing frequency 
 conversion in
 HW, you simply need to use the alsa plugin
 plughw instead of hw when referring to the card:

 arecord -Dplughw:0  test.wav
 aplay -Dplughw:0 test.wav
 
 AFAIK, alsa frequency conversion is pretty primative ( linear
 interpolation) which produces a huge amount of noise/distortion.

The default is, but if you install the alsa-plugins package (and 
libsamplerate) and add a line

defaults.pcm.rate_converter samplerate
   
   Or speexrate.  This is usually much faster.
  
  And forgot to write: you don't have to add anything to asoundrc for
  speexrate plugin.  Install it, then alsa-lib will pick it up
  automatically.
  
  
  Takashi
  
 
 After some web search I see that there are several quality settings for
 speexrate.
 
 How does one choose/change the quality settings ?

Use speexrate_best instead of speexrate, for example.
See alsa-plugins/doc/speexrate.txt for details.


Takashi

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-04-26 Thread Sergei Steshenko
On Sat, 26 Apr 2008 10:10:46 +0200
Takashi Iwai [EMAIL PROTECTED] wrote:

 At Fri, 25 Apr 2008 20:45:03 +0300,
 Sergei Steshenko wrote:
  
  On Fri, 25 Apr 2008 16:23:06 +0200
  Takashi Iwai [EMAIL PROTECTED] wrote:
  
   At Fri, 25 Apr 2008 16:19:38 +0200,
   I wrote:

At Thu, 27 Mar 2008 01:58:50 +0100,
Rene Herman wrote:
 
 On 26-03-08 23:57, Bill Unruh wrote:
 
  On Wed, 26 Mar 2008, Helge Fredriksen wrote:
  
  Ok, here's what I found out:
 
  Since these cards seem to lack the support for doing frequency 
  conversion in
  HW, you simply need to use the alsa plugin
  plughw instead of hw when referring to the card:
 
  arecord -Dplughw:0  test.wav
  aplay -Dplughw:0 test.wav
  
  AFAIK, alsa frequency conversion is pretty primative ( linear
  interpolation) which produces a huge amount of noise/distortion.
 
 The default is, but if you install the alsa-plugins package (and 
 libsamplerate) and add a line
 
 defaults.pcm.rate_converter samplerate

Or speexrate.  This is usually much faster.
   
   And forgot to write: you don't have to add anything to asoundrc for
   speexrate plugin.  Install it, then alsa-lib will pick it up
   automatically.
   
   
   Takashi
   
  
  After some web search I see that there are several quality settings for
  speexrate.
  
  How does one choose/change the quality settings ?
 
 Use speexrate_best instead of speexrate, for example.
 See alsa-plugins/doc/speexrate.txt for details.
 
 
 Takashi
 

Thanks.

I've just read

/usr/share/doc/packages/alsa-plugins/speexrate.txt

file and I understand its contents, specifically, the


Or, more easily, define a global variable defaults.pcm.rate_converter,
which is used as the default converter type by plug and rate plugins:

defaults.pcm.rate_converter speexrate

Write the above in your ~/.asoundrc or /etc/asound.conf.


part this way:

I can edit /etc/asound.conf file and add, say,

defaults.pcm.rate_converter speexrate_best

line anywhere in the /etc/asound.conf file,

Is this understanding correct ?

I read the file on my SUSE 10.3. laptop, hope it's good enough version.

...

I've just discovered there is no /etc/asound.conf file on my laptop:


[EMAIL PROTECTED]:~ ls /etc/asound*
/etc/asound.state
[EMAIL PROTECTED]:~
.

Should I create /etc/asound.conf ? Should it contain just one

defaults.pcm.rate_converter speexrate_best

line ?

Thanks,
  Sergei.


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-04-25 Thread Takashi Iwai
At Thu, 27 Mar 2008 01:58:50 +0100,
Rene Herman wrote:
 
 On 26-03-08 23:57, Bill Unruh wrote:
 
  On Wed, 26 Mar 2008, Helge Fredriksen wrote:
  
  Ok, here's what I found out:
 
  Since these cards seem to lack the support for doing frequency conversion 
  in
  HW, you simply need to use the alsa plugin
  plughw instead of hw when referring to the card:
 
  arecord -Dplughw:0  test.wav
  aplay -Dplughw:0 test.wav
  
  AFAIK, alsa frequency conversion is pretty primative ( linear
  interpolation) which produces a huge amount of noise/distortion.
 
 The default is, but if you install the alsa-plugins package (and 
 libsamplerate) and add a line
 
 defaults.pcm.rate_converter samplerate

Or speexrate.  This is usually much faster.


Takashi

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-04-25 Thread Takashi Iwai
At Fri, 25 Apr 2008 16:19:38 +0200,
I wrote:
 
 At Thu, 27 Mar 2008 01:58:50 +0100,
 Rene Herman wrote:
  
  On 26-03-08 23:57, Bill Unruh wrote:
  
   On Wed, 26 Mar 2008, Helge Fredriksen wrote:
   
   Ok, here's what I found out:
  
   Since these cards seem to lack the support for doing frequency 
   conversion in
   HW, you simply need to use the alsa plugin
   plughw instead of hw when referring to the card:
  
   arecord -Dplughw:0  test.wav
   aplay -Dplughw:0 test.wav
   
   AFAIK, alsa frequency conversion is pretty primative ( linear
   interpolation) which produces a huge amount of noise/distortion.
  
  The default is, but if you install the alsa-plugins package (and 
  libsamplerate) and add a line
  
  defaults.pcm.rate_converter samplerate
 
 Or speexrate.  This is usually much faster.

And forgot to write: you don't have to add anything to asoundrc for
speexrate plugin.  Install it, then alsa-lib will pick it up
automatically.


Takashi

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-26 Thread Helge Fredriksen
Ok, here's what I found out:

Since these cards seem to lack the support for doing frequency conversion in
HW, you simply need to use the alsa plugin
plughw instead of hw when referring to the card:

arecord -Dplughw:0  test.wav
aplay -Dplughw:0 test.wav

Then alsa do the conversion for you... Strange though that giving hw the
argument
-r 48000 didn't seem to work either.

Credit to Florian Bomers for helping me out.

Regards,
Helge Fredriksen

On Wed, Mar 19, 2008 at 8:41 PM, Darrell Bellerive [EMAIL PROTECTED]
wrote:

 Helge

 Please document what ever you do and post it here. There are others with
 these
 cards who would also like to read configuration how-to's.

 Darrell


 On Wednesday 19 March 2008 03:29, Helge Fredriksen wrote:
  I just bought a couple of MAudio cards to test out (Revolution 5.1 and
  Audiophile 2496). I'm trying to test the sound using arecord and aplay,
 but
  no matter which format I choose I get the message:


 --
 Darrell Bellerive

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-26 Thread Bill Unruh
On Wed, 26 Mar 2008, Helge Fredriksen wrote:

 Ok, here's what I found out:

 Since these cards seem to lack the support for doing frequency conversion in
 HW, you simply need to use the alsa plugin
 plughw instead of hw when referring to the card:

 arecord -Dplughw:0  test.wav
 aplay -Dplughw:0 test.wav

AFAIK, alsa frequency conversion is pretty primative ( linear
interpolation) which produces a huge amount of noise/distortion. 
See www.theory.physics.ubc.a/soundcard/resample.html for a comparison of
various rate conversion routines on a sound sample roughly similar to real
music (pink noise type spectrum) The problem is that better conversion
routines require a longer time and thus have a longer latency than the
simplest techniques. Mind you I have no idea how the sound cards with
hardware conversion do it either, so they might be just as nasty as the
linear software routines.



 Then alsa do the conversion for you... Strange though that giving hw the
 argument
 -r 48000 didn't seem to work either.

 Credit to Florian Bomers for helping me out.

 Regards,
 Helge Fredriksen

 On Wed, Mar 19, 2008 at 8:41 PM, Darrell Bellerive [EMAIL PROTECTED]
 wrote:

 Helge

 Please document what ever you do and post it here. There are others with
 these
 cards who would also like to read configuration how-to's.

 Darrell


 On Wednesday 19 March 2008 03:29, Helge Fredriksen wrote:
 I just bought a couple of MAudio cards to test out (Revolution 5.1 and
 Audiophile 2496). I'm trying to test the sound using arecord and aplay,
 but
 no matter which format I choose I get the message:


 --
 Darrell Bellerive

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Alsa-user mailing list
 Alsa-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/alsa-user



-- 
William G. Unruh   |  Canadian Institute for| Tel: +1(604)822-3273
PhysicsAstronomy  | Advanced Research  | Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology | [EMAIL PROTECTED]
Canada V6T 1Z1 |  and Gravity   |  www.theory.physics.ubc.ca/

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-26 Thread stan
Helge Fredriksen wrote:
 Ok, here's what I found out:

 Since these cards seem to lack the support for doing frequency 
 conversion in HW, you simply need to use the alsa plugin
 plughw instead of hw when referring to the card:

 arecord -Dplughw:0  test.wav
 aplay -Dplughw:0 test.wav

 Then alsa do the conversion for you... Strange though that giving hw 
 the argument
 -r 48000 didn't seem to work either.

 Credit to Florian Bomers for helping me out.

 Regards,
 Helge Fredriksen

Are you using any kind of sound server?  I have a Rev5.1 and I use 
direct library calls to set the internal hardware frame rate to one 
supported in hardware without any problems whatsoever, *unless* 
something else has taken over the card.  I use plughw because it does 
format conversions automatically which is handy but no frame rate 
conversion is done unless required.  48000 is a framerate that the card 
supports, so there should be no conversion required (others are 44100, 
64000, 88200, 96000, 176400, 192000) .  When you use hw instead of 
plughw, you are taking responsibility for all conversions to the cards 
internal representation.  The Rev5.1 uses signed 32 bit integers 
internally.  Most wav files are signed 16 bit integer files.  plughw 
will convert, hw won't.

At least that's my understanding.  Could be wrong.  :-)


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-26 Thread Bill Unruh
On Thu, 27 Mar 2008, Rene Herman wrote:

 On 26-03-08 23:57, Bill Unruh wrote:

  On Wed, 26 Mar 2008, Helge Fredriksen wrote:
 
   Ok, here's what I found out:
  
   Since these cards seem to lack the support for doing frequency 
   conversion in
   HW, you simply need to use the alsa plugin
   plughw instead of hw when referring to the card:
  
   arecord -Dplughw:0  test.wav
   aplay -Dplughw:0 test.wav

  AFAIK, alsa frequency conversion is pretty primative ( linear
  interpolation) which produces a huge amount of noise/distortion.

 The default is, but if you install the alsa-plugins package (and 
 libsamplerate) and add a line

 defaults.pcm.rate_converter samplerate

 in /etc/alsa.conf or ~/.asoundrc, things should be better (untested advice).

The question is how much latency does that introduce.



 Rene.



-- 
William G. Unruh   |  Canadian Institute for| Tel: +1(604)822-3273
PhysicsAstronomy  | Advanced Research  | Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology | [EMAIL PROTECTED]
Canada V6T 1Z1 |  and Gravity   |  www.theory.physics.ubc.ca/

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-19 Thread Helge Fredriksen
Hello!

I just bought a couple of MAudio cards to test out (Revolution 5.1 and
Audiophile 2496). I'm trying to test the sound using arecord and aplay, but
no matter which format I choose I get the message:

aplay: set_params:900: Sample format non available

Best regards,
Helge Fredriksen
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-19 Thread Julien Claassen
Hi!
   I suppose the best way to start might be to create some pcm-device in your 
.asoundrc or asound.conf.
   There you know exactly how many channels you have.
   Only other thing _I_ can imagine might help is: startup alsamixer, see how 
many playback channels you have, look for the setting of your card's internal 
clock and then try again.
   If you don't have to rely on alsa, you could try it with jack. It's much 
simpler because you see all channels, listed as ports and then you can connect 
them as you wish.
   HTH.
   Kindest regards
Julien


Music was my first love and it will be my last (John Miles)

 FIND MY WEB-PROJECT AT: 
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
=== AND MY PERSONAL PAGES AT: ===
http://www.juliencoder.de

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-19 Thread Helge Fredriksen
On Wed, Mar 19, 2008 at 11:34 AM, Julien Claassen [EMAIL PROTECTED] wrote:

 Hi!
   I suppose the best way to start might be to create some pcm-device in
 your
 .asoundrc or asound.conf.


Ouch,  have tried to dig into the asound configuration a couple of times,
but had little success understanding the overall design principles.


   There you know exactly how many channels you have.
   Only other thing _I_ can imagine might help is: startup alsamixer, see
 how
 many playback channels you have, look for the setting of your card's
 internal
 clock and then try again.


Found it to be 44100 it seems (multitrack internal clock). However, this
frequency didn't work either.


   If you don't have to rely on alsa, you could try it with jack. It's much
 simpler because you see all channels, listed as ports and then you can
 connect
 them as you wish.


Sorry, that is not an option due to JavaSound bindings on top of ALSA.


Helge
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-19 Thread Clemens Ladisch
Helge Fredriksen wrote:
 I just bought a couple of MAudio cards to test out (Revolution 5.1 and
 Audiophile 2496). I'm trying to test the sound using arecord and aplay, but
 no matter which format I choose I get the message:

 aplay: set_params:900: Sample format non available

Use aplay -v something.wav, then look into what format it gets
converted.


HTH
Clemens

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Trying to get arecord/aplay to work with M-Audio

2008-03-19 Thread Darrell Bellerive
Helge

Please document what ever you do and post it here. There are others with these 
cards who would also like to read configuration how-to's.

Darrell


On Wednesday 19 March 2008 03:29, Helge Fredriksen wrote:
 I just bought a couple of MAudio cards to test out (Revolution 5.1 and
 Audiophile 2496). I'm trying to test the sound using arecord and aplay, but
 no matter which format I choose I get the message:


-- 
Darrell Bellerive

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user