From: Pavel Hofman <pavel.hofman@ivitera.com>
To: Fabien COMTE <fabien.comte@ercogener.com>
Cc: alsa-user@lists.sourceforge.net, alsa-devel@alsa-project.org
Subject: Re: Asterisk and ALSA/Jack
Date: Mon, 05 Oct 2009 10:02:33 +0200 [thread overview]
Message-ID: <4AC9A819.3000900@ivitera.com> (raw)
In-Reply-To: <000101ca442b$20b13f90$6213beb0$@comte@ercogener.com>
Fabien COMTE wrote:
> Hi,
>
> I want to use Asterisk with ALSA / Jack audio.
>
> I tried the next configurations :
>
> 1 ) app_jack.so -> does not work.
>
> 2 ) chan_alsa.so without jackd started
> my .asoundrc :
> pcm.!default
> {
> type hw
> card 1
> }
> pcm.jack1 {
> type jack
> playback_ports {
> 0 alsa_pcm:playback_1
> 1 alsa_pcm:playback_2
> }
> capture_ports {
> 0 alsa_pcm:capture_1
> 1 alsa_pcm:capture_2
> }
> }
>
> pcm.jack1b {
> type plug
> device jack1b
> server linux
>
>
> slave {
> pcm "jack1"
> rate 8000
> format FLOAT
> channels 2
> }
> }
>
> ctl.mixer0 {
> type hw
> card 1
> }
>
> in alsa.conf :
> input_device=default
> output_device=default
>
> That works fine.
>
> 3 ) chan_alsa.so with jackd started
> Jackd launch command :
> jackd --port-max 16 --realtime --no-mlock -d alsa --playback hw:1,0
> --capture hw:1,0 --rate 8000 --period 1024 --shorts --inchannels 2
> --outchannels 2 --dither triangular &
>
> my .asoundrc :
>
> pcm.!default
> {
> type plug
> slave {
> pcm "jack1"
> rate 8000
> format FLOAT
> channels 2
> }
> }
> pcm.jack1 {
> type jack
> playback_ports {
> 0 alsa_pcm:playback_1
> 1 alsa_pcm:playback_2
> }
> capture_ports {
> 0 alsa_pcm:capture_1
> 1 alsa_pcm:capture_2
> }
> }
>
> pcm.jack1b {
> type plug
> device jack1b
> server linux
>
>
> slave {
> pcm "jack1"
> rate 8000
> format FLOAT
> channels 2
> }
> }
>
>
> ctl.mixer0 {
> type hw
> card 1
> }
>
> in alsa.conf :
> input_device=default
> output_device=default
>
> It doesn't work. Asterisk outputs are :
> [Oct 3 10:34:50] ERROR[1364]: chan_alsa.c:175 alsa_card_init: snd_pcm_open
> failed: No such file or directory
> [Oct 3 10:34:50] ERROR[1364]: chan_alsa.c:175 alsa_card_init: snd_pcm_open
> failed: No such file or directory
> [Oct 3 10:34:50] ERROR[1364]: chan_alsa.c:272 soundcard_init: Problem
> opening ALSA I/O devices
>
> But aplay my_test_file.wav works fine and arecord too...
>
> Does anyone have an idea ?
>
Does asterisk run under the same user as the .asoundrc is defined for?
Since your card is nb. 1, perhaps asterisk uses a default configuration
for card0 which may not be present on your system.
Pavel.
next parent reply other threads:[~2009-10-05 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <000101ca442b$20b13f90$6213beb0$@comte@ercogener.com>
2009-10-05 8:02 ` Pavel Hofman [this message]
2009-10-03 13:12 Asterisk and ALSA/Jack Fabien COMTE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AC9A819.3000900@ivitera.com \
--to=pavel.hofman@ivitera.com \
--cc=alsa-devel@alsa-project.org \
--cc=alsa-user@lists.sourceforge.net \
--cc=fabien.comte@ercogener.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox