ALSA audio sharing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Little update on the problem: it seems that reason for auddemo working with
virtual alsa devices and pjsua not working lies in pjsua's use of conference
bridge. If pjsua use real device hw:0,0 there is no problem but also no
sharing possibility. If it uses virtual device then function
snd_pcm_hw_params_set_period_size_near in alsa_dev.c (line 562, 678) changes
the period size parameter from 320 to 2000 which (presumably) somehow result
in conflict in conference bridge (line 1792). 


I did not have enough time and more important skill (not a programmer) to
look into this problem but my long shot attempt would be to say that if alsa
virtual devices are going to be used in pjsip then something in conference
bridge has to be adjusted?


Regards,
Damir


------------------------------

Date: Thu, 8 Apr 2010 15:14:29 +0200
From: "Damir Arbula" <damir.arbula@xxxxxxxxx>
To: <pjsip at lists.pjsip.org>


Hi,


is there a way to get the trunk version with native ALSA support to work in
audio device sharing mode (defined in asound.conf). Auddemo is working,
record and play are working with audio device being busy in other process
but when I try pjsua it breaks after I try to make a call on line 1792,
conference.c: 
get frame: Assertion 'frame->size == conf->samples_per_frame *
conf->bits_per_sample / 8' failed


Thank you,
Damir

P.S. Below are the alsa_dev.c change and asound.conf

alsa_dev.c:
/*#define ALSA_DEVICE_NAME 		"plughw:%d,%d"*/
#define ALSA_DEVICE_NAME 		"pasym0"

asound.conf:
pcm.card0 {
  type hw
  card 0
}
pcm.dmix0 {
  type dmix
  ipc_key 34521
  slave {
    pcm "card0"
  }
}
pcm.dsnoop0 {
  type dsnoop
  ipc_key 34521
  slave {
    pcm "card0"
  }
}
pcm.asym0 {
  type asym
  playback.pcm "dmix0"
  capture.pcm "dsnoop0"
}
pcm.pasym0 {
  type plug
  slave.pcm "asym0"
}
pcm.dsp0 {
  type plug
  slave.pcm "asym0"
}
ctl.dsp0 {
  type hw
  card 0
}
pcm.!default {
  type plug
  slave.pcm "asym0"
}
ctl.!default {
  type hw
  card 0
}




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux