Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microphone doesn't work with skype #16

Closed
powerman opened this issue Nov 15, 2014 · 19 comments
Closed

microphone doesn't work with skype #16

powerman opened this issue Nov 15, 2014 · 19 comments
Labels

Comments

@powerman
Copy link

Skype play sounds ok, but microphone doesn't work in skype at all. While skype test call (echo123) when it tries to play back my recording instead of 10 second (of silence) I get only about 0.5-1 sec between before/after "beeps", which gives me idea it may be related to wrong sample rate.

I've this issue with apulse 0.1.2, 0.1.3 and dev branch.
My system is 64-bit Gentoo Linux, skype-4.3.0.37, sound card SB Audigy 2 ZS [SB0350].
Skype is 32-bit, so I'm running /usr/bin/i686-pc-linux-gnu-apulse skype.
I've tried without ~/.asoundrc and with ~/.asoundrc from issue #14.
I've also tried APULSE_CAPTURE_DEVICE=plughw:0,0 /usr/bin/i686-pc-linux-gnu-apulse skype.

Testing microphone with arecord/aplay and alsamixer show everything is fine (mic volume is ok, wav file recorded and played correctly). With pulseaudio microphone in skype also works ok.

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Audigy2 [SB Audigy 2 ZS [SB0350]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 ZS [SB0350]], device 1: emu10k1 mic [Mic Capture]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 ZS [SB0350]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 ZS [SB0350]], device 4: p16v [p16v]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
@i-rinat
Copy link
Owner

i-rinat commented Nov 16, 2014

If you launch Skype from terminal emulator, do you see any error messages?

@powerman
Copy link
Author

No.

@i-rinat
Copy link
Owner

i-rinat commented Nov 16, 2014

Then I have no idea what it is and how to fix it.

@powerman
Copy link
Author

Any ideas about how to debug it? Increase debug level, use strace, etc.?

@powerman
Copy link
Author

Also, I've previously used skype with pulseaudio, and used pavumeter to configure it, so maybe this happens because of some leftovers of pulseaudio configuration?

@i-rinat
Copy link
Owner

i-rinat commented Nov 16, 2014

Any ideas about how to debug it?

Compiling debug version will turn on trace output, for almost every API call will be printed to stdout. (cmake -DCMAKE_BUILD_TYPE=Debug .., then make again.)
I would trace return values from ALSA calls. Now if one of them fails, error is reported. It's still odd that no errors messages was produced.

Then, I would probably add logging to capture path to find out if any data is read from device.

so maybe this happens because of some leftovers of pulseaudio configuration?

No, I don't think so.

@powerman
Copy link
Author

I've run /usr/bin/i686-pc-linux-gnu-apulse skype >apulse-debug.log 2>&1 (yesterday's dev version, I don't have ~/.asoundrc now), make skype test call, and exit skype. Please check log http://powerman.name/tmp/apulse-debug.log and let me know what I should try next.

@lodgerz
Copy link

lodgerz commented Nov 16, 2014

try to edit ~/.asoundrc like that:

pcm.usb
{
type hw
card Audigy2
}

pcm.!default
{
type asym
playback.pcm
{
type plug
slave.pcm "dmix"
}
capture.pcm
{
type plug
slave.pcm "usb"
}
}

@powerman
Copy link
Author

@lodgerz thanks, but it makes no difference, except with your .asoundrc skype was unable to open sound device while mplayer was runnning (without .asoundrc this issue doesn't exists).

@lodgerz
Copy link

lodgerz commented Nov 17, 2014

show me the output of:
$ cat /proc/asound/cards

@powerman
Copy link
Author

$ cat /proc/asound/cards
 0 [Audigy2        ]: Audigy2 - SB Audigy 2 ZS [SB0350]
                      SB Audigy 2 ZS [SB0350] (rev.4, serial:0x20021102) at 0xc080, irq 19

@lodgerz
Copy link

lodgerz commented Nov 17, 2014

@powerman
Copy link
Author

With both configs microphone in skype still doesn't work.
With second config I've also tried to run skype while mplayer was running - works ok - and also tried again to use arecord/aplay - microphone in arecord works ok:

$ LANG=C arecord -t wav -r 44100 -f S16_LE 1.wav
Recording WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
$ aplay 1.wav 
Playing WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

I've also tried -r 48000 - works ok too. Not sure is this important but by default (without params) arecord use very bad quality (but it also works ok): "Unsigned 8 bit, Rate 8000 Hz, Mono".

@powerman
Copy link
Author

BTW, looks like there is no difference in running skype or apulse skype because in Gentoo apulse's libs are installed into /usr/lib64/ and /usr/lib32/ and these paths are already in /etc/ld.so.conf.

@powerman
Copy link
Author

Is there exists small tool similar to arecord but which use pulseaudio, to test microphone+apulse without skype?

@i-rinat
Copy link
Owner

i-rinat commented Nov 17, 2014

Is there exists small tool similar to arecord but which use pulseaudio, to test microphone+apulse without skype?

avconv -f pulse -i default out.wav (or ffmpeg -f pulse -i default out.wav)

but they don't work now. Functions in libpulse-simple.so are not implemented, and if I use libpulse-simple.so from PulseAudio, nothing gets recorded. Didn't investigate that.

@i-rinat
Copy link
Owner

i-rinat commented Nov 18, 2014

@powerman
Copy link
Author

@i-rinat wow, it works! Thanks!

@i-rinat i-rinat added the fixed label Nov 18, 2014
@i-rinat
Copy link
Owner

i-rinat commented Nov 18, 2014

OK, pushed to master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants