Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleUSB: show RX level #411

Merged
merged 2 commits into from
Oct 30, 2024
Merged

SimpleUSB: show RX level #411

merged 2 commits into from
Oct 30, 2024

Conversation

Allan-N
Copy link
Collaborator

@Allan-N Allan-N commented Sep 27, 2024

The simpleusb-tune-menu shows the current TX levels but only reports the current RX level when adjustments are being made. The information is available and should be reported.

@Allan-N
Copy link
Collaborator Author

Allan-N commented Sep 27, 2024

Note: minimal changes were needed for SimpleUSB as only one variable was involved. I think I can do the same for USBRadio but multiple settings (and calculations) are in play.

Please advise if you think we parity between the two is essential.

@InterLinked1
Copy link
Member

Note: minimal changes were needed for SimpleUSB as only one variable was involved. I think I can do the same for USBRadio but multiple settings (and calculations) are in play.

Please advise if you think we parity between the two is essential.

Not knowing the context, I think parity is a good thing in general, but I'll defer to @KB4MDD

utils/simpleusb-tune-menu.c Outdated Show resolved Hide resolved
@KB4MDD
Copy link
Collaborator

KB4MDD commented Oct 2, 2024

There are a number of adjustments in chan_usbradio. If you want to make the set Rx Voice Level the same as chan_simpleusb, that would be good. That would have those options the same and we could evaluate the need to add the current setting to the other commands. The P option can be used to see the current settings of the other items.

@Allan-N
Copy link
Collaborator Author

Allan-N commented Oct 4, 2024

I have updated the code so that both SimpleUSB and USBRadio will now display the current settings.

@Allan-N Allan-N requested review from KB4MDD and InterLinked1 October 4, 2024 00:38
@davidgsd
Copy link
Contributor

davidgsd commented Oct 5, 2024

I had noticed this inconsistency before, nice to see this now being added. Question though, is the rxvoiceadj parameter actually used in any audio processing? If so, where? I know the parameter exists and can be read/written to the conf file, but after what seemed a thorough search of the various C files it appears the variable is not used in any calculations. If that is correct, then it would not be very useful to show that cfg instead of rxmixerset in the rxdemod == RX_AUDIO_FLAT case. (From what I can tell, use of the rxvoiceadj parameter in USBRadio has no effect on any audio functionality and should be removed, and in SimpleUSB it has no significant effect other than causing clipping and should be removed from there also.)

@Allan-N
Copy link
Collaborator Author

Allan-N commented Oct 5, 2024

Question though, is the rxvoiceadj parameter actually used in any audio processing? If so, where?

I see many references to o->rxvoiceadj in channels/chan_usbradio.c

@davidgsd
Copy link
Contributor

davidgsd commented Oct 5, 2024

I see many references to o->rxvoiceadj in channels/chan_usbradio.c

Hi Allen, as I mentioned above, "I know the parameter exists and can be read/written to the conf file, but after what seemed a thorough search of the various C files it appears the variable is not used in any calculations".

My question is not if there are references to rxvoiceadj in the code. It is whether rxvoiceadj is actually used for anything that will have any effect whatsoever on audio levels or related USBRadio functionality.

For example, if I add a parameter named xyz_adj to the config files, allow it to be read and written from the .conf files, and displayed and set in a utility menu, but that configuration parameter is not actually used in any way during processing of any audio, then what is the purpose of that parameter? Well of course it would have no purpose or reason to exist in the code if it doesn't actually have some real effect on some audio processing function or logic.

From my review of the code, rxvoiceadj is not used in any way that would affect any audio or other processing done in USBRadio. If you disagree, could you please point out where this variable is used in such a way? Again, note that reading the parameter to/from a conf file, or EEPROM, or displaying it or editing it in a menu, does not mean that it actually affects actual channel driver audio/DSP processing functionality.

Presumably rxvoiceadj was indeed used in some actual audio processing functionality at some point in the distant past, but it appears that whatever that functionality was, it has since been removed, but the rest of the code relating to the parameter was not. Thus it appears the parameter now does nothing but take up space. Therefore, rather than continue to copy and paste this parameter into other code, I would suggest we take a closer look at what it is actually doing, if anything. I'm pretty sure you will find that it is indeed not used for any real purpose, ie. it is a 'vestigial' parameter and any references to it in new or old code that imply it affects "Rx Voice Level" are incorrect.

Maybe I'm wrong and my greps of the C files somehow missed it being assigned to some other variable or function that actually does use it in a way that affects Rx voice level, so in that case I apologize for asking you to show me where in the code this variable actually does something like that. However I'd bet $20 that this parameter does not in fact in any way affect rx voice levels, or anything else.

I happened to have been looking at this parameter as part of my investigations into bug report #399, and noted there the following a couple days ago: "USBRadio does not appear to use the rxvoiceadj parameter to do any audio scaling. It references the parameter in a number of places, reading it and saving it to/from the conf files and optionally a CM1xx attached EEPROM, and printing the value in different places, but from what I can tell the value is never used in any kind of calculation or processing of audio. xpmr.c has a copy of rxvoiceadj (pChan->prxVoiceAdjust) but this also is never actually used. Thus it seems pretty clear to me that all code in chan_usbradio.c and xmpr.c referencing these variables is dead code, that just makes it harder for everyone to understand what the various channel driver settings and variables actually do, and that really should be deleted."

@Allan-N
Copy link
Collaborator Author

Allan-N commented Oct 5, 2024

Hi Allen, as I mentioned above, "I know the parameter exists and can be read/written to the conf file, but after what seemed a thorough search of the various C files it appears the variable is not used in any calculations".

My question is not if there are references to rxvoiceadj in the code. It is whether rxvoiceadj is actually used for anything that will have any effect whatsoever on audio levels or related USBRadio functionality.

Yes, looking more carefully and I agree. It looks as if the variable (and related usage) is only read or written but never actually used. Same for channels/xpmr/xpmr.c and channels/chan_voter.c. But, it does look like the variable is used in chan_simpleusb.c.

But, having made the observation here, I don't think this is the place to drive its removal. Let's file another issue :-)

@Allan-N
Copy link
Collaborator Author

Allan-N commented Oct 5, 2024

Filed #417

@Allan-N
Copy link
Collaborator Author

Allan-N commented Oct 6, 2024

@davidgsd

You had added some comments to #399 that have me thinking. Specifically, that the CM108's variants allow setting the dBV values but not with the granularity of 0-999 levels that we have been presenting in the UI. To me, that means if I had been using a value of 500 but found the level to be just a bit low then I might raise it to 525 ... not knowing why raising the value by 10 can't be detected but raising the value by 15 could be heard/measured.

Q? do you know if there's a place in the SimpleUSB / USBRadio channel drivers that knows what divisor is being used? I'm thinking about how we might display both the 0-999 value, the dBV value, and the interval between each step.

With my latest, work-in-progress, changes I have the simpleusb-tune-menu showing :

  2) Set Rx Voice Level using display (currently '500')

Would this be better ?

  2) Set Rx Voice Level using display (currently '500', -12.0 dBV)

But, how would one convey that you need to increment/decrement the level by 26.32 before it will make a difference? Would this be too confusing?

  2) Set Rx Voice Level using display (currently '500', -12.0 dBV, 486...512)

and, yes, we would be computing the low...high range for the current bucket

Thoughts?

@davidgsd
Copy link
Contributor

davidgsd commented Oct 7, 2024

Hi Allan, I think there are 2 steps that would be great to do, the first is to show the actual mixer settings read and written to the CM1xx, and then a 2nd more involved step would then be to fully characterize the A/AH vs. B CM1xx ICs and then also show what those mixer settings correspond to in actual voltages. The dBV values I mentioned before are what should be the case according to their datasheets (see https://allscan.info/images/CM1xx-specs-2000x2752.png), however there are some discrepancies in some parts of the datasheets as well as in actual observed behavior. I may have some time this week to run a script that loops through all the gain settings on both a CM108 AH and B while I apply test signals of known amplitudes to the Micin line, and confirm what signal levels actually result into ASL.

To show the actual CM1xx mixer settings (eg. set in chan_simpleusb.c :: mixer_write()) I added the following to chan_simpleusb.c::susb_tune() after the first call to mixer_write(o);

			/*	mixer_write() writes the following to the CM1xx:
					o->micplaymax, o->spkrmax, o->micmax
					mic_setting =  o->rxmixerset * o->micmax / 1000;
			*/
			ast_cli(fd, "micplaymax %d, spkrmax %d, micmax %d, micsetting %d stepsize %0.3f\n",
				o->micplaymax, o->spkrmax, o->micmax, (o->rxmixerset * o->micmax / 1000), 
				(1000.0 / (float) o->micmax));

With that in place when you then run the susbtune utility and change the rxmixerset value you'll see exactly what the setting gets translated to into the CM1xx. I'll do a bit more testing today on this and expand on this comment in a few hours but for now this should maybe help show the parameters of interest.

@davidgsd
Copy link
Contributor

davidgsd commented Oct 7, 2024

I finished characterizing the CM108B. I calibrated a signal generator such that 0dB = the IC's max rated input which is 2.88Vpp. Then took the following measurements:

Vin=2.88Vpp = 2.04Vrms (max input spec) = 6.2dBVrms
rxmixset step siggendB	Max	Avg
0	0	0	-10.8  	-14
30	1	0	-9.8	-13
60	2	0	-8.8	-12
...
180	6	0	-4.8	-8
...
300	10	0	-0.8	-4
330	11	0	0.0	-3
...
380	13	-3	-0.4	-3
...
470	16	-6	-0.4	-3
500	17	-10	-3.4	-6
600	21	-12	-1.3	-4
700	24	-20	-6.3	-9
800	28	-30	-12.1   -15  (65.87mV)
900	31	-30	-9.1	-12
999	34	-30	-6.1	-9

Conclusions:
CM108B has 35 gain steps
At lowest gain (step 0), 0dB sig in results in measured signal of -10.8 dBFS => -10.8 dB attenuation
At highest gain (step 34), -30dB sig in results in measured signal of -6.1 dBFS => 23.9 dB gain
=> Gain referenced to stated max input (6.2dBVrms) is -11 to 24 dB = 35dB range => 1dB / step
=> Supported input range for 0dBFS is -18 to ~6* dBVrms
*At low gain settings, input clipping occurs prior to the CM1xx mixer. Therefore it appears that gain settings of below 300 have no practical use, as ASL uses the rxmixer as a gain trim - not a volume control.

Will repeat this on the CM108AH tomorrow. Example of commands used:

3040-asl3*CLI> susb tune rx 500
Changed setting on RX Channel to 500
micplaymax 31, spkrmax 37, micmax 35, micsetting 17 stepsize 28.571
3040-asl3*CLI> susb tune menu-support Y
RxAudioStats: Pk  -3.4  Avg Pwr  -6  Min  -6  Max  -6  dBFS  ClipCnt 0
3040-asl3*CLI> susb tune rx 600
Changed setting on RX Channel to 600
micplaymax 31, spkrmax 37, micmax 35, micsetting 21 stepsize 28.571
3040-asl3*CLI> susb tune menu-support Y
RxAudioStats: Pk  -1.3  Avg Pwr  -4  Min  -4  Max  -4  dBFS  ClipCnt 0

The rx audio stats function comes in very handy for this kind of testing. It's also nice for showing distortion of a sine wave test signal, which should have exactly a 3dB difference in peak - Avg pwr.

@davidgsd
Copy link
Contributor

davidgsd commented Oct 7, 2024

It seems that the reason C-Media went from 16 1.5dB ADC gain steps in A/AH to 36 1dB steps in the B's was to make it work more like a volume control rather than just a gain trim for boosting low level signals. (That also makes it more consistent with the DAC mixer range and steps.) For apps like ASL that don't have a 'volume' knob on the ADC side, the extra ~12dB of attenuation available in the B's does not translate to usable attenuation, though the input does seem to have some compression going on - with rxmixerset=0 I had to put 11.5Vrms into it (16.25Vpk), to get a max. reading of -7.2dBFS which is quite a lot of voltage to put into something that runs on a 5V supply. Each 1dB increase in rxmixerset then only yielded a ~0.6dB increase in the measured input peak value. Even with 16Vpk going in I had to set rxmixerset to 300 before I finally got a peak reading of 0dBFS. So there are some interesting nonlinearities happening with input levels > 6dBV. I'm going to try adding a more precise distortion measurement output for use with sine wave inputs which should clarify if there may be a valid use for the CM1xxB lower input gain settings.

@davidgsd
Copy link
Contributor

davidgsd commented Oct 7, 2024

Looks like rxmixerset of 325 is the lowest setting that can be used where the full ADC dynamic range is available and no distortion occurs in the CM1xxB mixer. In the following test output I added a Crest Factor stat to the RxAudioStats output, and then for each gain setting I increase the sig gen input level until (pre-ADC) distortion or ADC clipping occurs. CF should be 3dB for a sine wave, and anytime goes below ~2.8dB but ClipCnt is 0 that indicates clipping/distortion in the CM1xxB mixer rather than in the ADC. I'll take a look at the IAX waveforms tomorrow also.

3040-asl3*CLI> susb tune rx 300
Changed setting on RX Channel to 300
micplaymax 31, spkrmax 37, micmax 35, micsetting 10 stepsize 28.571
3040-asl3*CLI> susb tune menu-support y
RxAudioStats: Pk  -2.0  Avg Pwr  -5.1  Min  -5  Max  -5  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -1.9  Avg Pwr  -5.0  Min  -5  Max  -5  dBFS  CF  3.16 dB  ClipCnt 0
RxAudioStats: Pk  -1.3  Avg Pwr  -4.4  Min  -5  Max  -4  dBFS  CF  3.12 dB  ClipCnt 0
RxAudioStats: Pk  -1.1  Avg Pwr  -4.2  Min  -4  Max  -4  dBFS  CF  3.10 dB  ClipCnt 0
RxAudioStats: Pk  -0.8  Avg Pwr  -3.6  Min  -4  Max  -4  dBFS  CF  2.83 dB  ClipCnt 0
RxAudioStats: Pk  -0.8  Avg Pwr  -3.5  Min  -4  Max  -3  dBFS  CF  2.72 dB  ClipCnt 0
RxAudioStats: Pk  -0.8  Avg Pwr  -3.3  Min  -3  Max  -3  dBFS  CF  2.52 dB  ClipCnt 0
RxAudioStats: Pk  -0.7  Avg Pwr  -3.0  Min  -3  Max  -3  dBFS  CF  2.36 dB  ClipCnt 0
RxAudioStats: Pk  -0.5  Avg Pwr  -2.9  Min  -3  Max  -3  dBFS  CF  2.44 dB  ClipCnt 0
RxAudioStats: Pk  -0.5  Avg Pwr  -2.5  Min  -3  Max  -2  dBFS  CF  2.06 dB  ClipCnt 0
RxAudioStats: Pk  -0.4  Avg Pwr  -2.4  Min  -3  Max  -2  dBFS  CF  1.97 dB  ClipCnt 0
RxAudioStats: Pk  -0.4  Avg Pwr  -2.2  Min  -2  Max  -2  dBFS  CF  1.85 dB  ClipCnt 0
RxAudioStats: Pk  -0.3  Avg Pwr  -2.1  Min  -2  Max  -2  dBFS  CF  1.82 dB  ClipCnt 0
RxAudioStats: Pk  -0.3  Avg Pwr  -1.9  Min  -2  Max  -2  dBFS  CF  1.61 dB  ClipCnt 0
RxAudioStats: Pk  -0.3  Avg Pwr  -1.7  Min  -2  Max  -2  dBFS  CF  1.47 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -1.5  Min  -2  Max  -1  dBFS  CF  1.39 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -1.3  Min  -1  Max  -1  dBFS  CF  1.19 dB  ClipCnt 0
3040-asl3*CLI>
3040-asl3*CLI> susb tune rx 350
Changed setting on RX Channel to 350
micplaymax 31, spkrmax 37, micmax 35, micsetting 12 stepsize 28.571
3040-asl3*CLI> susb tune menu-support y
RxAudioStats: Pk  -2.2  Avg Pwr  -5.2  Min  -5  Max  -5  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -3.7  Min  -5  Max  -3  dBFS  CF  3.67 dB  ClipCnt 0
RxAudioStats: Pk   0.0  Avg Pwr  -2.5  Min  -3  Max  -2  dBFS  CF  2.48 dB  ClipCnt 263
RxAudioStats: Pk   0.0  Avg Pwr  -2.5  Min  -3  Max  -2  dBFS  CF  2.52 dB  ClipCnt 198
RxAudioStats: Pk  -0.0  Avg Pwr  -2.8  Min  -3  Max  -3  dBFS  CF  2.82 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -2.8  Min  -3  Max  -3  dBFS  CF  2.83 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -2.8  Min  -3  Max  -3  dBFS  CF  2.83 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -2.8  Min  -3  Max  -3  dBFS  CF  2.83 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -3.0  Min  -3  Max  -3  dBFS  CF  3.02 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  3.05 dB  ClipCnt 0
RxAudioStats: Pk  -0.0  Avg Pwr  -3.3  Min  -3  Max  -3  dBFS  CF  3.26 dB  ClipCnt 0
RxAudioStats: Pk  -0.2  Avg Pwr  -3.4  Min  -4  Max  -3  dBFS  CF  3.20 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.6  Avg Pwr  -3.7  Min  -4  Max  -4  dBFS  CF  3.07 dB  ClipCnt 0
3040-asl3*CLI>
3040-asl3*CLI> susb tune rx 325
Changed setting on RX Channel to 325
micplaymax 31, spkrmax 37, micmax 35, micsetting 11 stepsize 28.571
3040-asl3*CLI> susb tune menu-support y
RxAudioStats: Pk  -1.6  Avg Pwr  -4.7  Min  -5  Max  -5  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -1.6  Avg Pwr  -4.7  Min  -5  Max  -5  dBFS  CF  3.07 dB  ClipCnt 0
RxAudioStats: Pk  -0.7  Avg Pwr  -4.6  Min  -5  Max  -4  dBFS  CF  3.85 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.98 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0
RxAudioStats: Pk  -0.1  Avg Pwr  -3.1  Min  -3  Max  -3  dBFS  CF  2.94 dB  ClipCnt 0


@Allan-N
Copy link
Collaborator Author

Allan-N commented Oct 8, 2024

With the information you provided (and the suggested extra logging/reporting to the channel driver) it looks like it will be easy to know how the 0-999 levels are divided up. That means I can easily report :

  2) Set Rx Voice Level using display (currently '500', 8/16, 486...512)

What are your thoughts on "8/16" ? on "486...512"? Does either/both help? or do they make the level reporting too confusing?

Reporting dBV may be out-of-reach, at least for this change ... but might be good to include in some documentation.

@davidgsd
Copy link
Contributor

davidgsd commented Oct 8, 2024

Hi Allan, I just finished characterizing the CM108AH ADC. Results:
Vin=2.88Vpp = 2.04Vrms (max input spec) = 6.2dBVrms = "0dB" setting on signal generator (1KHz sine wave input)

rxmixset step siggendB	Max	Avg
0	0	-6	-0.8  	-3.8
70	1	-7	-0.2	-3.2
250	4	-12	-0.5	-3.6
500	8	-18	-0.3	-3.4
750	12	-24	-0.1	-3.3
999	15	-30	-1.2	-4.8

Conclusions:
CM108AH has 15 rxmixer gain steps
At lowest gain (step 0), -6dB sig in results in measured signal of -0.8 dBFS => 5.2 dB gain
At highest gain (step 15), -30dB sig in results in measured signal of -1.2 dBFS => 28.8 dB gain
=> Gain referenced to stated max input (6.2dBVrms) is 5 to 29 dB = 24dB range => 1.5dB / step
=> Supported input range for 0dBFS is -23 to 1 dBVrms

Example commands used during tests:

3040-asl3*CLI> susb tune rx 500
Changed setting on RX Channel to 500
micplaymax 127, spkrmax 151, micmax 16, micsetting 8 stepsize 62.500
3040-asl3*CLI> susb tune menu-support Y
RxAudioStats: Pk  -0.3  Avg Pwr  -3.4  Min  -3  Max  -3  dBFS  CF  3.13 dB  ClipCnt 0
3040-asl3*CLI> susb tune rx 750
Changed setting on RX Channel to 750
micplaymax 127, spkrmax 151, micmax 16, micsetting 12 stepsize 62.500
3040-asl3*CLI> susb tune menu-support Y
RxAudioStats: Pk  -0.1  Avg Pwr  -3.3  Min  -3  Max  -3  dBFS  CF  3.19 dB  ClipCnt 0

Summarizing the key points of all above testing,

  • The CM108AH has an input range of -23 to 1 dBVrms,
    corresponding to rxmixerset values of 999 to 0,
    corresponding to micsetting values of 15 to 0 (1.5dB steps)
  • The CM108B has a usable input range (supporting full ADC dynamic range) of -18 to 6 dBVrms,
    corresponding to rxmixerset values of 999 to 325,
    corresponding to micsetting values of 34 to 11 (1dB steps)
  • According to the datasheets, ADC input and rx mixer specs are identical for CM108AH and CM119A, and identical for CM108B and CM119B.

