Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
alsa sound mixing aka dmix (not arts or esd needed)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 10, 11, 12  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
discomfitor
l33t
l33t


Joined: 21 Feb 2003
Posts: 927
Location: None

PostPosted: Wed Jan 28, 2004 7:25 pm    Post subject: Reply with quote

The mplayer thing is a bug in the mplayer alsa output.
_________________
There is no substitute for experience.
Imperfection indicates a lack of effort.
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Wed Jan 28, 2004 9:08 pm    Post subject: Reply with quote

great howto. Worked perfect for me
Sound: Via82xx
Kernel 2.6
xmms 0.98
Back to top
View user's profile Send private message
dippen
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 83

PostPosted: Wed Jan 28, 2004 10:15 pm    Post subject: Reply with quote

i works almost great... only xmms crashes sometimes when i move a playing mplayer window

thx!

i use alsa-lib / alsa-utils in ver. 9.8, alsa-xmms 0.9.12 and mplayer 1.0_pre3
with kernel-2.6.1-rc1-mm2 and nforce2 onboard sound
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Thu Jan 29, 2004 5:28 pm    Post subject: Reply with quote

Seems it doesn't work perfectly. after some time xmms crashes. I have to kill the process to shut it down. After that if I restart xmms, it just crashs at the first or second song played. Short before it crashs the sounds gets messy, af if my mp3s are broken or something...
Back to top
View user's profile Send private message
gspr
Tux's lil' helper
Tux's lil' helper


Joined: 07 Sep 2002
Posts: 127

PostPosted: Fri Jan 30, 2004 11:03 pm    Post subject: Reply with quote

Wow! This is great! But exactly what settings should the XMMS ALSA output plugin be set to? I don't have it working yet (but I am able to live with using aoss and the OSS output plugin).
Thanks!
_________________
"People said I should accept the world. Bullshit! I don't accept the world." -- RMS.
"We are to admit no more causes of natural things than such as are both true and sufficient to explain their appearances." -- Newton.
Back to top
View user's profile Send private message
Niek
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 236
Location: Houten, The Netherlands

PostPosted: Sat Jan 31, 2004 8:01 pm    Post subject: Reply with quote

gspr wrote:
Wow! This is great! But exactly what settings should the XMMS ALSA output plugin be set to? I don't have it working yet (but I am able to live with using aoss and the OSS output plugin).
Thanks!
From my ~/.xmms/config:
Code:
[xmms]
output_plugin=/usr/lib/xmms/Output/libALSA.so

[ALSA]
audio_card=0
audio_device=1
buffer_time=500
period_time=50
use_user_device=TRUE
mmap=TRUE
user_device=default
mixer_card=0
mixer_device=PCM
pcm_device=default
soft_volume=FALSE
volume_left=100
volume_right=100

_________________
Bezoek ook eens de Nederlandstalige Gentoo IRC channel op irc.freenode.net - #gentoo-nl
Back to top
View user's profile Send private message
gspr
Tux's lil' helper
Tux's lil' helper


Joined: 07 Sep 2002
Posts: 127

PostPosted: Sun Feb 01, 2004 1:03 am    Post subject: Reply with quote

Thank you ever so much! That solved it!
_________________
"People said I should accept the world. Bullshit! I don't accept the world." -- RMS.
"We are to admit no more causes of natural things than such as are both true and sufficient to explain their appearances." -- Newton.
Back to top
View user's profile Send private message
herring
Apprentice
Apprentice


Joined: 22 Jul 2002
Posts: 187
Location: Norway

PostPosted: Sun Feb 01, 2004 2:20 am    Post subject: Re: alsa sound mixing aka dmix (not arts or esd needed) Reply with quote

Redeeman wrote:


mplayer:
if you enable alsa at compile time(done via USE variables) you can edit /etc/mplayer.conf in the line where you see ao=oss to:
Code:
ao=alsa9:default

or simply start mplayer like this:
Code:
mplayer -vo alsa9:default movie.avi




mplayer -ao alsa9:default movie.avi
Back to top
View user's profile Send private message
herring
Apprentice
Apprentice


Joined: 22 Jul 2002
Posts: 187
Location: Norway

PostPosted: Sun Feb 01, 2004 3:56 am    Post subject: Re: alsa sound mixing aka dmix (not arts or esd needed) Reply with quote

