[asterisk-bugs] [JIRA] (ASTERISK-22429) [patch] - chan_dahdi allows for updating both hw and sw gains, but dahdi show channel doesn't reflect changes

Jaco Kroon (JIRA) noreply at issues.asterisk.org
Fri Oct 11 07:09:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210881#comment-210881 ] 

Jaco Kroon commented on ASTERISK-22429:
---------------------------------------

Richard,

I'll have to abide by what you decide, but I reckon your patch is subset of my original.  I also think it should be possible to complete the feature without causing harm (if by default it just doesn't touch the setting and output HW Gain: unknown it's still an improvement over current).  If however the value is set in the config file then obviously we WANT to override the module default don't you think?

I don't think setting or NOT setting SWGAIN makes any difference in CPU, from what I can tell there's a linear matrix transform that's being applied to the incoming stream which (again, from what I can tell) defaults to the identity matrix that just results in no changes (but this is a hunch based on what little I've read of chan_dahdi).  If setting hwgain instead of swgain makes a quality difference (which I personally think it does) then I'd really prefer to set hwgain over swgain.  Keep in mind that I only ship Digium cards to my clients (had too many issues with other brands).  On a digital channel setting hwgain makes no sense as the signal is already companded (either ulaw or alaw, doesn't really matter), so even that would be a digital gain, not an analog gain setting (which based on my experience often results in a better digitized signal than without - you want to use the full digital range on input, not only the bottom half, eg, pushing +8dB on input already means we're more than doubling the signal strength which implies that we're getting at most 127 steps from the hardware on input, whereas if the same is applied at the pre-ADC point we get a full 256-step digitization - and that HAS to count for something).
                
> [patch] - chan_dahdi allows for updating both hw and sw gains, but dahdi show channel doesn't reflect changes
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-22429
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22429
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_dahdi
>    Affects Versions: 11.5.0
>            Reporter: Jaco Kroon
>            Assignee: Richard Mudgett
>            Severity: Minor
>         Attachments: asterisk-11.5.0-dahdi_gain_display.diff, jira_asterisk_22429_v11.patch, jira_asterisk_22429_v1.8.patch
>
>
> I think some output explains it best:
> # asterisk -Rx "dahdi show channel 3" | grep Gains
> Gains (RX/TX): 8.00/6.00
> # asterisk -rx "dahdi set swgain rx 3 4.0"
> software rx gain set to 4.0 on channel 3
> # asterisk -Rx "dahdi show channel 3" | grep Gains
> Gains (RX/TX): 8.00/6.00
> So in spite of the gain having being modified the change is not reflected.  There is also no indication whether the displayed gains is the hw or sw gains.
> I've written a small patch to rectify the situation and improve it somewhat:
> # asterisk -Rx "dahdi show channel 3" | grep Gains
> SW Gains (RX/TX): 8.00/6.00
> HW Gains (RX/TX): 0.00/0.00
> # asterisk -rx "dahdi set swgain rx 3 4.0"
> software rx gain set to 4.0 on channel 3
> # asterisk -Rx "dahdi show channel 3" | grep Gains
> SW Gains (RX/TX): 4.00/6.00
> HW Gains (RX/TX): 0.00/0.00
> There is a secondary (and actually more significant) problem here:
> The hw gains are not initialized during startup/reload at all (at least, not as far as I can tell).  And if they're already set during reload/restart the only way that I can see to get them back to some pre-configured value is to explicitly reset them using "dahdi set hwgain".  This patch assumes that they are zeroed during startup/reload (which can be false).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list