Skype Logo
Buy Skype Credit · Help ·
  • Download
  • Use Skype
  • Business
  • Shop
  • Account
  • Home
  • Get Connected
  • Features
  • Mobile
  • Prices
  • Share
  • All

Skype Community

  • Skype Community
  • English
  • Linux


.asoundrc to make Skype work with aoss

l.colitti_
New member
Posts: 3

*


Hi,

after spending hours trying to track down the source of the problem, I managed to write an .asoundrc that makes Skype work with aoss. Previously, "aoss /path/to/skype" would start skype but I would get no sound. With this .asoundrc, sound works too. That means you can use your system's dmix plugin to use Skype at the same time as other sound apps, e.g. listen to music and make a call at the same time, or pause xmms, answer a call, and resume xmms afterwards.

Note: this ONLY helps if skype already works perfectly but says "problem with sound device" if you try to make or receive a call when another audio app is running. It will not fix any other problem you might have, and it might not even fix this one. wink.png I have succesfully tested it using on an IBM x40 with i810_audio using Linux 2.6.15 and Debian unstable with skype 1.2.0.18-API and no sound daemons (asound, esd, etc.) running. However, YMMV.

Note that it only works if you already have the dmix plugin configured, which should be the case if you have a recent version of alsa or a recent distribution. To see if dmix is properly configured, try running two audio apps in parallel, like this:

CODE
$ alsaplay file1.mp3 &

$ alsaplay file2.mp3


If you hear both at the same time, then this fix might let you listen to music and call at the same time.

To use it, just create an .asoundrc file in your home directory with the following contents:

CODE


# .asoundrc to use skype at the same time as other audio apps like xmms

#

# Successfully tested on an IBM x40 with i810_audio using Linux 2.6.15 and

# Debian unstable with skype 1.2.0.18-API. No sound daemons (asound, esd, etc.)

# running. However, YMMV.

#

# For background, see:

#

# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1228

# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1224

#

# Usage:

# 1. cp .asoundrc ~

# 2. ALSA_OSS_PCM_DEVICE="skype" aoss /path/to/skype

#

# (C) 2006-06-03 Lorenzo Colitti - http://www.colitti.com/lorenzo/

# Licensed under the GPLv2 or later



pcm.skype {

type asym

playback.pcm "skypeout"

capture.pcm "skypein"

}



pcm.skypein {

# Convert from 8-bit unsigned mono (default format set by aoss when

# /dev/dsp is opened) to 16-bit signed stereo (expected by dsnoop)

#

# We can't just use a "plug" plugin because although the open will

# succeed, the buffer sizes will be wrong and we'll hear no sound at

# all.

type route

slave {

 pcm "skypedsnoop"

 format S16_LE

}

ttable {

 0 {0 0.5}

 1 {0 0.5}

}

}



pcm.skypeout {

# Just pass this on to the system dmix

type plug

slave {

 pcm "dmix"

}

}



pcm.skypedsnoop {

type dsnoop

ipc_key 1133

slave {

 # "Magic" buffer values to get skype audio to work

 # If these are not set, opening /dev/dsp succeeds but no sound

 # will be heard. According to the alsa developers this is due

 # to skype abusing the OSS API.

 pcm "hw:0,0"

 period_size 256

 periods 16

 buffer_size 16384

}

bindings {

 0 0

}

}


Anyone who's seeing this problem, let me know if this helps!

Cheers,
Lorenzo
Mon Mar 6 2006, 17:59 · Reply · Quote and reply · Permalink · Top ·

mishaikin_
Advanced Member
Posts: 50

***


Incredible, with that .asoundrc I was able to to make a few test (echo123) calls listening music with AmaroK in the same time! Works perfectly at first look!

