bastibl/gr-rds

Stereo and Mono are swapped

Knorxi opened this issue · 5 comments

When I'm listening to a stereo station, the RDS Panel shows "Mono"

flagstring[3] = mono_stereo ? '1' : '0';

When I swap the '1' and '0' it works. But then the code doesn't look so good anymore ;-)
May be the variable should be renamed to stereo_mono ...

NRSC-4-A, which seems to be the only publicly available RDS standard, states:

Bit d0, set to 0: Mono
Bit d0, set to 1: Stereo

So it would appear that line you quoted is correct, but the following lines are incorrect:

<< '-' << (mono_stereo ? "MONO" : "STEREO")

gr-rds/python/rdspanel.py

Lines 151 to 156 in 7af7687

if (flags[3]=='1'):
self.stereo.setText("Mono")
self.stereo.setStyleSheet("font-weight: bold; color: red")
else:
self.stereo.setText("Stereo")
self.stereo.setStyleSheet("font-weight: bold; color: red")

Also of note: The abstract of IEC 62106-2:2018 states that:

Obsolete and no longer part of the RDS standard are: MS (Group 0A, 0B and 15B) certain DI codes (mono/stereo, artificial head, compression), Language code, and PIN (Group 1A).

So it seems that the field no longer exists in recent versions of the RDS standard.

I did a quick survey of my local stations. Most are broadcasting in stereo, but only one sets the "stereo" bit in RDS. Perhaps this is part of the reason why the field was removed in IEC 62106-2:2018.

Thanks for the response and the cool RDS code.
I can learn a lot from that.

I was going to say "I'm glad the standard has been withdrawn so that the stereo bit is preserved ;-)", but, I have also tested a few radio stations and in Germany some of them do not broadcast the stereo bit also.

Concerning the mono / stereo problem in parser_impl.cc:
You are right.
I have always a problem in variable names with the 2 states in the name.
In never know which state is "1".
E.g. there are the variables "music_speech" and "mono_stereo" in the code.
In the IEC for "Music" the bit is set and for "Speech" the bit is not set.
For "Stereo" another bit is set and the same bit is not set for "Mono".
So in the variable name "music _speech" is the state where the bit is set the first word.
But in "mono _stereo" is the state where the bit is set the second word.

My 1999 copy of IEC 62106 agrees :-) I'll go ahead and merge the PR. Thank you!

mono