Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 289cce60 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Support Ireland specific supervisory tone"

parents 2eb29c0d 599ca055
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -811,6 +811,20 @@ const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = {
                        { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_HK_RINGTONE
        { .segments = { { .duration = 400, .waveFreq = { 400, 450, 0 }, 0, 0 },
                        { .duration = 200, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 400, .waveFreq = { 400, 450, 0 }, 0, 0 },
                        { .duration = 2000, .waveFreq = { 0 }, 0, 0},
                        { .duration = 0, .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_IE_RINGTONE
        { .segments = { { .duration = 180, .waveFreq = { 425, 0 }, 0, 0 },
                        { .duration = 200, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 200, .waveFreq = { 425, 0 }, 0, 0 },
                        { .duration = 4500, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_IE_CALL_WAITING
};

// Used by ToneGenerator::getToneForRegion() to convert user specified supervisory tone type
@@ -875,6 +889,16 @@ const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1
            TONE_SUP_ERROR,              // TONE_SUP_ERROR
            TONE_SUP_CALL_WAITING,       // TONE_SUP_CALL_WAITING
            TONE_HK_RINGTONE             // TONE_SUP_RINGTONE
        },
        {   // IRELAND
            TONE_SUP_DIAL,               // TONE_SUP_DIAL
            TONE_SUP_BUSY,               // TONE_SUP_BUSY
            TONE_SUP_CONGESTION,         // TONE_SUP_CONGESTION
            TONE_SUP_RADIO_ACK,          // TONE_SUP_RADIO_ACK
            TONE_SUP_RADIO_NOTAVAIL,     // TONE_SUP_RADIO_NOTAVAIL
            TONE_SUP_ERROR,              // TONE_SUP_ERROR
            TONE_IE_CALL_WAITING,        // TONE_SUP_CALL_WAITING
            TONE_IE_RINGTONE             // TONE_SUP_RINGTONE
        }
};

@@ -944,6 +968,8 @@ ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool
        mRegion = SINGAPORE;
    } else if (strstr(value, "hk") != NULL) {
        mRegion = HONGKONG;
    } else if (strstr(value, "ie") != NULL) {
        mRegion = IRELAND;
    } else {
        mRegion = CEPT;
    }
+4 −0
Original line number Diff line number Diff line
@@ -209,6 +209,9 @@ private:
        // HONG KONG Supervisory tones
        TONE_HK_BUSY,               // Busy tone: 480 Hz + 620 Hz, 500ms ON, 500ms OFF...
        TONE_HK_RINGTONE,           // Ring Tone: 440 Hz + 480 Hz repeated with pattern 0,4s on, 0,2s off, 0,4s on and 3s off.
        // IRELAND Supervisory tones
        TONE_IE_RINGTONE,           // Ring Tone: A 400Hz + 450Hz tone repeated in a 0.4s on, 0.2s off, 0.4s on, 2.0s off pattern.
        TONE_IE_CALL_WAITING,       // Call waiting tone: 425Hz tone repeated in a 0.18s on, 0.2s off, 0.2s on, 4.5s off pattern.
        NUM_ALTERNATE_TONES
    };

@@ -219,6 +222,7 @@ private:
        AUSTRALIA,
        SINGAPORE,
        HONGKONG,
        IRELAND,
        CEPT,
        NUM_REGIONS
    };