Audio streaming for Ubuntu

Status
Not open for further replies.

Shawnjnorton

Member
Premium Subscriber
Joined
Apr 22, 2012
Messages
84
Location
Bucks County, PA
Well I finally have op25 up and running thanks to some amazing help Bill88,
Now looking to stream to broadcastify. Any help would be appreciated.

Sent from my Samsung Galaxy S9+ using Tapatalk
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I have two streams from op25 to broadcastify. The secret is to use the "loopback" alsa driver to create a virtual device that op25 can write to that darkice can then read from. If you want to listen to the audio locally as well, you'll also use the dsnoop alsa module to tee the pcm stream into your playback device.
 

Shawnjnorton

Member
Premium Subscriber
Joined
Apr 22, 2012
Messages
84
Location
Bucks County, PA
I have two streams from op25 to broadcastify. The secret is to use the "loopback" alsa driver to create a virtual device that op25 can write to that darkice can then read from. If you want to listen to the audio locally as well, you'll also use the dsnoop alsa module to tee the pcm stream into your playback device.
Yeah I'm lostg with that

Sent from my Samsung Galaxy S9+ using Tapatalk
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Yeah I'm lostg with that

Sent from my Samsung Galaxy S9+ using Tapatalk

I don't believe I've seen a set of canned instructions how to set up what you're trying to do. Every installation is going to be specific, so the best advice I can give is to dive in, test the water and learn as you go.

To get it working you'll need to figure out how to enable "aloop" and "dsnoop" in the kernel at boot time, set up /etc/asound.conf to define the loopback audio devices, configure /etc/darkice.cfg to working with the audio device, then finally pull all the pieces together.

I found most of the hints using google when I was going through the same learning curve..
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
So I'm basically SOL unless I teach myself how to get it done...

Sent from my Samsung Galaxy S9+ using Tapatalk

I can provide you a copy of my asound.conf which is 95% of the difficult portion of the challenge. What I do not have is enough free time to sit down and set it all up for you.

Copy and paste the following in a file named /etc/asound.conf
Code:
# output device
pcm.loopout {
  type dmix
  ipc_key 328211
  slave.pcm "hw:Loopback,0,0"
}

# input device
pcm.loopin {
  type dsnoop
  ipc_key 686592
  slave.pcm "hw:Loopback,1,0"
}

# duplex plug device
pcm.loop {
  type plug
  slave {
    pcm {
      type asym
      playback.pcm "loopout"
      capture.pcm "loopin"
    }
  }
}

pcm.mout {
  type plug
  slave.pcm mdev
  route_policy "duplicate"
}

pcm.mdev {
        type multi

        slaves.a.pcm "hw:Loopback,0,0"
        slaves.a.channels 2
        slaves.b.pcm "hw:0,0"
        slaves.b.channels 2

        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1
}

After making the asound.conf file, you also need to modload the snd-aloop driver at boot time. This requires a special file in /etc/modprobe.d, the contents of which depend on the hardware of the machine you are using. On a Raspberry PI 3 the file looks like this:
Code:
softdep snd-bcm2835 post: snd-aloop
The part that will vary is "snd-bcm2835". You need to find what sound hardware driver is used for your system.

With the alsa config done, make op25 play it's sound output to "-O mout" then have darkice pull the audio from device "loop".
 

Shawnjnorton

Member
Premium Subscriber
Joined
Apr 22, 2012
Messages
84
Location
Bucks County, PA
Well gave up trying to get it setup. What about using WINE to run scannercast?

Sent from my Samsung Galaxy S9+ using Tapatalk
 
Status
Not open for further replies.
Top