P.S. However!: I have noticed that after a while the sound disappears (often times) .... maybe after a few minutes ... so I have to reestablish the call. (I don't have to restart the skype) In the console the famous stupid error appears:
read error, res = 554 , handle = 35
read error, res = 668 , handle = 42
Tue Mar 7 2006, 20:23 · Reply · Quote and reply · Permalink · Top ·
zoric_
Regular member
Posts: 5

**


Wonderful! Works perfectly for me on Ubuntu Dapper bigsmile.png

Many many thanks smile.png
Tue Mar 14 2006, 10:26 · Reply · Quote and reply · Permalink · Top ·
KubaR_
New member
Posts: 1

*


Hi!!!!

Works perfectly on Slackware less-or-more current, Linux 2.6.15.1.

Thanks,

Kuba
Tue Mar 14 2006, 14:54 · Reply · Quote and reply · Permalink · Top ·
sadi_
New member
Posts: 3

*


Thanks for the effort...
However, I regret to let you know that after carefully doing all that, my Skype went completely deaf and dump (Naturally I tried to use it while I was listening to musiz with Amarok)...
My Info:
Skype 1.2.0.18
Amarok 1.3
Linux kernal: 2.6.13-15.8-default
OS: openSUSE 10.0
GUI: KDE 3.5
Architecture: i386
CPU: Intel Celeron CPU 1.7 GHz
Sound: Gigabyte GA-8PE667 Ultra
Good luck,
Sadi
(a Linux novice who has just migrated from Windows)
PS. Isn't there any way of combining these 2 steps into a single in one way or the other so that it cam be added to the K menu?
Fri Mar 17 2006, 09:18 · Reply · Quote and reply · Permalink · Top ·
xboxrulz_
Advanced Member
Posts: 423

***


hmmm.. I doubt it will work, I tried to solve this issue but usually I get the read errors.

xboxrulz
Fri Mar 17 2006, 18:42 · Reply · Quote and reply · Permalink · Top ·
antifuchs_
New member
Posts: 1

*


QUOTE(l.colitti)

Note: this ONLY helps if skype already works perfectly but says "problem with sound device" if you try to make or receive a call when another audio app is running. It will not fix any other problem you might have, and it might not even fix this one. wink.png I have succesfully tested it using on an IBM x40 with i810_audio using Linux 2.6.15 and Debian unstable with skype 1.2.0.18-API and no sound daemons (asound, esd, etc.) running. However, YMMV.


Tested and working on T40p running Ubuntu Dapper Drake.

After discovering that I have to turn up the recording volume of the Mic and Line inputs in aumix (not available in alsamixer, for some reason), it works perfectly. Thanks so much!
Sun Mar 19 2006, 11:59 · Reply · Quote and reply · Permalink · Top ·
giksos_
New member
Posts: 3

*


Using SUSE 10, alsa-1.0.9-23.2, skype-1.2.0.18-suse the settings above work for me, thanks a lot!

One problem remains however. When starting skype normally, it uses the ISAC codec. When working through aoss with the above setup, it uses iLBC with noticeably worse sound quality. Any ideas what is going on?

Cheers,
Misha
Tue Mar 21 2006, 18:10 · Reply · Quote and reply · Permalink · Top ·
sadi_
New member
Posts: 3

*


Dear Misha,

Can you please tell me if yoıu have done anything other than what's written at the top? I wonder why my Skype went deaf and dump then altough we have the same software (hardware issues?) By the way I have alsa-1.0.10-0.pm.1 installed (from Packman) and get very good sound (with the exception that I cannot listen to Amarok and chat through Skype at the same time ;-))

Regards,

Sadi

[quote=giksos]Using SUSE 10, alsa-1.0.9-23.2, skype-1.2.0.18-suse the settings above work for me, thanks a lot!

One problem remains however. When starting skype normally, it uses the ISAC codec. When working through aoss with the above setup, it uses iLBC with noticeably worse sound quality. Any ideas what is going on?

Cheers,
Misha[/quote]
Wed Mar 22 2006, 08:39 · Reply · Quote and reply · Permalink · Top ·
giksos_
New member
Posts: 3

*


no, I have done exactly what is written up there:

1. create the file ~/.asoundrc with contents as above
2. create a script aoss_skype with contents
CODE


#!/bin/bash

export ALSA_OSS_PCM_DEVICE="skype"

aoss skype


3. ./aoss_skype

I am using Acer Travelmate 290 with sound card
82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller
and driver snd-intel8x0.

Cheers,
Misha
Wed Mar 22 2006, 14:20 · Reply · Quote and reply · Permalink · Top ·
ryanvalor_
Advanced Member
Posts: 52

***


however folks, dont forget: he is redirecting output to the dmix which should be existant in a global /etc/asound.conf at least.

dunno if it works without a defined dmix output. didnt work here, but i already defined "dmixer" als my dmix output device, just had to change a line in the code to get it work.

and: remove any other dsnoop you might have. you can use skypein with your standard settings, it works.


--------------------
kubuntu stable.
Wed Mar 22 2006, 23:03 · Reply · Quote and reply · Permalink · Top ·
joerg_
Advanced Member
Posts: 87

***


QUOTE(ryanvalor)
however folks, dont forget: he is redirecting output to the dmix which should be existant in a global /etc/asound.conf at least.

with 'new-time' ALSA this is (should be) in /usr/share/alsa by default (where you PLEASE don't change a single bit), and so doesn't need to be existant in /etc/asound.conf.
check
CODE
aplay -L

to see wether it's allready there.

try
CODE
aplay -vvv some/wav/file

to get more info

:wink:
j
Thu Mar 23 2006, 03:05 · Reply · Quote and reply · Permalink · Top ·
giksos_
New member
Posts: 3

*


QUOTE

however folks, dont forget: he is redirecting output to the dmix which should be existant in a global /etc/asound.conf at least.  

I have no /etc/asound.conf, but it still works for me.

Misha
Thu Mar 23 2006, 03:07 · Reply · Quote and reply · Permalink · Top ·
ryanvalor_
Advanced Member
Posts: 52

***


okay the other way round: IF there is a conf-file, it seems that a dmix output cease to exist and is overridden. (i have no such output called "dmix". it is called (by myself) "dmixer" on my machine)
i have made my own asound.conf a long time ago, it is perfectly shaped to my ac97 soundcard. maybe there are others who wonder why there is no output, and a good tip is to look if you have a custom config file.

and if, how the dmix output device is named.

also another dsnoop device (called dsnooper for me) used by the !default and dsp plug in my configuration didnt let skypein work. (because the soundcard was used by aRts) I had to exclude my own dsnooper device/plug, and used skypein for the default system output. which works brilliant.

am I confusing?

here my asound.conf:

CODE
pcm.card0 {

type hw

card 0

}



pcm.!default {

type plug

slave.pcm "duplex"

}



pcm.dmixer {

type dmix

ipc_key 1025

slave {

pcm "card0"

period_time 0

buffer_time 0

period_size 1024

buffer_size 8192

# 32768

# 16384

# 32768

periods 128

rate 48000 # important for my card.

}



bindings {

0 0

1 1

}

}



pcm.duplex {

    type asym

    playback.pcm "dmixer"

    capture.pcm "skypein"

}



# this makes OSS emulation via aoss default to using dmix, allegedly

pcm.dsp0 {

   type plug

   slave.pcm "duplex"

}



... (above skype code begins here)


--------------------
kubuntu stable.
Thu Mar 23 2006, 12:03 · Reply · Quote and reply · Permalink · Top ·
xboxrulz_
Advanced Member
Posts: 423

***


Confirmation: DOES NOT WORK WITH ALSA 1.0.10

[quote]
ALSA lib conf.c:1592:(snd_config_load1) _toplevel_:66:6:Unexpected char
ALSA lib conf.c:2837:(snd_config_hook_load) /home/******/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2700:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3066:(snd_config_update_r) hooks failed, removing configuration
[binary for skype] : line 1: 14265 Segmentation fault ALSA_OSS_PCM_DEVICE="skype" aoss [binary for skype]
[/quote]

xboxrulz
Sat Mar 25 2006, 04:15 · Reply · Quote and reply · Permalink · Top ·
joerg_
Advanced Member
Posts: 87

***


[quote=xboxrulz]
ALSA lib conf.c:1592:(snd_config_load1) _toplevel_:66:6:Unexpected char
ALSA lib conf.c:2837:(snd_config_hook_load) /home/******/.asoundrc may be old or corrupted: consider to remove or fix it

xboxrulz[/quote]

maybe you should consider to fix or remove your .asoundrc, which seems to have some typo around line 66, sixth char
:roll: :wink:

j
Sat Mar 25 2006, 11:21 · Reply · Quote and reply · Permalink · Top ·
joerg_
Advanced Member
Posts: 87

***


[quote=sadi]PS. Isn't there any way of combining these 2 steps into a single in one way or the other so that it cam be added to the K menu?
[/quote]

hi, sadi!
the
[quote]
"Usage:
1.
2.
[/quote]
is a little missleading. 1. means, copy this file to your homedir once, not every time you start skype.
the cmd at "2." is exactly what you can put in the cmd-field of a kmenu-entry.

for test however, i'd suppose to start this cmd in a terminal - or check the option "start in terminal" in your kmenu-entry. so you can see any error-msgs skype or aoss are throwing.

j
Sat Mar 25 2006, 11:37 · Reply · Quote and reply · Permalink · Top ·
xboxrulz_
Advanced Member
Posts: 423

***


joerg, my script is just copied straight from the first page of the post wink.png

xboxrulz
Sun Mar 26 2006, 22:02 · Reply · Quote and reply · Permalink · Top ·
bkz81_
Regular member
Posts: 5

**


I know i am doing this wrong. Can someone please tell me how to fix this?? does this fix work for Mepis?? thanks. Are you suppose to put all that stuff in a simple text file?? the .asoundrc ~ i mean. below is how i tried to make this work.

brooklynzoo81@1[~]$ su -
Password:
root@1[~]# cd /home/brooklynzoo81/
root@1[brooklynzoo81]# ls
Desktop Music News Shared Wallpapers
Documents mycheckbook Pictures TeamSpeak2RC2
Mail mycheckbook.backup public_html tmp
root@1[brooklynzoo81]# ls -a
. Documents .kpackage Shared
.. .fonts .local .Skype
.asoundrc .fonts.cache-1 Mail TeamSpeak2RC2
.azureus .gaim .mcop .thumbnails
.Azureus .gconf .mozilla tmp
.bash_history .gconfd Music .tuxracer
.bash_profile .gnome2 mycheckbook Wallpapers
.bashrc .gnome2_private mycheckbook.backup .weblink
.cbtracker .gtkpod News .Xauthority
.config .gtkrc .nvidia-settings-rc .xawtv
.DCOPserver_mepis1__0 .gtkrc-2.0 Pictures .xawtv-we
.DCOPserver_mepis1_:0 .ICEauthority public_html .xine
Desktop .kde .qt .xmms
.dmrc .kderc .realplayerrc .xsession-errors
root@1[brooklynzoo81]# ./ asoundrc ~
-su: ./: is a directory
root@1[brooklynzoo81]# sh asoundrc ~
sh: asoundrc: No such file or directory
root@1[brooklynzoo81]# sh .asoundrc ~
.asoundrc: line 19: pcm.skype: command not found
.asoundrc: line 20: type: asym: not found
.asoundrc: line 21: playback.pcm: command not found
.asoundrc: line 22: capture.pcm: command not found
.asoundrc: line 23: syntax error near unexpected token `}'
.asoundrc: line 23: `}'
root@1[brooklynzoo81]# ./ .asoundrc ~
-su: ./: is a directory
root@1[brooklynzoo81]# ./.asoundrc ~
-su: ./.asoundrc: Permission denied
root@1[brooklynzoo81]# whereis skype
skype: /usr/bin/skype /usr/lib/skype /usr/share/skype
root@1[brooklynzoo81]# cp .asoundrc ~ ALSA_OSS_PCM_DEVICE="skype" aoss /usr/bin/skype
cp: copying multiple files, but last argument `/usr/bin/skype' is not a directory
Try `cp --help' for more information.
root@1[brooklynzoo81]# cp .asoundrc ~ ALSA_OSS_PCM_DEVICE="skype" aoss /usr/lib/skype
cp: omitting directory `/root'
cp: cannot stat `ALSA_OSS_PCM_DEVICE=skype': No such file or directory
cp: cannot stat `aoss': No such file or directory
root@1[brooklynzoo81]# cp .asoundrc ~ ALSA_OSS_PCM_DEVICE="skype" aoss /usr/share/skype
cp: omitting directory `/root'
cp: cannot stat `ALSA_OSS_PCM_DEVICE=skype': No such file or directory
cp: cannot stat `aoss': No such file or directory
Sat Apr 8 2006, 20:05 · Reply · Quote and reply · Permalink · Top ·
frouty_
Regular member
Posts: 5

**


For me I can here echo123 and listen to music at same tilme
but look at that:

$ locate asound |grep etc
/etc/asound.names
$locate asound |grep conf
/home/lof/src/kernel-source-2.6.8/sound/oss/dmasoun d/Kconfig
/usr/bin/asoundconf
/usr/share/man/man1/asoundconf.1.gz

So there is no asoundrc file could you explain that

Kernel 2.6.8
card ess maestro2
module es1968
Sun Apr 9 2006, 12:40 · Reply · Quote and reply · Permalink · Top ·
2 Pages 1 2 >
 
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

Welcome guest Read a quick guide to using these community forums.

  • My area
  • Sign in
  • Related
  • Search
  • Community guidelines
  • User guides
  • Knowledgebase

Heartbeat Heartbeat See how our products are performing on the Heartbeat blog.

About us · News · Jobs · Prices · Security · Site map
Privacy policy · Legal · © 2009 Skype Limited