Closed AsciiWolf closed 10 months ago
Well, what kind of system are you decoding when the audio only comes out of the left speaker? Also, what is -T3
supposed to do?
I am decoding DMR (Tier II) on 70cm ham band repeater. If I am not mistaken, -T3
should allow decoding of both timeslots.
This all used to work fine with a month or two old dsd-fme build, but stopped working properly after I updated to latest commit (from audio_work
since the main
got removed).
For any TDMA system in audio_work, Slot 1 = Left Channel; Slot 2 = Right Channel; Previously in the old 'main' branch, there was two separate output streams created, and Slot 1 played from one of those, and Slot 2 played from the other one. Those could then in turn be panned around if desired to create a pseudo stereo config, or just blast both into both speakers. In audio_work, only one output stream is created and the audio is interleaved into stereo when configured for any system decoding that can have two voices playing simultaneously.
-T3
doesn't do anything in DSD-FME, that must have come from another piece of software. -T
will enable trunking features if paired with the correct configurations (SDR++/Rigctl or using the internal RTL dongle input).
If you wish for the older way of handling audio, the 'main' branch was simply renamed to 'v2.1b-final' and you can run checkout and build that branch instead if you prefer the old audio handling. While it will no longer receive any updates, for tier 2 DMR, I don't think you will be missing out on anything important.
switching to v.2-1b-final can be accomplished by the following:
Open the DSD-FME folder and right click 'open terminal here' or otherwise cd into that folder with a terminal.
git checkout v2.1b-final
cd build
sudo rm -rf *
cmake ..
make
sudo make install
-T3 doesn't do anything in DSD-FME, that must have come from another piece of software. -T will enable trunking features if paired with the correct configurations (SDR++/Rigctl or using the internal RTL dongle input).
Thanks for the info, I was originally using an older version of dsd from different author that had this switch.
For any TDMA system in audio_work, Slot 1 = Left Channel; Slot 2 = Right Channel
That is not correct, at least for DMR. As far as I know, timeslots as they are used have nothing to do with audio channels.
Here is more information from this website:
The DMR walkie-talkie protocol uses a dual-slot TDMA time division multiple access technology. Many people share a resource and use the time-sharing method for processing. The time slots of the two TDMA physical channels are identified as channels "1" and "2". In other words, each frequency has a time slot 1 and a time slot 2, and the 1 time slot is equivalent to a channel. It allows several users to use a channel together, and each user uses their own time slot for rapid and continuous transmission, that is said the time slot 1 and time slot 2 can work at the same time to achieve duplex communication, or two-time slots to send data information at the same time; also Only one of the time slots can work, and the other time slot is free or used as a reverse channel. This allows multiple radios to use the same channel while using only part of the channel capacity.
Maybe you didn't quite understand what I said there. I, personally, wrote the code so that any audio from TDMA Slot 1 will play out of the left channel, and that any audio from Slot 2 will play out of the right speaker. In the older code, I, me, I wrote the code to open two audio streams and those usually blasted the audio out of both left and right simultaneously unless manually panned.
The reason I wrote it to do it that way, as opposed to only playing back one slot or the other, or to have them overlap, is because having voice on both slots is a real thing, unless you think I'm making that up or something.
Here is a sample .bin file. You can play it back and verify this for yourself. It is not uncommon on busy repeaters for both slots to be occupied by two conversations at the same time. Having stereo separation makes it easier to understand.
Just extract the bin file from the zip file and run it like this:
dsd-fme -fs -i dmr_dual_voices.bin
I understood what you said, I just don't think that this implementation is the best idea. While it may allow better reception in case both timeslots are active at the same time, it makes listening quite unpleasant for anything else.
Is there any way to override this and play the decoded audio of particular timeslot in both channels? Thanks!
Okay, so, what I've done is made a preliminary patch for testing, it is in the patch folder, you'll need to perform a git pull
first to update to the latest audio_work branch, if you are still on audio_work. Then you will want to open the dsd-fme folder and open a terminal in there by right clicking and choosing 'open a terminal here' or similar, or otherwise CDing into the dsd-fme folder and running the following commands to patch and build with the patches.
git apply patch/wolf_tdma_mono_stereo.patch
cd build
rm -rf *
cmake ..
make
sudo make install
What the patch does is by default, without any user settings or ncurses key shortcuts, is to play audio out of both speakers if there is one voice. If there are two voices, it will seperate both voices into left and right channels until one of them ends, and then it resumes the single voice in both speakers.
There are currently two options for TDMA.
-V <num> Enable TDMA Voice Synthesis on Slot 1 (1), Slot 2 (2), or Both (3); Default is 3;
-z <num> Set TDMA Voice Slot Preference
The first is a hard slot on or off, enabling slot1, slot2, or both, which is probably like the -T3
option you used to use. The second option is a slot preference, which is IF voice were to occur in both slots, to preempt the non-preferred slot. If only one slot is enabled with -V 1
, for example, then only slot 1 will play audio and it will always be in both speakers. If -z 1
is used, then both slots will play audio, but when dual voices occur, slot 1 will have preference and be the only one playing from both speakers.
Likewise, if you use the ncurses terminal, keyboard shortcuts 1 and 2 will turn on and off slot 1 and slot 2. keyboard shortcut 3 will cycle the slot preference from 1, to 2, or neither. These keys will cover all potential options.
All that being said, if you apply this patch, you probably won't need to fool with slots on/off or preferences unless you have a very particular setup where the TG/audio you want to hear always comes from Slot 1 for example. If the system isn't every so busy to have dual voices, you probably don't need to really do anything aside from use the patch and you'll have voice in both speakers again.
EDIT: Corrected patch name to the correct name after a snafu on patch updates and cleaning. I really hate git/patch behavior sometimes. It just tries to rename files and merge changes sometimes instead of hard deleting and hard adding new files.
It seems to work fine with the patch applied, thanks a lot! :-)
I was also able to simplify the dsd-fme switches that I use and it now looks like this:
nc -l -u 7355 | dsd-fme -i -
I'll probably work on shaping the code some more for DMR and P25p2 when I have more free time and energy to put towards it, and work on tweaks and making it work better with tg holds and blacklist/whitelists/mutes as well and perhaps eventually it will make it into the source code permanently but if this is working for you well enough for now, I'll go ahead and close this issue for now.
Just FYI, I did some patch cleaning and did an update on your patch, and Git had a snafu on the patch where it tried to merge stuff into it that wasn't supposed to be in there due to similar names and content, or whatever, so I had to delete the patch and create a new version of it. Git Behavior can be a real pain sometimes in regards to updating some files with similar content and deleting and adding new versions of it. I changed the name in the above instructions to reflect the new patch name.
It looks like that with latest code (from audio_work), the audio is now always output to the left speaker instead of both.
This is how I use dsd-fme:
nc -l -u 7355 | dsd-fme -T3 -i - -o pulse