Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Disagreement with rockbox devs (Read 4209 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Disagreement with rockbox devs

I have given feedback to the Rockbox bug tracker and I seem to have found myself in disagreement with devs about mic input gain setting implementation. The mic input gain setting appears internally fixed and functions more like simple wave scaling, which means for loud and dynamic sources the dynamic range will be compromised. When I point this out they insist it's implemented as intended. Either they don't understand the function of mic input gain or it is simply not supported by hardware and thus they're implementing as well as they can with a dumb gain setting added as a bonus. But I'm really stumped as to why we seem to disagree.

http://www.rockbox.org/tracker/task/11631

Any insight appreciated.

Disagreement with rockbox devs

Reply #1
To be honest I still have no idea what you think adjusting the volume should be doing other then scaling the volume up and down.  Maybe you could explain what other expectations you have for that function?

Disagreement with rockbox devs

Reply #2
To be honest I still have no idea what you think adjusting the volume should be doing other then scaling the volume up and down.  Maybe you could explain what other expectations you have for that function?


Controlling the actual amplifier gain on the circuitry before the ADC. Most PC audio chips support this.

Disagreement with rockbox devs

Reply #3
Controlling the actual amplifier gain on the circuitry before the ADC. Most PC audio chips support this.


But I believe this was already clearly addressed in the linked thread on the tracker and therefore presumably not what markanini is asking about??

Quote
Comment by Michael Sevakis (MikeS) - Friday, 09 December 2011, 00:57 GMT+1
I have NO idea what you mean. Amplification is the same as waveform scaling. The recording gain (amplification/scaling) is handled by the hardware before the ADC, not the software in rockbox. Amplifying the waveforms shows that the expected difference of +/- 12dB between them exists. Various power measurements (min, max, average RMS) are nearly identical as well.


(emphasis mine)
Creature of habit.

Disagreement with rockbox devs

Reply #4
I presume he wants the software to expose this gain, which *is* usually changeable in the driver. (In Windows for example, it's hidden away deep in the sound settings, and also not generally exposed by user-facing software. Though some do allow you to toggle microphone gain.).

Disagreement with rockbox devs

Reply #5
I presume he wants the software to expose this gain, which *is* usually changeable in the driver.


This is what we do.  I'm curious what else is expected?

Disagreement with rockbox devs

Reply #6
I presume he wants the software to expose this gain, which *is* usually changeable in the driver.


This is what we do.  I'm curious what else is expected?

A gain setting on a mic input is expected to work on the signal before ADC, else it's a missnormer.

I almost can't believe the hardware has no such functionality, what happens if a circuit revision requires the maker to adjust the gain before ADC?

Disagreement with rockbox devs

Reply #7
What I got from the linked thread:

There is a AGC, permanently active, working as some sort of compressor / limiter. (can be seen here). This leads to recordings with low dynamics. The recording is imho still 'pumping', listen here. I'd expect that, if I lowered the input gain, that at some point the AGC does no longer limit the signal level. Until this point, recordings should remain around 0dBfs. Only from that point on, lowering input gain should result in an overall lower level in the recorded file.

Markanini argues now, that the level of the recorded file is lower, although there hasn't been a reduction in AGC activity and an increase in dynamics. This brings him to drawing the conclusion, that there is scaling of the already digitized file instead of actually lowering the input gain.

I think he could be right, but others have more insight in that particular chip than me (I don't even have a datasheet), thus I leave judging to them.

edit: A simple way to check: record said noise ramp with two different gain settings. If limiting occurs after a specific time rather than at a specific level, gain setting is obsolete.

Disagreement with rockbox devs

Reply #8
I presume he wants the software to expose this gain, which *is* usually changeable in the driver.


This is what we do.  I'm curious what else is expected?

A gain setting on a mic input is expected to work on the signal before ADC, else it's a missnormer.


As was explained in the link you posted:

Quote from: markanini link=msg=0 date=
I mean, using the gain label in this context implies a pre-amp adjustment, which is different from waveform scaling. Of course if the preamp gain is fixed in hardware it's a different story, the gain setting might as well be removed and hard coded at 0dB.


Quote from: MikeS link=msg=0 date=
I have NO idea what you mean. Amplification is the same as waveform scaling. The recording gain (amplification/scaling) is handled by the hardware before the ADC, not the software in rockbox.


So for the third or forth time, when you change the gain setting, you are adjusting the gain to the preamp just as MikeS has told you.  If you still don't believe us, please check the code.  You can see that MIC amp gain is adjusted everytime you change that setting.

Disagreement with rockbox devs

Reply #9
Didn't mean to make you upset, Saratoga. I reported cause I though something was wrong, really not trying to teach grandpa how to suck eggs. Atleast MikeS was willing to offer some insight on what's going on under the hood. '

Disagreement with rockbox devs

Reply #10
Didn't mean to make you upset, Saratoga. I reported cause I though something was wrong, really not trying to teach grandpa how to suck eggs.


I am not upset, I am just trying to figure out if you were actually reporting a problem.  It seems like the answer is no, everything is working as you expect it to.

Atleast MikeS was willing to offer some insight on what's going on under the hood.


Which was nice of him given that you wasted quite a lot of his time making him look through samples for no reason.  In the future, please try to be more considerate to people who are helping you.  If you don't understand why something is, you can look at the code, the data sheets, or even just ask.  However, you should not insist that other people try to prove to you that you are not reporting a problem.  That is extremely inconsiderate and unhelpful.  This is a volunteer project and people only have so much free time to work on it.

Disagreement with rockbox devs

Reply #11
I stated my expected behaviour clearly from the start, but no explaination was offered as to why behaviour was differnt from said expectations. You could have explained that the hardware has the pre-gain followed by AGC followed by the ADC input gain with max input voltage equivalent to unity gain. Instead you offered ambigous statements which made me wonder whether I had communicated my concern clearly enough:
Quote
I don't think I see any clipping in that waveform, so I don't think you should expect the gain control to make any difference in the dynamics.

I'm sure we both know that with an "AGC" function used clipping won't be a clear indicator of lost higher level signal. The audible pumping was a sure sign of it to me.

Don't act surprised when a user sees a gain setting and expects it work the same way gain settings have worked for a hundred years, including on his H120.

Anyway sorry about the fuss.

Disagreement with rockbox devs

Reply #12
I stated my expected behaviour clearly from the start, but no explaination was offered as to why behaviour was differnt from said expectations. You could have explained that the hardware has the pre-gain followed by AGC followed by the ADC input gain with max input voltage equivalent to unity gain. Instead you offered ambigous statements


Do you see my quoting from the FS thread above? (jh(MikeS))  That was a very early response to you in the FS task.
Creature of habit.

Disagreement with rockbox devs

Reply #13
I think the problem here is that markanini made up his mind that he knew better then everyone else what the problem was and just ignored posts explaining to him what was going on.  Hence him pretending not to have seen Soap and other's posts.

Which is fine, if he doesn't want to help, he doesn't have to.  But maybe this thread should be closed?  I don't see what it has to do with HA.

 

Disagreement with rockbox devs

Reply #14
Thanks for the personal attack, class act...