Re: [Alsa-user] driver found my card, but utils (lib) doesn't

2008-02-20 Thread Adam Nielsen
 cards:
 
 0 [CMI8738]: CMI8738-MC6 - C-Media CMI8738
  C-Media CMI8738 (model 55) at 0xa000, irq 10
 
 arecord -l:
 
 arecord: device_list:205: no soundcards found...
 
 The last one is sad by all the utils which based on alsa lib. (My
 application too.)
 
 Does anybody know what's the problem?

This is just a guess, but did you clean out any leftovers from the
previous ALSA install?  ~/.asoundrc, /etc/asound.conf, etc.  These files
could be interfering with the new install.

Cheers,
Adam.

-
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] Need help with asound.conf

2008-02-19 Thread Adam Nielsen
 For me, hw:0,1 is the SPDIF connector, so I just put this in
 /etc/asound.conf:

   defaults.pcm.card 0
   defaults.pcm.device 1
   
 What if I need a more generic version of asound.conf so it works without
 changes on machines where spdif is hw:0,2 ?

I'm certainly no expert, but to do this you may need to find the config
file in /usr/share/alsa/ that implements dmix (perhaps pcm/dmix.conf) or
anything that refers to defaults.pcm.card (or defaults.pcm.dmix.card)
and change that to pcm.spdif or whichever device you want to become the
default.

 You can also set this if you want something other than 48kHz:

   defaults.pcm.dmix.rate 48000
   
 I'm trying to make sense of the files in /usr/share/alsa and extrapolate
 the language so I can understand the flow and write an entire
 asound.conf script, but I was thinking there's a simpler way to do this,
 since the spdif pcm is already pointing to the right device.

Changing all references from the default PCM device to the SPDIF device
should work, but again, I'm not an expert at this :-)

Cheers,
Adam.


-
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] a52 plugin: mplayer get A/V-async

2008-02-01 Thread Adam Nielsen
 When a movie doesn't play, it shows weird behaviour: the video is
 playing *extremely* slowly, the audio plays just fine for about the
 first 100 seconds. Then mplayer gets so out of sync that it commits
 suicide in a way. Here is some output:

IIRC mplayer uses the audio as a timing source, so if there are any
issues with the audio it throws out the timing of the whole movie.

I would suggest trying the A/V sync options to see if you can improve
the behaviour at all (-framedrop, -hardframedrop, -mc)

Personally I've found ALSA's plugins very difficult to get working
reliably across a number of different programs, so the behaviour you
describe doesn't surprise me at all.  I still can't play mono audio
through some programs.

Cheers,
Adam.


-
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] Alsa on a laptop - how to dynamicly assign a card in asoundrc (depending on the cards existence)?

2008-02-01 Thread Adam Nielsen
 Is it possible to make an pcm/ctl device in asoundrc file that would redirect 
 the
 output to the correct card/mixer depending on they existence? The algorithm 
 should
 look more or less like:
 
 If default exist:
   pcm.redir - plughw:default
   clt.redir - default.Speaker
 Elsif Xmod exists:
   pcm.redir - plughw:Xmod
   ctl.redir - Xmod.PCM
 Else
   pcm.redir - default (underneath dmixeddsnooped internal sound card)
   ctl.redir - card 0
 fi
 
 Any idea how to write that in the asound file?

You could try writing three asoundrc files, one for each card, then
write a hotplug script which makes one of the asoundrc files the default
when it detects one of the cards being connected/disconnected.

The only problem with this is that I think all the ALSA configuration
(reading and parsing the config files) is done by each and every program
(presumably via alsa-lib.)  This means that after the config file
changes, you'll need to close and reopen any program using audio for the
change to take effect.

Cheers,
Adam.


-
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] Opposite of type multi plugin?

2008-01-26 Thread Adam Nielsen
 is there a plugin which does the opposite of the multi plugin, i.e. it
 should duplicate a stream and have multiple slaves (one stream to multiple)?
 
 The reason I'd need this: default goes (over some corners) to the
 softvol plugin, which goes to route which encodes a A52 stream. Now I
 don't have headphones set up. What I'd like is the following:
 
 
  /-- route - A52
 default - ... - softvol - duplicate -
  \-- hw0,0
 
 Where at hw0,0 my headphones are connected. How is such a setup possible?

Couldn't you use the multi plugin for this anyway?  If you bound hw0,0
and route in your diagram above to a single four-channel device, then
you could bind the incoming stereo signal to both the front and rear
speakers of the four channel device, effectively sending the same stereo
signal to the two devices.

Cheers,
Adam.


-
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] Soundcard only works every other login

2008-01-25 Thread Adam Nielsen
 Does anyone know why the interrupt would be assigned only every other
 boot? Is this an ALSA question or a question for some other group?

That sounds more like a BIOS issue - have you upgraded to the latest BIOS?

That issue aside there have been messages posted to this list in the
past about cards appearing out of order on every boot - check the
archives to find out how to give a specific card a specific order.  This
would at least stop the Intel card taking over if the other one doesn't
work.

Cheers,
Adam.


-
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] help with using rear connector as a separate channel

2008-01-21 Thread Adam Nielsen
 I seek to use my onboard 4 ch sound in a two stereo setup. so I can
 connect a headset to the rear speakers.
 I am using gentoo with kernel 2.6.21-ck2-r1 and the alsa provided in the
 kernel 1.0.14rc3.

You realise this would mean one audio device would play out of the front
speakers and a different one out of the rear speakers?  i.e. if you're
listening to music and you want to put the headset on, you'll need to
stop the music, change the audio device, then start the music again...

 the only way I may hear anything from the line-in/rear connector is when
 running this:
 $ aplay -D plug:surround40 sound.wav

surround40 is a four-channel device, yes.

 I tried this in my .asoundrc file:
 
 pcm_slave.via4 {
 ~pcm hw:0
 ~channels 4
 }
 
 
 pcm.ch12 {
 ~type dshare
 ~slave via4
 ~ipc_key 47110815
 ~ipc_key_add_uid no
 ~bindings {
 ~  0 0
 ~  1 1
 ~}
 }
 
 pcm.ch34 {
 ~type dshare
 ~slave via4
 ~ipc_key 47110816
 ~ipc_key_add_uid no
 ~bindings {
 ~   0 2
 ~   1 3
 ~   }
 }

This is a complete guess, but does it work if you use surround40 as
the slave device?  (either in the pcm.ch34 or via4.)  I'm guessing the
problem lies in that you've got two 2-channel devices, and you're trying
to mix them into a single 4-channel device - i.e. ALSA expects four
incoming channels from each stream, but you're only delivering two.
Presumably you'll need something like this:

pcm.ch34 {
  ...
  bindings {
null 0# Not real code, just illustrating a point
null 1
0 2
1 3
  }
}

If you did something like this, you'd be outputting a 4-channel audio
stream, with two of the channels as silence.  There should be no
problems dmixing that.  I don't know the correct method for creating
some silence channels, but perhaps somewhere here could point that out.

Cheers,
Adam.

-
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] help with using rear connector as a separate channel

2008-01-21 Thread Adam Nielsen
 I then tried the lines you suggested, got the same error. in any case
 I would still want to use the front channels to output music , while
 using the rear to conduct a phone call simultaneously.

What happens if you do something like this:

pcm.ch34 {
  ...
  bindings {
0 0
0 1
0 2
1 3
  }
}

Granted this will not do what you want (you'll get audio from both
devices played through all speakers) but if that *does* work, then all
you need to do is to figure out how to create silence channels when
you're upmixing to four speakers (I think there's a policy command for
something like this.)

Cheers,
Adam.


-
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] help with using rear connector as a separate channel

2008-01-21 Thread Adam Nielsen
 could dshare be missing in my alsa? how can I tell which type are avail
 in the version of alsa I am using?

Hang on a minute, why are you using dshare?  dshare only gives exclusive
access to particular channels - if you use dmix you'll be able to play
multiple streams over each audio device.

I would advise removing dshare/dmix and setting the slave to be the
hardware device, until you figure out settings that work.  Then you can
add dmix back in, knowing that the rest of your set up is correct.

Cheers,
Adam.


-
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] Two USB sound cards - which is which?

2008-01-12 Thread Adam Nielsen
 The problem is that I can't tell which is which.  Every time the system 
 boots the cards move around.
 
 Since they're identical I can't tell them by usbid:
 athena:/proc/asound# cat card[01]/usbid
 0d8c:0001
 0d8c:0001
 
 [...]

 Is there some machine readable way to tell these cards apart?

AFAIK each USB device has a unique serial number.  lsusb -v should
display this, and it's probably available through sysfs.  I'm not sure
how you could tell ALSA to order devices based on this, but as it's
possibly the only way to tell devices apart that's where I'd start.

Alternatively you seem to have the devices plugged into the same hub
(i.e. two USB ports next to each other.)  If you have more ports
available on your motherboard, you could try different ports, as putting
each device on a different hub *may* ensure the hub numbers are
consistent across a restart (but if devices change order, there's a
chance that the hubs may change order too.)

The unique serial number is definitely the way to go if you can figure
out how to get ALSA to use it.  (I think udev can, but I don't know that
ALSA uses udev.)

Cheers,
Adam.


-
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] Misconfigured Realtek ALC861?

2008-01-12 Thread Adam Nielsen
 options snd-hda-intel index=0 position_fix=1 model=3stack

Are you sure 3stack is the correct model?  The problems you list sound
like what you'd get you've got one model but the driver is accessing it
like another model.

I assume you've already tried the other models (especially leaving the
model option off completely) with no success?

 Neither the PCM nor the CD slider affect the volume and the CD mute
 doesn't mute the audio.  Neither does the Headphon mute.  OTOH, the
 Front mute does mute the audio output.

The headphone mute should only affect the audio jacks on the front of
the PC - if you don't have anything plugged in there you won't notice
the headphone mute doing anything.

Cheers,
Adam.


-
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] Misconfigured Realtek ALC861?

2008-01-12 Thread Adam Nielsen
 Yep.  I've even gone ahead and updated the alsa-lib rpm using the one
 in atrpms-testing and gone back through the various model options, but
 that didn't change anything.  To be specific, the model options I
 tried were 3stack, 3stack-dig, 6stack-dig, asus, and asus-laptop.

Fair enough.  According to the source you can also try 3stack-660,
uniwill-m31, toshiba and auto.  If none of these work it looks like your
chip has been hooked up differently and needs another option created.

Cheers,
Adam.


-
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] ALSA support for toslink

2008-01-11 Thread Adam Nielsen
 Can ALSA send audio to the analog ports AND the optical/toslink port at the
 same time?  (Or is this a function of the motherboard)?

AFAIK most sound cards (especially onboard ones) only have one output
stream.  This same audio signal is sent to the analogue jacks, the coax
SPDIF and the optical SPDIF.

The hard part would be getting *different* audio coming out of each
connection - that would require a more advanced sound card.

Cheers,
Adam.


-
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] Software volume mixer for S/PDIF output

2008-01-11 Thread Adam Nielsen
 So my question is: does ALSA support software volume control? The loss
 of quality (dynamics) is not so important to me in this case, I'd have
 it almost always on 100% - but would sometimes like to quickly reduce
 the volume. If it is supported, does it also work when playing back
 direct AC3 streams?

 If it can be done: how so?

Yes, there is a softvol plugin you can attach to an ALSA device that
will create a new mixer control.  Anything played through though that
device will be adjusted according to the softvol mixer control.

I would've thought your card would already have a hardware mixer that
supports turning the volume down though, but perhaps not.

I imagine you would also need a program like xbindkeys that can run a
command when a key is pressed, for example so you can press the mute
button on your keyboard to run amixer and get it to set the volume to
a low level.

It won't work when playing AC3 streams, as the decoding is done inside
the amplifier - but presumably whatever program is playing the AC3
stream has a pause button ;-)

Cheers,
Adam.


-
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] plug refuses to play audio at normal sample rates

2008-01-11 Thread Adam Nielsen
 Well, as far as I know LADSPA - it's very difficult, if not impossible,
 to not detect sample rate correctly.
 
 Did you look into the plugin source ?

I've had a look through it, but I can't see where the code is that does
sample rate conversion.

 Can it be that ALSA calls the plugin initialization routine with
 wrong sample rate ?
 
 Can it be that ALSA calls the plugin initialization routine only once
 and not on each sample rate change ?

Since it works properly with unusual sampling rates (like 60kHz) I don't
think it's an ALSA issue.  It only fails when using a sampling rate
directly supported by the underlying hardware - in that case it still
needs to do resampling, but for whatever reason the audio is *not*
resampled and playback fails.

At some point there is a sample rate check, and instead of checking what
sample rates the next *plugin* in the chain supports, the code
incorrectly checks what sampling rates the *hardware* supports.  The
hardware supports four different sample rates, the plugin only supports
one - so sometimes the audio isn't being resampled when it should be.

Cheers,
Adam.


-
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] using two sound cards

2008-01-08 Thread Adam Nielsen
 For now I'm using one Creative Live for 5+1 watching movies and listen 
 to music.
 I have one sound card onboard of my PC which I have disabled from BIOS.
 My question is can I activate the second sound card and for example
 duplicate all that is played on my front speakers of the primary card and
 pass it to the output of the second card ?
 If the answer is yes can you give me some clue how to set it up :)

If you don't mind a hardware solution to the problem, and your cards
have enough inputs/outputs, you can connect the SPDIF out from one card
to the SPDIF in on another card, effectively daisy-chaining the cards
together.

This would result in the first card's audio output only playing audio
from the card itself, and the second card's audio output playing audio
from both cards.

Most cards these days have internal pins for extra inputs and outputs,
so you can connect them together internally without any external
loopback cables.

I know for a fact the SBLive has three stereo digital outputs (one for
the front speakers, one for the rear, and one for the centre/subwoofer)
so if you connected the front SPDIF-out to your motherboard's SPDIF-in
pins you should have the result you're after.

Cheers,
Adam.


-
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] Can you maintain digital output when no audio is playing?

2008-01-06 Thread Adam Nielsen
Hi all,

Another (minor) issue I'm having with ALSA is that the digital output is
shut down when no sound is playing.  When the digital output is shut
down, my external amplifier loses sync and displays unlock on its display.

The problem with this is that when I play a sound again, it takes a
couple of seconds for the amplifier to regain sync, so I'm always
missing the first couple of seconds of sound - and notification sounds
like incoming e-mails/IMs are as good as silent, as they've finished
playing by the time the amplifier syncs again.

Is it possible to either have the dmix plugin *not* release the audio
device when no sound is being played, or to tell the Intel HDA driver
not to shut down the digital output when the audio device has been closed?

Thanks,
Adam.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] plug refuses to play audio at normal sample rates

2008-01-06 Thread Adam Nielsen
 Try removing the EQ from the chain.  If that does not work revert to
 the default ALSA config files.

That's interesting.  If I remove the EQ then everything works as
expected.  The bug must be in the LADSPA plugin - not detecting sample
rates correctly.

If I revert to the default ALSA config then I can only open ALSA devices
at 48kHz (the dmix freq) so like this *all* sample rates are converted
to 48k.

Cheers,
Adam.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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


[Alsa-user] plug refuses to play audio at normal sample rates

2008-01-05 Thread Adam Nielsen
Hi everyone,

I'm having quite a bit of trouble trying to get dmix working with a
LADSPA EQ plugin.  I think I've narrowed it down to plug incorrectly
detecting sample rates.

For example, my sound card (Intel HDA) can play audio at 48000, 96000
and 192000 Hz.  When dmix is set to mix at 48000, I can play audio at
48kHz, as well as other rates my sound card doesn't natively support,
e.g. 88.2kHz, 100kHz, etc.  If I try to play audio at a frequency my
card *does* support (e.g. 96kHz), ALSA bombs out with an Invalid
argument error.

If I change the dmix rate, e.g. to 192000 which I would like, then I am
able to play audio at 192kHz, but not 48kHz or 96kHz (I can play audio
at 50kHz and 100kHz though.)

To me it seems that something in the chain is looking to see what sample
rates my sound card is capable of playing, and not bothering to convert
audio being played at those sample rates.  Unfortunately something in
the chain (dmix?) only supports one sample rate, so when the sample rate
isn't being converted, playback fails.

In other words, when I try to play 96kHz audio ALSA sees my card can
play 96kHz audio, so it passes it through unchanged to dmix, which then
barfs because it only accepts 48kHz audio.  If I play 100kHz audio
instead, ALSA sees my card isn't capable of playing that, so it checks
to see what rates are supported, dmix returns that only 48kHz is
allowed, so ALSA down converts the audio to 48kHz where it plays without
any problems.

Is there any way to override this behaviour so I can have all audio
streams dmixed, even those that have a sample rate natively supported by
my sound card?

/etc/asound.conf is below.

Thanks,
Adam.


## Begin ALSA config ##

defaults.pcm.dmix.rate 192000



pcm.eq {


  type ladspa



  slave.pcm plug:dmix



  plugins [


{


  id 1197


  input {


   controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]


  }


}


  ]
}

pcm.!default


{


type plug


slave.pcm eq


}

## End ALSA config ##

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] plug refuses to play audio at normal sample rates

2008-01-05 Thread Adam Nielsen
Hi Sergei,

 Well, I managed to change sample rate by editing as root my
 
 /usr/share/alsa/alsa.conf
 
 file, this line in it:
 
 defaults.pcm.dmix_rate 48000

Yes, I have added that line to /etc/asound.conf and it overrides the
main one.  The problem is, if I set it to 48000 then I can play 48kHz
audio, but not 96kHz or 192kHz.  If I set to to 96000 then I can play
96kHz audio but not 48k or 192k.  If I set it to 192000 then I can play
192k but not 48k or 96k.

I would like to be able to play 48k, 96k *and* 192k at the same time!

Whatever it is set to, I can always play unusual rates like 49kHz,
50kHz, 51kHz, etc.

 The fact that HDA_INTEL cards mixers do not have sample rate control
 is a bug IMO - because, say, M-Audio Revolution mixer _does_ have
 such a mixer control.

Are you sure this isn't just a limitation of the hardware?  I know this
used to work fine on my old SB Audigy, but I didn't have to use dmix on
that because the hardware supported mixing.

Cheers,
Adam.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] plug refuses to play audio at normal sample rates

2008-01-05 Thread Adam Nielsen
 I would like to be able to play 48k, 96k *and* 192k at the same time!
 I have ALC883:
 
 http://www.realtek.com.tw/products/productsView.aspx?Langid=1PFid=28Level=5Conn=4ProdID=44
  :
 
 
 ...
 All DACs support 44.1k/48k/96k/192kHz sample rate 
 All ADCs support 44.1k/48k/96kHz sample rate 
 ...
 .
 
 So, I am sure that HW supports these rates to the extent I can be
 sure Realtek is not cheating on the above page.

Oh the hardware is capable of playing those sample rates, but dmix
doesn't seem to be able to mix those rates together.

If I remove dmix then I can play any sample rate without any problems,
but of course I can only play one sound at a time.

As soon as I enable dmix, I can't play audio at certain sampling rates.

Cheers,
Adam.

(sorry, forgot to CC the list)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] plug refuses to play audio at normal sample rates

2008-01-05 Thread Adam Nielsen
 As soon as I enable dmix, I can't play audio at certain
 sampling rates. 
 
 What about if you run Jack at 192khtz then all other
 sample rates would be upsampled to 192k (I presume)
 and therefor all play back at the same time.

I haven't tried Jack, I'll have to look into it - but with the current
config everything *is* upsampled to 192kHz, except 48kHz and 96kHz.

48.1kHz is fine, as is 95.9kHz, just those precise frequencies that are
natively supported by my card aren't upsampled, leading me to believe
there's a bug in the samplerate conversion code somewhere.

Cheers,
Adam.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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] Unable to find an audio port (1) for channel 1

2006-01-02 Thread Adam Nielsen
  ALSA lib pcm_ladspa.c:1283:(snd_pcm_ladspa_parse_ioconfig) Unable to
  find an audio port (1) for channel 1

 It means that the used LADSPA plugin has no second audio port.

When you say no second audio port is that different to processing a
stereo signal?  Because it was my understanding that the LADSPA plugin
only processed one channel of sound, and ALSA duplicated this so that if
you had a stereo sound there would be two instances of the LADSPA plugin
running (I think this is what policy duplicate is for.)

You can see this problem by adding this to /etc/asound.conf:

pcm.test {
  type ladspa;
  slave.pcm plughw:0,0
  path /usr/local/lib/ladspa
  playback_plugins {
0 {
  label delay_5s
  policy duplicate
  input {
controls [ 0.8 0.3 ]
  }
}
  }
}

If you then do something like aplay stereo.wav -Dplug:test you'll only
get one channel from stereo.wav out of both speakers.

Running speaker-test -c2 -Dplug:test only plays the front right
audio out of both front speakers.

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Unable to find an audio port (1) for channel 1

2006-01-02 Thread Adam Nielsen
 The attached patch fixes this bug.

Brilliant!  The LADSPA EQ is now in stereo again!  Thanks for tracking
this down and fixing it!

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Unable to install soundcard

2006-01-01 Thread Adam Nielsen
 In dmesg I get the error message
 Yamaha DS-XG PCI: probe of :03:06.0 failed with error -16

Not sure what error -16 is, but I'm guessing it's something like device
not found or similar.

 177:  0   IO-APIC-level  uhci_hcd:usb2  0/0
 which I suppose would mean a conflict? But I tried disabling USB in
 the BIOS and after that the soundcard still had IRQ177 but there was
 no entry for 177 in /proc/interrupts.

Multiple PCI devices can share the same interrupt, so there's no
conflict.

 Does someone have an idea what I could try that might help?
 Advanced Linux Sound Architecture Driver Version 1.0.9rc2  (Thu Mar 24
 10:33:39 2005 UTC).

What kernel version are you using?  I'd suggest upgrading to the latest
kernel which should include the newest ALSA drivers - you might have
more success with these.

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] ALSA OSS emulation (was: Alsa-user digest, Vol 1 #2895 - 12 msgs)

2005-12-31 Thread Adam Nielsen
 At present, I don't have an ALSA config file -- I'm using the stock
 configuration under Debian.

I suspect in this case that the ALSA default is just to map the first
two channels to /dev/dsp0.

 The Delta44 card appears to be recognized with channels 1 and 2
 mapping to the left and right channels of /dev/audio.

Assuming the OSS emulation does map more than one card, I assume you've
tried /dev/dsp1?  You may need to make the device file by hand.

If that doesn't work, have a look at the OSS emulation page here:

  http://alsa.opensrc.org/OssEmulation

It looks like aoss is what you want, as it can pass a /dev/dsp device
to an ALSA PCM device.  This means all you should have to do is create
four PCM devices in asound.conf (or possibly two stereo devices) that
each access only one channel of the card, and then use aoss to map
each of these to a /dev/dsp device.

 I tried playing with an .alsarc file (I think that is the proper name)
 some time ago, but could never get it to work so gave up and have
 lived with the two-channel limit until now.

I've been using /etc/asound.conf so my changes are global, but yes, it's
the same thing.

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-31 Thread Adam Nielsen
 I'll try to deliver it on Sunday evening in terms of GMT+2 timezone.

Excellent!

 First a childish question: are you sure the speakers are in phase ?

Yes, I can't stand out of phase speakers (at least by 180 degrees) so
I'm sure that's not the problem.  Given that the speakers aren't
equidistant from my listening position there's probably a very small
phase difference, but it doesn't affect my reason for wanting an EQ.

 A similar childish question - if your speakers are (bi or tri)amped,
 do the woofer/midwoofer/tweeter channels have correct phase ?

They're only relatively cheap speakers, so no, everything is in phase. 
The problem is that my hearing seems to be particularly sensitive to
mid-range frequencies, and so I prefer having these frequencies dampened
a little.

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-30 Thread Adam Nielsen
 incidentally, I used to work with LADSPA equalizer plugin, and I have
 a natively stereo version. Furthermore, my code is written as Perl/C
 combination, so with a flip of your fingers you can actually get
 whatever number of channels.

That sounds interesting...  I think the problem is that the EQ plugin
I'm using is only a single channel, and the ALSA LADSPA plugin no longer
duplicates it once for each input/output channel.

 The plugin is optimized in a sense that mutual for all channels things
 are coded only once.

Nice...

 If you (and the list) are interested, I can publish the plugin and
 related tools - the ones that convert Perl/C mixture into pure C.

Oh yes, I'm definitely interested!  That sounds like exactly what I'm
after!

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Keeping multiple cards in sync

2005-12-30 Thread Adam Nielsen
 Is there some way to test the cards and measure their frequency?  If
 so, you could do a pretty full-blown NTP for sound cards and that
 would be pretty freakin cool.

I know when programming the old SoundBlaster 16 cards they would trigger
an interrupt when they switched output buffers (so you could fill up the
next buffer with data ready to be played), so presumably you could use
something like this to accurately time how long it takes to play a
sound, which should allow you to measure the frequency.

I would've thought though that if you had a software buffer of X
milliseconds, then you should be sending that buffer to the card every X
milliseconds (according to some other timer in the system.)  If it takes
longer before the card is ready for the next buffer then you need to
drop some samples before sending the buffer to the card, and if the card
wants the next buffer sooner than X milliseconds after the last one
you'll need to add some samples.

Sure, it wouldn't be audiophile-level quality, but it'd be enough for
anyone who's happy with a couple of $10 sound cards in their system...

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Need help mapping Alsa to OSS devices (3rd try)

2005-12-30 Thread Adam Nielsen
 The way things are working now, I am only able to use two of the four
 input channels with this program; it sees them as a single stereo
 device, but doesn't see the other two channels at all.

So these are four mono ins/outs?  Can you post the relevant sections of
your ALSA config file showing how this is already configured? 
Presumably you could just copy that config to create another stereo DSP
device.

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-29 Thread Adam Nielsen
Hi all,

What does this error mean?

aplay: pcm_plug.c:384: snd_pcm_plug_change_channels: Assertion 
`snd_pcm_format_linear(slv-format)' failed.
Aborted by signal Aborted...
ALSA lib pcm_plug.c:68:(snd_pcm_plug_close) plug slaves mismatch

Just when I think I'm about to solve my problem, I always seem to get
this coming up - even using a configuration that worked with an old
version of ALSA.

Any ideas what it means?

Thanks,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-29 Thread Adam Nielsen
 What are you trying to do?

I'm still trying to get stereo output when passing the sound through a
LADSPA plugin (which in the latest version of ALSA converts any incoming
stereo source into mono.)  My current idea is to create a multi-card
device, with the two combined sound cards being both on the same
physical card.  Then I can feed one card through LADSPA giving one
mono signal, and the other card though LADSPA giving a second mono
signal, and then I can hopefully route the two mono signals out the left
and right speakers giving me a stereo signal that has passed through
LADSPA.

It just seems that if you connect things in a certain way (particularly
with the ALSA ladspa plugin) I get all these weird assertion failures -
so I was hoping that if I knew why they were happening it might help me
figure out a way around them.

Thanks,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-29 Thread Adam Nielsen
 Well AFAICT that assert is saying that the slave of a route plugin
 can't have a non-linear format.

That's what I thought - given that the slave is the LADSPA plugin, I
assumed I'd somehow have to convert it to linear format before passing
it to LADSPA - but I can't find any docs about how to do that :-(

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Unable to find an audio port (1) for channel 1

2005-12-29 Thread Adam Nielsen
Aha, well now I think I might be tracking down why stereo output via
LADSPA isn't working.  If I change policy duplicate in the LADSPA PCM
definition to policy none then suddenly ALSA starts paying attention
to all the 'bindings' definitions, and if I do this:

...
input {
  bindings {
0 0
1 1
  }
}
...

Then it complains:

ALSA lib pcm_ladspa.c:1283:(snd_pcm_ladspa_parse_ioconfig) Unable to find an 
audio port (1) for channel 1
aplay: main:547: audio open error: Invalid argument

So what does this mean?  It looks like solving this problem will fix the
mono-only LADSPA output problem.

Thanks,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-29 Thread Adam Nielsen
 For stereo sound reproduction through speakers it is absolutely
 crucial to have consistent and STABLE phase relationship between the
 channels.

Good point, but to be honest I'd rather have out of phase stereo
compared to the mono sound I have at the moment ;-)

 Data is written to the two cards at different moments of time -
 because they are two cards, not one card. And the time difference is
 random - it depends on PCI activity, interrupts, memory refresh, etc. 
 So, unless you have HW means to synchronize sound in the two cards,
 the results might be bad anyway.

In this case it won't be a problem because it's the same physical card -
card #0 is hw:0,0 and card #1 is hw:0,0 with the card doing hardware
mixing to get the stereo signal.

Unfortunately it all seems fine until I try the type multi definition,
upon which all I get is silence :-(

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Keeping multiple cards in sync (was: Assertion `snd_pcm_format_linear(slv-format)' failed)

2005-12-29 Thread Adam Nielsen
 It might be even worse.  The cards most likely have independent clock
 generators.  In such a case, there will be (slightly) different
 playback speed of left and right channels.

I've always wondered about this.  Fair enough that two cards would play
back sound at slightly different speeds, but why can't you just drop a
sample or two every few milliseconds or so, to keep the sound roughly in
sync?

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-29 Thread Adam Nielsen
 Wait, so you're just trying to work around a bug in the LADSPA plugin?

Well, yes. *blushes*

 Why not just try to get that fixed?

Primarily because I've got absolutely no idea where to start looking,
and I was hoping that this would be a quicker solution.  Looks like
perhaps it wasn't ;-)

Maybe I should take a look at the source...only I fear it's going to
take me rather a long time just to work out how it all fits together...

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Assertion `snd_pcm_format_linear(slv-format)' failed

2005-12-29 Thread Adam Nielsen
 Can you explain what you are trying to accomplish starting from the
 beginning?

Okay, well starting from the very beginning...

 - I want 5.1 channel output from my sound card.  All the time.

 - This means that when I play stereo sound I want it routed to the
   front two speakers as well as the rear two speakers.  I also want the
   low frequencies from both input channels routed to the subwoofer
   channel.

 - When I play mono sound, I want it routed to in the same way as
   stereo - front and rear speakers, and subwoofer.

 - When I play 5.1 sound, I want it routed to each correct channel (i.e.
   I don't want the front speakers duplicated out the back, which the
   'duplicate front' mixer control does.)

This is relatively simple, but the difficulty arises because I also want
every single channel routed via a single LADSPA plugin before it gets to
the speakers.  This is an equaliser plugin, which boosts specific
frequencies that my external amplifier seems to lack.

I used to have this working with stereo, but I was having some trouble
getting the routing correct with my old ALSA version (1.0rc2 or
something.)  I upgraded to 1.0.11rc1, however the routing then went
haywire - which I then discovered was because the LADSPA plugin
converted everything to mono (or rather stereo with the same signal in
both channels.)  My intent was to get LADSPA going again with stereo,
which would allow me to resume my quest to get 5.1 sound working too.

Hopefully this gives you some idea where I'm coming from!

Thanks,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] nForce2 rear device

2005-12-27 Thread Adam Nielsen
 which works, but blocks the whole device. Should I hope for better ?

Probably not, since the card doesn't do hardware mixing I suspect you
can either play a single stereo source or a single 6-channel source. 
You could look into dmix, which should allow you to open the front and
rear PCMs at the same time, and dmix would mix them into a single
6-channel source.

Of course thanks to the wonderful ALSA configuration format this is
easier said than done ;-)

Cheers,
Adam.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user