• Effective immediately we will be deleting, without notice, any negative threads or posts that deal with the use of encryption and streaming of scanner audio.

    We've noticed a huge increase in rants and negative posts that revolve around agencies going to encryption due to the broadcasting of scanner audio on the internet. It's now worn out and continues to be the same recycled rants. These rants hijack the threads and derail the conversation. They no longer have a place anywhere on this forum other than in the designated threads in the Rants forum in the Tavern.

    If you violate these guidelines your post will be deleted without notice and an infraction will be issued. We are not against discussion of this issue. You just need to do it in the right place. For example:
    https://forums.radioreference.com/rants/224104-official-thread-live-audio-feeds-scanners-wait-encryption.html

Fix for Ubuntu 10.10+

Status
Not open for further replies.

clayb

Member
Joined
May 7, 2010
Messages
3
Hi all,

I've seen a lot of posts that DSD does not support Ubuntu 10.10 and beyond. To support Ubuntu 10.10 (and this should work on previous versions too) one needs to apply the attached patch to dsd_audio via:
$ patch dsd-1.4.1/dsd_audio.c dsd_audio_patch.txt

After compiling, to execute dsd, one needs to run it as:
$ padsp -- ./dsd -i /dev/dsp -o /dev/dsp <other options here>

Happy scanning
 

Attachments

corbintechboy

Member
Joined
Aug 12, 2005
Messages
421
Location
Corbin, KY
The real reason DSD does not work with newer/different forms of Linux is the fact that the base audio support is not based on OSS (the Open Sound System).

There are options to make DSD work without a patch. You could look into your distributions option to use OSS or you could make a system link to your raw device.

So if the card in Alsa is /dev/card0 (for example), you could issue "sudo ln -s /dev/card0 /dev/audio". This would create a system link and any software that tried to use /dev/audio would actually be using /dev/card0 and this would be invisible to the software. Of course watch out because your raw device may not be /dev/card0 and may be something completely different (it may even be buried in a folder).
 
Last edited:

rick10

Member
Joined
Mar 27, 2004
Messages
12
Location
rick10
Fix for Ubunut 10.10+

I applied this patch on my Fedora 14 x86_64 system and everything works fine. I tried compiling dsd/mbe for both 32 and 64 bit and both seem to work. I am sticking with 64bit for now. Thanks to the DSD authors and to the patch author.
 

KC1UA

Scan New England Guru
Database Admin
Joined
Oct 27, 2002
Messages
1,586
Location
Cape Cod, Massachusetts
Hi all,

I've seen a lot of posts that DSD does not support Ubuntu 10.10 and beyond. To support Ubuntu 10.10 (and this should work on previous versions too) one needs to apply the attached patch to dsd_audio via:
$ patch dsd-1.4.1/dsd_audio.c dsd_audio_patch.txt

After compiling, to execute dsd, one needs to run it as:
$ padsp -- ./dsd -i /dev/dsp -o /dev/dsp <other options here>

Happy scanning
I'm trying to apply this patch in Ubuntu 11.04 32 bit and I'm receiving the following error when I'm running it.

patching file dsd-1.4.1/dsd_audio.c
Hunk #1 FAILED at 268.
Hunk #2 FAILED at 356.
2 out of 2 hunks FAILED -- saving rejects to file dsd-1.4.1/dsd_audio.c.rej
The only reference in the file system pertinent to DSD is in the /usr/local/bin folder. Do I need to move the patch to that folder and then run it? Bear with me, I'm still in the early stages of learning some parts of Linux.

Thanks in advance.
 

clayb

Member
Joined
May 7, 2010
Messages
3
I'm trying to apply this patch in Ubuntu 11.04 32 bit and I'm receiving the following error when I'm running it.



The only reference in the file system pertinent to DSD is in the /usr/local/bin folder. Do I need to move the patch to that folder and then run it? Bear with me, I'm still in the early stages of learning some parts of Linux.

Thanks in advance.
Hi scancapecod,

You do not want to patch the /usr/local/bin/dsd file -- that's the DSD binary file. You want to apply the patch to the DSD source code (the .c files). You should be trying to apply the patch via the command:

patch dsd_audio.c dsd_audio_patch.txt

Also, verify that your dsd_audio.c file matches mine (just as downloaded from the DSD page here on RadioReference); the file has a MD5 hash of 262406e0d3f1dadbfe24d5742b507f9b. This can be found by using the command:

md5sum dsd_audio.c

If your MD5 sum does not match then likely your dsd_audio.c file is corrupt or it is certainly some how different from mine!

Lastly, if you are still not successful in automatically patching the dsd_audio.c file, you can manually insert the necessary code, however, it would help to have some understanding of the C programming language.

Basically, one would open the patch file in a text editor (for example, gedit); in the patch file you will see two sections, each is headed by the C function the change is in (e.g. openAudioOutDevice and openAudioInDevice). One would find these C function code blocks in the dsd_audio.c file and would then find the context from the patch file (the code blocks with "ioctl setfmt error \n" in them in the appropriate C function). Immediately after said code block, one would paste in the lines starting with plus signs from the patch file -- but removing the plus signs.

If the manual process does not make sense, it is a bit involved and likely beyond the scope of back-and-forth forum posts but hopefully the directions can help you on your way if the patch command continues to fail you.

Good luck!
 

gary123

Member
Joined
Sep 11, 2002
Messages
1,065
I have tried to do the patch several ways and so far each getts messed up.

I was wondering if clayb may have a copy of the patched dsd_audio.c prior to the program being installed? My request is for 2 reasons, ! I want to get dsd running on v12.04 and second I want to see where I messed up in the direct editing :)
 

gary123

Member
Joined
Sep 11, 2002
Messages
1,065
An update I got the patch working I was trying to install the patch from the home folder in terminal and not the dsd-1.4.1 folder. once I tried running it in the dsd folder it patched fine. A side note you may have to download the patch prerequisite using "sudo apt-get install patch"


Code:
cd dsd-1.4.1
patch dsd_audio.c dsd_audio_patch.txt
I still have issues but they are in a new thread on installing DSD under Ubuntu 12.04.

If anyone wants the patched dsd_audio.c file ask here and i will attach it.
 

nycap

Member
Joined
Mar 13, 2008
Messages
196
i am having trouble applying this patch. could i have a copy of that file please?
 
Status
Not open for further replies.
Top