I also plan to characterize the DAC side of the 3 main variants (CM108 A/AH, CM119A) as there is significant variation there in stated output range, and supposedly the same number of gain steps per the datasheets (0 - -45 dB), yet from above debug prints we see that AH has micplaymax 127 & spkrmax 151 vs. micplaymax 31 & spkrmax 37. The A/AH datasheets say nothing about having 151 txmix steps so I'll take a look at that. The DAC side is more straightforward.

Options for what could be shown to users:

  • Existing 0-999 numbers. Of course these should continue to be shown and allow simple enough iterative adjustments.
  • CM1xx IC setting steps. Would be good to show somewhere as it shows exactly what the hardware is configured for. Though it's not a number that is otherwise useful or intuitive so it probably doesn't deserve too much attention.
  • dB or dBV values. This is much more useful as it's a real number and makes adjustments faster because dB are standard calibrated units. eg. if you see from the level meter or rx stats that your current level is -12 dB and you want to be at -3 dB, you just add 9 to the rxmix setting and you're done. No need to guess what 0-999 number might correspond to 9dB louder.

dBV units have all the advantages of dB but in addition correspond to actual voltages that can be easily measured with a DMM and cross-referenced to various radio or audio equipment datasheets. The CM1xx datasheets are unclear about this and have some contradictions. I'll plan to add these basic details to the ASL manual. dBV is the standard in pro audio equipment, most people won't know what exact voltage a certain dBV value corresponds to, but they wouldn't know that for an arbitrary 0-999 number either, and it's easy to look up a dBV value and see what it means, and dB units in general are more intuitive. Most hams are used to dB units such as with S-meters, and a good number of people have general familiarity with decibels and know for example that a -10dB difference makes something sound half as loud. dBV are simple to show, eg.
2) Set Rx Voice Level using display (currently '500' (-11dBV))
The dBV value would probably be ignored by most people but the ~20% of hams with electronics, engineering or audio backgrounds will find that extra bit of information very useful. I should be able to add a page with this data to the ASL Manual soon, and at that point the ASL code could just refer people to that link rather than show the various conversions, though those do involve only a few simple equations so it would be easy to support in the code. Might take some experimentation to have the UI be simple and useful for both "amateurs" and audio/engineering pros. Or there could be a single menu setting that enables dBV or other units (%, 0-999, V, mV, dBu) and the other various menus would then follow that which might reduce clutter a bit. Anyhow just some ideas off the top of my head.

@davidgsd
Copy link
Contributor

davidgsd commented Oct 8, 2024

BTW I mentioned I would look at the IAX waveform with a large signal going into the CM108B when it has a very low gain setting. This is a 16Vpk 1KHz sine wave going in, but the rxmix gain setting is so low that no ADC clipping actually occurs. Definitely not a useful compression characteristic going on here. There appears to be some 'interesting' circuitry in the CM1xxB rx mixer.
distortion
This would not be good to have going out over IAX and might be good to inform users to add some attenuation on their URI input if during gain adjustments high signal levels are seen with rxmix values of < 350 for CM1xxB or < 50 for A/AH.

The `simpleusb-tune-menu` shows the current TX levels but only reports the
current RX level when adjustments are being made.  The information is
available and should be reported.

Also, added parity between simpleusb and usbradio tune menus (the current
settings will also be displayed by the latter).
Copy link
Collaborator

@KB4MDD KB4MDD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

@Allan-N Allan-N merged commit d4b7fd0 into master Oct 30, 2024
1 check passed
@Allan-N Allan-N deleted the show-rx-level branch November 15, 2024 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants