[alsa-devel] redirecting audio to another desktop machine

Hans-Kristian Arntzen maister at archlinux.us
Mon Jun 21 15:51:19 CEST 2010


On 06/21/2010 02:10 PM, Viral Mehta wrote:
>    
>> On 06/21/2010 12:00 PM, alsa-devel-request at alsa-project.org wrote:
>>      
>>> Date: Mon, 21 Jun 2010 14:57:00 +0530
>>> From: Viral Mehta<Viral.Mehta at lntinfotech.com>
>>> Subject: [alsa-devel] redirecting audio to another desktop machine
>>> To: "alsa-devel at alsa-project.org"<alsa-devel at alsa-project.org>
>>> Message-ID:
>>>        <70376CA23424B34D86F1C7DE6B9973430254343B3E at VSHINMSMBX01.vshodc.lntinfotech.com>
>>>
>>> Content-Type: text/plain; charset="us-ascii"
>>>
>>> Hi list,
>>>
>>> I have an embedded device running linux kernel and a minimal filesystem.
>>>
>>> I want to access this device remotely which means I should be able to connect to the device just like we do Remote Desktop over ethernet.
>>> I am able to do this. I am able to send key-event and framebuffer data whenever my desktop machine connects to the device.
>>>
>>> But, I am not able to send audio data on remote side.
>>> I am really not sure which device file (/dev/snd/ ???) I should read and capture the data and should send across....
>>> Or can I read the playback device ? I think NO.
>>> Do I need to create some kind of virtual sound device ?
>>>
>>> Any pointers/suggestions are appreciated.
>>>
>>> Thanks,
>>> Viral
>>>
>>>
>>>
>>>        
>> If you want to reroute an ALSA application over the network, you can use
>> output plugins. Afaik, both PulseAudio and RSound provides plugins for
>> this. You generally want to set up a virtual device in .asoundrc or
>> similar.
>> -- Hans-Kristian Arntzen
>>      
> Hi,
> thanks for the reply.
>
> Let me make sure I understood it in general..... Is it possible to use same plugins (or any other) if my embedded device is connected to my  desktop machine via USB (assuming that I have all USB data transfer mechanism/drivers underlying).
>
> If I setup a virtual device in .asoundrc, audio (or say aplay) applications will pass audio data to my virtual device ??
> Do I also need to create any such virtual interface from kernel code as well ?
>
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
> ______________________________________________________________________
>
> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
>
> ______________________________________________________________________
>    
With output plugins for ALSA, you can in general do whatever you want. 
The plugins will receive audio data, and they can do anything. When you 
say you want to output to your device via USB cable, I'm not sure if 
that is supplied ootb. I assumed you wanted to output via ethernet. 
Pulse might do USB, but I'm not sure.

In any case, your output plugin will probably look something like this:

pcm.usb_device {
    type usb_output # there's no output plugin like this, just a random 
name to illustrate
    device "your device"
}

Then you could use aplay -Dusb_device.



More information about the Alsa-devel mailing list