I use gmplayer (mplayer's GUI). Remember gtk useflag
Had to edit ~/.mplayer/gui.conf by hand to add :default

Code:
ao_driver = "alsa9:default"
Back to top
View user's profile Send private message
jcc
Apprentice
Apprentice


Joined: 30 May 2003
Posts: 233
Location: Fort de France, Martinique

PostPosted: Sun Feb 01, 2004 10:43 am    Post subject: Reply with quote

but isnt mplayer using 'default' by default?
Back to top
View user's profile Send private message
jingo
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2002
Posts: 134
Location: Denmark

PostPosted: Sun Feb 01, 2004 9:20 pm    Post subject: Reply with quote

I am not sure I got this right at all!!!

I have the gentoo-dev-sources 2.6.1 kernel, alsa-drivers and alsa-oss builtin.
And still I have to emerge alsa-drivers, alsa-oss, alsa-utils, alsa-tools, alsa-lib???

I did emerge alsa-oss for aoss, alsa-utils for /etc/modules.d/<alias>-thing among other things and alsa-lib because of some dependency.
I created the /etc/asound.conf from Niek.

alsa-xmms plays sound without any problem, but still every other program need to wait for xmms to release /dev/dsp.

aoss gives me: /usr/bin/aoss: line 9: 28984 Segmentation fault LD_PRELOAD=${exec_prefix}/lib/libaoss.so $* ...
???? dont get it!

Did I miss anything?
_________________
I'm not a perfectionist, even though my parents were
Back to top
View user's profile Send private message
mholtz
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 110
Location: Ohio, USA

PostPosted: Wed Feb 11, 2004 4:30 am    Post subject: Reply with quote

Just wanted to let everyone know it worked for me.

2.4.22-gentoo-r5
alsa 1.0.2
alsa-lib 1.0.2
alsa-utils 1.0.9

XMMS, KDE (use external player aplay), and gaim all share sounds now. Just hope other apps play nice also.
Back to top
View user's profile Send private message
MikeP
Tux's lil' helper
Tux's lil' helper


Joined: 27 Feb 2003
Posts: 115
Location: Germany

PostPosted: Fri Feb 13, 2004 1:05 pm    Post subject: Reply with quote

it works with mplayer and xmms here, but how could i get it to work with xine? it can play sounds when ather apps do, but now with the asound.conf in place all the sound is of very bad quality (the sound from xine that is, mplayer and xmms play nice) - it doesnt matter if any other apps are playing or not.. weird :/

*edit* err it doesnt even fully work with mplayer, when i play a dvb stream i dont have sound now...sigh...*edit*
Back to top
View user's profile Send private message
mholtz
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 110
Location: Ohio, USA

PostPosted: Sun Feb 15, 2004 6:42 am    Post subject: Reply with quote

And what about apps like snes9x which demand exclusive use of /dev/dsp? Is there any way to make them play nice and use the ALSA mixer?
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Sun Feb 15, 2004 7:15 pm    Post subject: Reply with quote

alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian)
alsa-init: 1 soundcard found, using: hw:0,0

why oh why does it want to use hw:0,0 and not default?!

the xmms alsa-plugin is nasty too, however using oss and aoss works.
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sat Feb 21, 2004 4:16 am    Post subject: Reply with quote

After doing all this, do the alsa init scripts complain loudly about /etc/asound.conf for anybody else?
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
lunarg
Guru
Guru


Joined: 07 Jan 2004
Posts: 508
Location: Peer, Belgium

PostPosted: Mon Feb 23, 2004 12:01 am    Post subject: Reply with quote

Okay, I got dmix to work with my intel8x0, although not that perfectly though. I still don't get any sound with games like UT or RTCW, nor do I have sound under KDE (with ARTS disabled).

Guess I'll wait this one out.....
_________________
Registered linux user #341804
Visit Black Manticore: http://www.blackmanticore.com/
Back to top
View user's profile Send private message
kf_man
n00b
n00b


Joined: 20 Feb 2004
Posts: 21

PostPosted: Mon Feb 23, 2004 3:20 am    Post subject: Reply with quote

I have Ensoniq 1371 audio on my gateway computer. I used the asound.conf from Niek, but I get errors when restarting alsasound.

