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 dmixed&dsnooped 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


[Alsa-user] No sound at 2.6.24 kernel

2008-02-01 Thread Nelson Murilo

Hi,

sorry if is old but I don´t saw it in list archive.

After update to 2.6.24 (from .23) my intel sound card doesn´t play proper sound
anymore. No errors in modules loading or tools such alsamixer. 

Some informations: 

# lspci
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio 
Controller (rev 03)
  Subsystem: ASUSTeK Computer Inc. Unknown device 1339
  Flags: bus master, fast devsel, latency 0, IRQ 23
  Memory at febf8000 (64-bit, non-prefetchable) [size=16K]
  Capabilities: [50] Power Management version 2
  Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 
Enable-
  Capabilities: [70] Express Unknown type IRQ 0

# cat /dev/sndstat
Sound Driver:3.8.1a-980706 (ALSA v1.0.15 emulation code)
Kernel: Linux hagnarok 2.6.24-custom #4 SMP Fri Feb 1 16:57:35 BRST 2008 i686
Config options: 0

Installed drivers: 
Type 10: ALSA emulation

Card config: 
HDA Intel at 0xfebf8000 irq 23

Audio devices: NOT ENABLED IN CONFIG

Synth devices: NOT ENABLED IN CONFIG

Midi devices: NOT ENABLED IN CONFIG

Timers:
7: system timer

Mixers: NOT ENABLED IN CONFIG

-

Why are Audio and others not enabled in config? 

I tried alsa v1.0.15 and v1.0.16r2 both without success. 

-
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] Intel HDA with VT8251 gives high pitched noise

2008-02-01 Thread Stefan Bellon
Lee Revell wrote:
> As Takashi stated, it's currently unsupported and no one is working on
> it.  You should just configure your mail and IM apps to play a .wav
> file.

That's not really an option because they do not run locally, but on a
remote machine accessed via SSH.

But I understand that it is not supported, so case closed.

-- 
Stefan Bellon

-
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 Sergei Steshenko
On Fri, 01 Feb 2008 14:23:41 +0100
Johannes Bauer <[EMAIL PROTECTED]> wrote:

> Alexander E. Patrakov schrieb:
> 
> > I think it is a problem with mplayer or alsa-lib, not with a52 plugin,
> > because I am able to reproduce a similar effect by just running dmix at
> > 192 kHz 32 bit. To do so, create ~/.asoundrc that contains just two lines:
> > 
> > defaults.pcm.dmix.rate 192000
> > defaults.pcm.dmix.format S32_LE
> > 
> > To troubleshoot, try also running mplayer with "-ao sdl".
> 
> Indeed, when I put those two lines to my ~/.asoundrc (my other
> coniguration resides in /etc/asound.conf) I see the exact same effect on
> videos which usually work. So it seems to be a format conversion problem?
> 


I'd say you stress the whole audio system by forcing it work with higher
throughput.

Regards,
  Sergei.

-
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


[Alsa-user] Alsa on a laptop - how to dynamicly assign a card in asoundrc (depending on the cards existence)?

2008-02-01 Thread Fotopiper
I have a laptop with an integrated snd-card (which doesn't this days), but I 
also
have two external USB-sound-cards..
They are almost never connected at the same time, yet if one is connected it's a
better choice then the internal sound card. I would like to automatically assign
output to the usb card if available for some apps (not for all). In mplayer it's
simple.
In it's config file:
ao=alsa:device=hw=default,alsa:device=hw=Xmod,alsa:device=default

The first default is not an error - the manufacturer of one of my cards has
called it "default"...
But in audacious it's not so simple, I can't simply list the cards in a
list..besides I need to assign the mixer as well.

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 dmixed&dsnooped internal sound card)
ctl.redir -> card 0
fi

Any idea how to write that in the asound file?

My best regards to All!

-
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-02-01 Thread Takashi Iwai
At Fri, 01 Feb 2008 15:13:16 +0100,
Johannes Bauer wrote:
> 
> Takashi Iwai schrieb:
> 
> > Depends on the hardware.  Your descrption sounds like a CMIPCI.  In
> > that case, it's a bit hard to do that way because both outputs share
> > the same DAC.  So, the source must be exclusive.
> 
> You are exactly right! It is a CMIPCI.
> 
> But are you sure it only has one DAC?

No, I didn't write it.  Indeed the card has one DAC and one ADC that
can be shared as the secondary DAC.  But, the same (first) DAC is used
for the front output and SPDIF output.

> $ cat /proc/asound/pcm
> 00-02: CMI8738-MC6 : C-Media PCI IEC958 : playback 1 : capture 1
> 00-01: CMI8738-MC6 : C-Media PCI 2nd DAC : playback 1
> 00-00: CMI8738-MC6 : C-Media PCI DAC/ADC : playback 1 : capture 1
> 
> What about the 2nd one it displays?

It's for the independent rear output or multi-channel output.
When the multi-channel is enabled, the first DAC becomes unusable.
(And, of course, the recording is disabled, too.)


Takashi

-
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-02-01 Thread Johannes Bauer
Takashi Iwai schrieb:

> Depends on the hardware.  Your descrption sounds like a CMIPCI.  In
> that case, it's a bit hard to do that way because both outputs share
> the same DAC.  So, the source must be exclusive.

You are exactly right! It is a CMIPCI.

But are you sure it only has one DAC?

$ cat /proc/asound/pcm
00-02: CMI8738-MC6 : C-Media PCI IEC958 : playback 1 : capture 1
00-01: CMI8738-MC6 : C-Media PCI 2nd DAC : playback 1
00-00: CMI8738-MC6 : C-Media PCI DAC/ADC : playback 1 : capture 1

What about the 2nd one it displays?

Greetings,
Johannes

-
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-02-01 Thread Takashi Iwai
At Thu, 31 Jan 2008 19:00:17 +0100,
Johannes Bauer wrote:
> 
> Adam Nielsen schrieb:
> 
> >>  /-- 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.
> 
> Hmm, I really couldn't get it working. Turns out that the what I
> activate the IEC 958 output, the headphones are automatically disabled -
> when its deactivated, they're enabled. So there's really nothing I could
> do (even if I got routing through the multi plugin working, which I
> didn't - ALSA kept telling me "Device or resource busy").

Depends on the hardware.  Your descrption sounds like a CMIPCI.  In
that case, it's a bit hard to do that way because both outputs share
the same DAC.  So, the source must be exclusive.


Takashi

-
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 Johannes Bauer
Adam Nielsen schrieb:
>> >> 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)

Okay, I first expermiented with those: behaviour didn't change. Then I
tried "-autosync 30" which improved things a bit - movie was still
playing extremely slowly, but it at least *displayed* that A/V were in
sync. Well, no huge improvement...

Then I tried to insert a filter which always converts the sample rate to
48000 Hz (as this seems to work with one movie perfectly) - voila! Did
the trick!

I inserted (right after the default filter):

pcm.Filter_RateConvert {
type rate
slave {
pcm "Filter_Duplex"
rate 48000
}
}

> > 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.

This sounds a bit annoying - ALSA is supposed to be robust software (it
seems like it's been there forever) - is this part still work in progress?

Thanks all for your help and pointers!

Greetings,
Johannes



-
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] random system crashes when outputting midi using snd-mpu401

2008-02-01 Thread Clemens Ladisch
Phil Carter wrote:
> I'm trying to get MIDI output (through the game port) to work, but my
> system locks up randomly when playing MIDI files using aplaymidi.
> Everything works fine for a few seconds to a few minutes, and then my
> system freezes and even the magic sysrq keys don't do anything, so I
> have to hit the reset button on my computer.
>
> Any ideas on what I can do to fix this, or to figure out what's
> causing it? I have ALSA 1.0.14 and ALSA lib 1.0.14a, with Slackware
> 12, kernel 2.6.21.5.

This may be cause by a bug that was fixed in 1.0.16rc1:
http://hg.alsa-project.org/alsa-kernel/rev/1fe79ca6c78e

Please try updating to newer ALSA drivers (or a newer kernel).


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

2008-02-01 Thread Johannes Bauer
Alexander E. Patrakov schrieb:

> I think it is a problem with mplayer or alsa-lib, not with a52 plugin,
> because I am able to reproduce a similar effect by just running dmix at
> 192 kHz 32 bit. To do so, create ~/.asoundrc that contains just two lines:
> 
> defaults.pcm.dmix.rate 192000
> defaults.pcm.dmix.format S32_LE
> 
> To troubleshoot, try also running mplayer with "-ao sdl".

Indeed, when I put those two lines to my ~/.asoundrc (my other
coniguration resides in /etc/asound.conf) I see the exact same effect on
videos which usually work. So it seems to be a format conversion problem?

The video which usually worked shows
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

The video which didn't
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

So - what can I do about it?

Greetings,
Johannes

-
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


[Alsa-user] random system crashes when outputting midi using snd-mpu401

2008-02-01 Thread Phil Carter
I'm trying to get MIDI output (through the game port) to work, but my
system locks up randomly when playing MIDI files using aplaymidi.
Everything works fine for a few seconds to a few minutes, and then my
system freezes and even the magic sysrq keys don't do anything, so I
have to hit the reset button on my computer.

My BIOS tells me that MIDI is port 300h, IRQ 10, so I run
modprobe snd_mpu401 port=300h irq=10
to make MIDI work. My BIOS will let me change the port and IRQ,
although I haven't tried it because I don't expect it to make any
difference.

Any ideas on what I can do to fix this, or to figure out what's
causing it? I have ALSA 1.0.14 and ALSA lib 1.0.14a, with Slackware
12, kernel 2.6.21.5. I use the onboard sound card from my K7S5A
motherboard, which uses the intel8x0 driver.

Thanks.
Phil Carter


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
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 Alexander E. Patrakov
Johannes Bauer wrote:
> Hello list,
> 
> there's another problem I encountered with the a52 plugin *sigh*... I
> have it setup so it does routing and then A52 encoding. Everything works
> beautifully using xmms. Some movies play just fine with mplayer. Others
> don't. I have no idea why.
> 
> 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.

I think it is a problem with mplayer or alsa-lib, not with a52 plugin, because 
I am able to reproduce a similar effect by just running dmix at 192 kHz 32 bit. 
To do so, create ~/.asoundrc that contains just two lines:

defaults.pcm.dmix.rate 192000
defaults.pcm.dmix.format S32_LE

To troubleshoot, try also running mplayer with "-ao sdl".

-- 
Alexander E. Patrakov


-
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