~ubuntu-branches/debian/experimental/linux-2.6/experimental

« back to all changes in this revision

Viewing changes to drivers/isdn/mISDN/dsp_ecdis.h

  • Committer: Package Import Robot
  • Author(s): maximilian attems, maximilian attems, Ben Hutchings
  • Date: 2012-06-06 10:25:57 UTC
  • mfrom: (1.2.38)
  • Revision ID: package-import@ubuntu.com-20120606102557-b9j3506wcwrqrnx8
Tags: 3.4.1-1~experimental.1
* New upstream release: http://kernelnewbies.org/Linux_3.4
* New upstream stable update:
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.4.1

[ maximilian attems ]
* Enable DM_VERITY, NF_CONNTRACK_TIMEOUT, NF_CT_NETLINK_TIMEOUT,
  IP_NF_MATCH_RPFILTER, IP6_NF_MATCH_RPFILTER, NETFILTER_NETLINK_ACCT,
  NETFILTER_XT_MATCH_NFACCT, NET_SCH_PLUG, SCSI_UFSHCD, SCSI_VIRTIO,
  NET_TEAM, ATH6KL.

[ Ben Hutchings ]
* DFSG: Remove the new vs6624 driver, which contains non-free firmware
* aufs: Update to aufs3.4-20120521
* [rt] Update to 3.4-rt8 and reenable

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
static inline void
47
47
echo_can_disable_detector_init(struct ec_disable_detector_state *det)
48
48
{
49
 
    /* Elliptic notch */
50
 
    /* This is actually centred at 2095Hz, but gets the balance we want, due
51
 
       to the asymmetric walls of the notch */
 
49
        /* Elliptic notch */
 
50
        /* This is actually centred at 2095Hz, but gets the balance we want, due
 
51
           to the asymmetric walls of the notch */
52
52
        biquad2_init(&det->notch,
53
 
                (int32_t) (-0.7600000*32768.0),
54
 
                (int32_t) (-0.1183852*32768.0),
55
 
                (int32_t) (-0.5104039*32768.0),
56
 
                (int32_t) (0.1567596*32768.0),
57
 
                (int32_t) (1.0000000*32768.0));
 
53
                     (int32_t)(-0.7600000 * 32768.0),
 
54
                     (int32_t)(-0.1183852 * 32768.0),
 
55
                     (int32_t)(-0.5104039 * 32768.0),
 
56
                     (int32_t)(0.1567596 * 32768.0),
 
57
                     (int32_t)(1.0000000 * 32768.0));
58
58
 
59
59
        det->channel_level = 0;
60
60
        det->notch_level = 0;
67
67
 
68
68
static inline int
69
69
echo_can_disable_detector_update(struct ec_disable_detector_state *det,
70
 
int16_t amp)
 
70
                                 int16_t amp)
71
71
{
72
72
        int16_t notched;
73
73
 
82
82
        det->notch_level += ((abs(notched) - det->notch_level) >> 4);
83
83
        if (det->channel_level > 280) {
84
84
                /* There is adequate energy in the channel.
85
 
                 Is it mostly at 2100Hz? */
86
 
                if (det->notch_level*6 < det->channel_level) {
 
85
                   Is it mostly at 2100Hz? */
 
86
                if (det->notch_level * 6 < det->channel_level) {
87
87
                        /* The notch says yes, so we have the tone. */
88
88
                        if (!det->tone_present) {
89
89
                                /* Do we get a kick every 450+-25ms? */
90
 
                                if (det->tone_cycle_duration >= 425*8
91
 
                                        && det->tone_cycle_duration <= 475*8) {
 
90
                                if (det->tone_cycle_duration >= 425 * 8
 
91
                                    && det->tone_cycle_duration <= 475 * 8) {
92
92
                                        det->good_cycles++;
93
93
                                        if (det->good_cycles > 2)
94
94
                                                det->hit = TRUE;