Here is my /etc/asound.conf:
Code:
pcm.mixer {
   type dmix
   ipc_key 1024
   slave {
     pcm "hw:0,0"
     period_time 0
     period_size 1024
     buffer_size 8192
     rate 44100
   }
 }

 pcm.!default {
   type plug
   slave.pcm "mixer"
 }


Here is the error I get:
Code:
bash-2.05b# mv /etc/asound.conf.old /etc/asound.conf
bash-2.05b# nano -w /etc/asound.conf
bash-2.05b# /etc/init.d/alsasound restart
 * WARNING:  you are stopping a boot service.
 * Unloading ALSA...
ALSA lib conf.c:1565:(snd_config_load1) _toplevel_:5:2:Unexpected char
ALSA lib conf.c:2803:(snd_config_hook_load) /etc/asound.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2667:(snd_config_hooks_call) function snd_config_hook_load returned error: Unknown error
ALSA lib conf.c:3032:(snd_config_update_r) hooks failed, removing configuration
can't open sequencer
 * Storing ALSA Mixer Levels
ALSA lib conf.c:1565:(snd_config_load1) _toplevel_:5:2:Unexpected char
ALSA lib conf.c:2803:(snd_config_hook_load) /etc/asound.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2667:(snd_config_hooks_call) function snd_config_hook_load returned error: Unknown error
ALSA lib conf.c:3032:(snd_config_update_r) hooks failed, removing configuration
/usr/sbin/alsactl: get_controls:485: snd_ctl_open error: Unknown error
 * Unloading modules                                                      [ ok ]
 * Loading ALSA drivers...
 * Using ALSA OSS emulation
 * Loading: snd-seq-oss
 * Loading: snd-pcm-oss
 * Running card-dependent scripts
 * Restoring Mixer Levels
ALSA lib conf.c:1565:(snd_config_load1) _toplevel_:5:2:Unexpected char
ALSA lib conf.c:2803:(snd_config_hook_load) /etc/asound.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2667:(snd_config_hooks_call) function snd_config_hook_load returned error: Unknown error
ALSA lib conf.c:3032:(snd_config_update_r) hooks failed, removing configuration
/usr/sbin/alsactl: set_controls:986: snd_ctl_open error: Unknown error    [ ok ]


Here are the versions of my alsa:
Code:
bash-2.05b# qpkg -I -v | grep alsa
media-libs/alsa-lib-0.9.8 *
media-libs/alsa-oss-0.9.8 *
media-sound/alsa-utils-0.9.8 *
media-sound/alsa-driver-0.9.8 *


Here is my kernel version:
Code:
bash-2.05b# uname -r
2.4.22-gentoo-r7


What did I do wrong?
_________________
-Kyle
Linux n00b

System:
HP zt3000
Pentium M 1.6 GHz
1GB PC2700 DDR SDRAM
100GB 5400RPM
Intel audio
ATI Radeon 9000
Realtek 8139
IPW2200
Agere Modem
Back to top
View user's profile Send private message
Niek
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 236
Location: Houten, The Netherlands

PostPosted: Mon Feb 23, 2004 7:49 am    Post subject: Reply with quote

kf_man wrote:
I have Ensoniq 1371 audio on my gateway computer. I used the asound.conf from Niek, but I get errors when restarting alsasound.
(...)
What did I do wrong?
The indentation of your /etc/asound.conf is wrong. You have to remove leading spaces, because something got wrong while copy/pasting the code.
I've uploaded my asound.conf file to http://www.sourcecode.no/pastebin/en/index.php?page=show&id=7923&key=a4zjojmkif
You can copy it from the code block and paste it in an editor, in this way it should work.
_________________
Bezoek ook eens de Nederlandstalige Gentoo IRC channel op irc.freenode.net - #gentoo-nl
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Feb 23, 2004 9:45 am    Post subject: Reply with quote

Y'all look like you have a complex setup. All I had to do was:
Code:
charlie@mightymax charlie $ cat /etc/asound.conf
pcm.!default {
    type plug
    slave.pcm "dmix:CARD=0,DEVICE=0,RATE=44100"
}

_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
kf_man
n00b
n00b


Joined: 20 Feb 2004
Posts: 21

PostPosted: Mon Feb 23, 2004 7:01 pm    Post subject: Reply with quote

Niek wrote:
kf_man wrote:
I have Ensoniq 1371 audio on my gateway computer. I used the asound.conf from Niek, but I get errors when restarting alsasound.
(...)
What did I do wrong?
The indentation of your /etc/asound.conf is wrong. You have to remove leading spaces, because something got wrong while copy/pasting the code.
I've uploaded my asound.conf file to http://www.sourcecode.no/pastebin/en/index.php?page=show&id=7923&key=a4zjojmkif
You can copy it from the code block and paste it in an editor, in this way it should work.


Not to get off topic, but what editor do you use? Up until now I have been using nano, but that could be the cause of my spacing issues. I am currently running KDE 3.1.3 on the latest version of XFree (3.5.0-rc2, i just installed it today). Also, how would I use an X-based editor when I am not logged in as root? Any help would be great.

edit: By the way, I also upgraded to Kernel 2.6.3-mm2 as well. I am running the built in ALSA.
_________________
-Kyle
Linux n00b

System:
HP zt3000
Pentium M 1.6 GHz
1GB PC2700 DDR SDRAM
100GB 5400RPM
Intel audio
ATI Radeon 9000
Realtek 8139
IPW2200
Agere Modem
Back to top
View user's profile Send private message
kf_man
n00b
n00b


Joined: 20 Feb 2004
Posts: 21

PostPosted: Wed Feb 25, 2004 2:10 am    Post subject: well, that worked...sorta Reply with quote

The change in code did work, but I still can't play two sounds at once...any other tips to try. I was trying to play xmms and hear the console's sound when you move in a bad direction... Maybe i'm just dumb?

-Kyle
_________________
-Kyle
Linux n00b

System:
HP zt3000
Pentium M 1.6 GHz
1GB PC2700 DDR SDRAM
100GB 5400RPM
Intel audio
ATI Radeon 9000
Realtek 8139
IPW2200
Agere Modem
Back to top
View user's profile Send private message
kf_man
n00b
n00b


Joined: 20 Feb 2004
Posts: 21

PostPosted: Wed Feb 25, 2004 2:10 am    Post subject: well, that worked...sorta Reply with quote

The change in code did work, but I still can't play two sounds at once...any other tips to try. I was trying to play xmms and hear the console's sound when you move in a bad direction... Maybe i'm just dumb?
_________________
-Kyle
Linux n00b

System:
HP zt3000
Pentium M 1.6 GHz
1GB PC2700 DDR SDRAM
100GB 5400RPM
Intel audio
ATI Radeon 9000
Realtek 8139
IPW2200
Agere Modem
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 958
Location: Portugal

PostPosted: Wed Feb 25, 2004 10:42 pm    Post subject: Reply with quote

sorry, i had forgot about this thread, if any problems or something, if youy need help, just type, i will remember to look at it :)
Back to top
View user's profile Send private message
Niek
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 236
Location: Houten, The Netherlands

PostPosted: Thu Feb 26, 2004 8:17 am    Post subject: Reply with quote

kf_man wrote:
(...)
Not to get off topic, but what editor do you use? Up until now I have been using nano, but that could be the cause of my spacing issues. I am currently running KDE 3.1.3 on the latest version of XFree (3.5.0-rc2, i just installed it today).
(...)
I'm using Kate as my default editor. But it's not the editor's fault I think, but your browser's. There's a bug Konqueror's 3.1.x copy/paste code.
kf_man wrote:
The change in code did work, but I still can't play two sounds at once...any other tips to try. I was trying to play xmms and hear the console's sound when you move in a bad direction... Maybe i'm just dumb?
-Kyle
Are you sure you configured the XMMS ALSA plugin properly? Try the following command to test your asound.conf file with aplay:
Code:
for i in 1 2 3; do aplay -q $KDEDIR/share/sounds/KDE_Startup.wav& sleep 2; done

If this plays multiple sound at the same time, your asound.conf file is OK but your XMMS config is wrong. Else, try another asound.conf file, eg the one from charlieg.
_________________
Bezoek ook eens de Nederlandstalige Gentoo IRC channel op irc.freenode.net - #gentoo-nl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, ... 10, 11, 12  Next
Page 2 of 12

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum