Can't find audio device on Raspberry Pi

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

 



Hi Eeri.

My feeling is that this is a PJSIP issue although it is made apparent on
the Pi as there is only an Audio Output by default. Others have got
around the issue by using an additional USB audio adapter, but I would
rather not go down this route. I believe PJSIP 'expects' both an input
and output devices and so is unable to cope when there is only one of
either. Of course, in general, you would want both input and output, but
I have a specific application that simply does not require input (and in
fact may have an example where I require only input, although to achieve
this on the Pi would require the use of the previously mentioned USB
Audio device) - PJSIP will simply act as a dumb receiving client and the
output will be feed into addition audio equipment.

I feel that PJSIP should be able to deal with these scenarios and that
the '--null-audio' parameter should be expanded to set no audio on
either the input OR output device and ignore the fact that such a device
might not even exist. I cannot program in C and so would not know where
to start to in order to get this functionality.


Having said all this I have managed to work around the problem. After a
bit more Googling, I came across the idea that the dummy sound devices
could be added to ALSA
(http://www.alsa-project.org/main/index.php/Matrix%3aModule-dummy) and a
poster 'haimg' on the SuperUser site gave this response -
http://superuser.com/questions/344760/how-to-create-a-dummy-sound-card-d
evice-in-linux-server/344859#344859?newreg=cb73b1bb04d34fca809e598d301b5
cae. I basically followed this procedure then started PJSUA using the
parameters to set the audio input device to the dummy device and the
Output to use the real device (if I started PJSU with no parameters, it
simply tried to use the dummy device for both input and output).

	./pjsua-armv6l-unknown-linux-gnu --capture-dev=02
--playback-dev=00 --auto-answer=200

I'm not entirely sure that I need all the steps that 'haimg' has
outlined, but it does work. The auto answer parameter is for my purposes
to get the PJSUA client to answer inbound calls.

I now need to look at the Python code in order that I can create an
application that starts automatically on boot with the correct account
info and uses the devices as outlined above - but I have finally made a
start!


Regards,


Chris 


> -----Original Message-----
> From: Eeri Kask [mailto:Eeri.Kask@xxxxxxxxxxxxxxxxxxxxx]
> Sent: 09 January 2014 13:10
> To: pjsip at lists.pjsip.org
> Subject: Re: Can't find audio device on Raspberry Pi
> 
> On Wed, 8 Jan 2014 10:22:50 +0100, Sa?l Ibarra Corretg? wrote:
> > On Jan 7, 2014, at 4:44 PM, Swinney C. <C.Swinney at swansea.ac.uk>
> wrote:
> >
> >> Hi Saul,
> >>
> >> Thanks for this, I was going to ask you if you had set up the 3.5mm
> analogue output WITHOUT the USB device installed. I think PJSIP still
moans
> about the analogue output and the fact that there is no audio input. I
was
> wondering if there was a way to set up a 'dummy' input device in order
to
> fool PJSIP.
> 
> > I see. I used 2 sound cards at the same time, the builtin one just
for ringing
> alerts, and a USB sound card for normal communication. The default
sound
> card has the volume turned all the way down for some reason, so I had
to
> turn it up with alsamixer, FYI.
> 
> 
> Have you attempted to figure out if this issue is pjsip or
raspberry-pi specific,
> like create an analogous setup on some ordinary linux, e.g. by
disabling
> microphone by removing some kernel (or alsa) module and then launch
> pjsua?
> 
> Maybe one can fool alsa to create a dummy microphone, analogous to
pjsip'
> colorbar camera device, in order to emit silence or some white noise,
and
> feed it to pjsip?
> 
>     Eeri Kask
> 
> 




[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