summaryrefslogtreecommitdiffstats
path: root/src/plugins/symbian/mmf/radio/s60radiotunercontrol_since32.cpp
blob: c17e24a459b4e1a98286ba629c1282146b31a43b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include "DebugMacros.h"

#include "s60radiotunercontrol_since32.h"
#include "s60radiotunerservice.h"

#include <QtCore/qdebug.h>
#include <RadioFmTunerUtility.h>

S60RadioTunerControl::S60RadioTunerControl(QObject *parent)
    : QRadioTunerControl(parent)
    , m_error(0)
    , m_radioUtility(NULL)
    , m_fmTunerUtility(NULL)
    , m_playerUtility(NULL)
    , m_maxVolume(100)
    , m_audioInitializationComplete(false)
    , m_muted(false)
    , m_isStereo(true)
    , m_vol(50)
    , m_signal(0)
    , m_scanning(false)
    , m_currentBand(QRadioTuner::FM)
    , m_currentFreq(87500000)
    , m_radioError(QRadioTuner::NoError)
    , m_stereoMode(QRadioTuner::Auto)
    , m_apiTunerState(QRadioTuner::StoppedState)
    , m_previousSignal(0)
    , m_volChangeRequired(false)
    , m_signalStrengthTimer(new QTimer(this))
{
    DP0("S60RadioTunerControl::S60RadioTunerControl +++");
    bool retValue = initRadio();
    if (!retValue) {
        m_errorString = QString(tr("Initialize Error."));
        emit error(QRadioTuner::ResourceError);
    } else {
        connect(m_signalStrengthTimer, SIGNAL(timeout()), this, SLOT(changeSignalStrength()));
    }
    DP0("S60RadioTunerControl::S60RadioTunerControl ---");
}

S60RadioTunerControl::~S60RadioTunerControl()
{
    DP0("S60RadioTunerControl::~S60RadioTunerControl +++");

    if (m_fmTunerUtility) {
        m_fmTunerUtility->Close();
    }

    if (m_playerUtility) {
        m_playerUtility->Close();
    }

    delete m_radioUtility;

  DP0("S60RadioTunerControl::~S60RadioTunerControl ---");
}

QRadioTuner::State S60RadioTunerControl::state() const
{
    DP0("S60RadioTunerControl::state");

    return m_apiTunerState;
}

QRadioTuner::Band S60RadioTunerControl::band() const
{
    DP0("S60RadioTunerControl::band");

    return m_currentBand;
}

bool S60RadioTunerControl::isBandSupported(QRadioTuner::Band b) const
{
    DP0("S60RadioTunerControl::isBandSupported");
    if (b == QRadioTuner::FM)
        return true;
    else if (b == QRadioTuner::LW)
        return false;
    else if (b == QRadioTuner::AM)
        return false;
    else if (b == QRadioTuner::SW)
        return false;
    else if (b == QRadioTuner::FM2)
        return false;
    else
        return false;
}

void S60RadioTunerControl::changeSignalStrength()
    {
    
    int currentSignal = signalStrength();
    if (currentSignal != m_previousSignal)
        {
        m_previousSignal = currentSignal;
        emit signalStrengthChanged(currentSignal);
        }
    }
void S60RadioTunerControl::setBand(QRadioTuner::Band b)
{
    DP0("S60RadioTunerControl::setBand +++");
    QRadioTuner::Band tempBand = b;
    if (tempBand != m_currentBand ) {
        if (isBandSupported(tempBand)){
            m_currentBand = b;  
            emit bandChanged(m_currentBand);
        }
        else {
            switch(tempBand)
                {
                case QRadioTuner::FM :
                    m_errorString = QString(tr("Band FM not Supported"));
                    break;
                case QRadioTuner::AM :
                    m_errorString = QString(tr("Band AM not Supported"));
                    break;
                case QRadioTuner::SW :
                    m_errorString = QString(tr("Band SW not Supported"));
                    break;
                case QRadioTuner::LW :
                    m_errorString = QString(tr("Band LW not Supported"));
                    break;
                case QRadioTuner::FM2 :
                    m_errorString = QString(tr("Band FM2 not Supported"));
                    break;
                default :
                    m_errorString = QString("Band %1 not Supported").arg(tempBand);
                    break;
                }
            emit error(QRadioTuner::OutOfRangeError);
        }
    }

    DP0("S60RadioTunerControl::setBand ---");
}

int S60RadioTunerControl::frequency() const
{
    DP0("S60RadioTunerControl::frequency");

    return m_currentFreq;
}

void S60RadioTunerControl::setFrequency(int frequency)
{
    DP0("S60RadioTunerControl::setFrequency +++");
    DP1("S60RadioTunerControl::setFrequency, frequency:", frequency);

    m_currentFreq = frequency;
    m_fmTunerUtility->SetFrequency(m_currentFreq);

    DP0("S60RadioTunerControl::setFrequency ---");
}
int S60RadioTunerControl::frequencyStep(QRadioTuner::Band b) const
{
    DP0("S60RadioTunerControl::frequencyStep +++");

    int step = 0;
    if (b == QRadioTuner::FM)
        step = 100000; // 100kHz steps
    else if(b == QRadioTuner::LW)
        step = 1000; // 1kHz steps
    else if (b == QRadioTuner::AM)
        step = 1000; // 1kHz steps
    else if(b == QRadioTuner::SW)
        step = 500; // 500Hz steps
    DP1("S60RadioTunerControl::frequencyStep, Step:", step);
    DP0("S60RadioTunerControl::frequencyStep ---");

    return step;
}

QPair<int,int> S60RadioTunerControl::frequencyRange(QRadioTuner::Band band) const
{
    DP0("S60RadioTunerControl::frequencyRange +++");

    int bottomFreq;
    int topFreq;

    int bandError = KErrNone;
    TFmRadioFrequencyRange range;

    if (m_fmTunerUtility) {
        bandError = m_fmTunerUtility->GetFrequencyRange(range, bottomFreq, topFreq);
    }
    if (!bandError) {
        return qMakePair<int,int>(bottomFreq, topFreq);
    }

    DP0("S60RadioTunerControl::frequencyRange ---");

    return qMakePair<int,int>(0,0);
}

bool S60RadioTunerControl::isStereo() const
{
    DP0("S60RadioTunerControl::isStereo");

    return m_isStereo;
}

QRadioTuner::StereoMode S60RadioTunerControl::stereoMode() const
{
    DP0("S60RadioTunerControl::stereoMode");

    return m_stereoMode;
}

void S60RadioTunerControl::setStereoMode(QRadioTuner::StereoMode mode)
{
    DP0("S60RadioTunerControl::setStereoMode +++");

    if (m_fmTunerUtility) {
        if (QRadioTuner::ForceMono == mode) {
            m_fmTunerUtility->ForceMonoReception(true);
            m_stereoMode = QRadioTuner::ForceMono;
            m_isStereo = false;
        } else {
            m_fmTunerUtility->ForceMonoReception(false);
            m_isStereo = true;
            m_stereoMode = QRadioTuner::ForceStereo;
        }
    }

    DP0("S60RadioTunerControl::setStereoMode ---");
}

int S60RadioTunerControl::signalStrength() const
{
     DP0("S60RadioTunerControl::signalStrength +++");

    // return value is a percentage value
    if (m_fmTunerUtility) {
        TInt maxSignalStrength;
        TInt currentSignalStrength;
        m_error = m_fmTunerUtility->GetMaxSignalStrength(maxSignalStrength);

        if (m_error == KErrNone) {
            m_error = m_fmTunerUtility->GetSignalStrength(currentSignalStrength);
            if (m_error == KErrNone) {
                if (currentSignalStrength == 0 || maxSignalStrength == 0) {
                    return currentSignalStrength;
                }
                m_signal = ((TInt64)currentSignalStrength) * 100 / maxSignalStrength;
            }
        }
    }

    DP1("S60RadioTunerControl::signalStrength, m_signal:", m_signal);
    DP0("S60RadioTunerControl::signalStrength ---");

    return m_signal;
}

int S60RadioTunerControl::volume() const
{
    DP0("S60RadioTunerControl::volume");

    return m_vol;
}

void S60RadioTunerControl::setVolume(int volume)
{
    DP0("S60RadioTunerControl::setVolume +++");
    DP1("S60RadioTunerControl::setVolume, Volume:", volume);

    int boundVolume = qBound(0, volume, 100);

    if (m_vol == boundVolume )
        return;

    if (!m_muted && m_playerUtility) {
        m_vol = boundVolume;
        // Don't set volume until State is in Active State.
        if (state() == QRadioTuner::ActiveState ) {
            m_playerUtility->SetVolume(m_vol*m_volMultiplier);

        } else {
            m_volChangeRequired = TRUE;
            emit volumeChanged(boundVolume);
        }
    }
    DP0("S60RadioTunerControl::setVolume ---");
}

bool S60RadioTunerControl::isMuted() const
{
    DP0("S60RadioTunerControl::isMuted");

    return m_muted;
}

void S60RadioTunerControl::setMuted(bool muted)
{
    DP0("S60RadioTunerControl::setMuted +++");
    DP1("S60RadioTunerControl::setMuted, Muted:", muted);
    if (m_playerUtility) {
        m_muted = muted;
        m_playerUtility->Mute(m_muted);
    }
  DP0("S60RadioTunerControl::setMuted ---");
}

bool S60RadioTunerControl::isSearching() const
{
    DP0("S60RadioTunerControl::isSearching");

    return m_scanning;
}

void S60RadioTunerControl::cancelSearch()
{
    DP0("S60RadioTunerControl::cancelSearch +++");

    m_fmTunerUtility->CancelStationSeek();
    m_scanning = false;
    emit searchingChanged(false);

  DP0("S60RadioTunerControl::cancelSearch ---");
}

void S60RadioTunerControl::searchForward()
{
    DP0("S60RadioTunerControl::searchForward +++");
    m_fmTunerUtility->StationSeek(true);
    m_scanning = true;
    emit searchingChanged(m_scanning);
  DP0("S60RadioTunerControl::searchForward ---");
}

void S60RadioTunerControl::searchBackward()
{
    DP0("S60RadioTunerControl::searchBackward +++");
    m_fmTunerUtility->StationSeek(false);
    m_scanning = true;
    emit searchingChanged(m_scanning);
  DP0("S60RadioTunerControl::searchBackward ---");
}

bool S60RadioTunerControl::isValid() const
{
    DP0("S60RadioTunerControl::isValid");

    return m_available;
}

bool S60RadioTunerControl::initRadio()
{
    DP0("S60RadioTunerControl::initRadio +++");
    m_available = false;
    // create an instance of Radio Utility factory and indicate
    // FM Radio is a primary client
    TRAPD(utilityError,
        m_radioUtility = CRadioUtility::NewL(ETrue);
        // Get a tuner utility
        m_fmTunerUtility = &m_radioUtility->RadioFmTunerUtilityL(*this);
        // we want to listen radio in offline mode too
        m_fmTunerUtility->EnableTunerInOfflineMode(ETrue);
        // Get a player utility
        m_playerUtility = &m_radioUtility->RadioPlayerUtilityL(*this);
    );
    if (utilityError != KErrNone) {
        m_radioError = QRadioTuner::ResourceError;
        return m_available;
    }

    m_tunerControl = false;

    m_available = true;
  DP1("S60RadioTunerControl::initRadio, m_available:", m_available);
  DP0("S60RadioTunerControl::initRadio ---");
    return m_available;
}

bool S60RadioTunerControl::isAvailable() const
{
    DP0("S60RadioTunerControl::isAvailable");

    return m_available;
}

QtMultimediaKit::AvailabilityError S60RadioTunerControl::availabilityError() const
{
    DP0("S60RadioTunerControl::availabilityError");
    if (m_available)
        return QtMultimediaKit::NoError;
    else
        return QtMultimediaKit::ResourceError;
}

void S60RadioTunerControl::start()
{
    DP0("S60RadioTunerControl::start +++");
    if (!m_tunerControl) {
        m_fmTunerUtility->RequestTunerControl();
    } else {
        m_playerUtility->Play();
    }
    m_signalStrengthTimer->start(3000);

  DP0("S60RadioTunerControl::start ---");
}

void S60RadioTunerControl::stop()
{
    DP0("S60RadioTunerControl::stop +++");
    if (m_playerUtility) {
        m_playerUtility->Stop();
    }
    m_signalStrengthTimer->stop();
   DP0("S60RadioTunerControl::stop ---");
}

QRadioTuner::Error S60RadioTunerControl::error() const
{
    DP1("S60RadioTunerControl::error", m_radioError);

    return m_radioError;
}
QString S60RadioTunerControl::errorString() const
{
    DP1("S60RadioTunerControl::errorString", m_errorString);

    return m_errorString;
}

void S60RadioTunerControl::MrpoStateChange(TPlayerState aState, TInt aError)
{
    DP0("S60RadioTunerControl::MrpoStateChange +++");
    if (aError == KErrNone){
        m_radioError = QRadioTuner::NoError;
        if (aState == ERadioPlayerIdle) {
            m_apiTunerState = QRadioTuner::StoppedState;
        } else if (aState == ERadioPlayerPlaying) {
            m_apiTunerState = QRadioTuner::ActiveState;
            //Apply pending volume changes.
            if(m_volChangeRequired){
                setVolume(m_vol);
                }
        }
    } else {
        m_apiTunerState = QRadioTuner::StoppedState;
    }
    emit stateChanged(m_apiTunerState);
  DP0("S60RadioTunerControl::MrpoStateChange ---");
}

void S60RadioTunerControl::MrpoVolumeChange(TInt aVolume)
{
    DP0("S60RadioTunerControl::MrpoVolumeChange +++");
    DP1("S60RadioTunerControl::MrpoVolumeChange, aVolume:", aVolume);
    m_vol = (aVolume/m_volMultiplier);
    if (!m_volChangeRequired) {
        emit volumeChanged(m_vol);

    } else {
        m_volChangeRequired = false;
    }
    DP0("S60RadioTunerControl::MrpoVolumeChange ---");
}

void S60RadioTunerControl::MrpoMuteChange(TBool aMute)
{
    DP0("S60RadioTunerControl::MrpoMuteChange +++");
    DP1("S60RadioTunerControl::MrpoMuteChange, aMute:", aMute);
    m_muted = aMute;
    emit mutedChanged(m_muted);
  DP0("S60RadioTunerControl::MrpoMuteChange ---");
}

void S60RadioTunerControl::MrpoBalanceChange(TInt aLeftPercentage, TInt aRightPercentage)
{
    DP0("S60RadioTunerControl::MrpoBalanceChange +++");

    DP0("S60RadioTunerControl::MrpoBalanceChange ---");

    // no actions
}

void S60RadioTunerControl::MrftoRequestTunerControlComplete(TInt aError)
{
    DP0("S60RadioTunerControl::MrftoRequestTunerControlComplete +++");
    DP1("S60RadioTunerControl::MrftoRequestTunerControlComplete, aError:", aError);
    if (aError == KErrNone) {
        m_playerUtility->GetMaxVolume(m_maxVolume);
        m_volMultiplier = float(m_maxVolume)/float(100);
        m_radioError = QRadioTuner::NoError;
        m_tunerControl = true;
        m_available = true;
        m_fmTunerUtility->SetFrequency(m_currentFreq);
        m_playerUtility->Play();
        int signal = signalStrength();
        if (m_signal != signal) {
            emit signalStrengthChanged(signal);
            m_signal = signal;
        }

    } else if (aError == KFmRadioErrAntennaNotConnected) {
        m_radioError = QRadioTuner::OpenError;
        m_errorString = QString(tr("Antenna Not Connected"));
        emit error(m_radioError);
    } else if (aError == KErrAlreadyExists){
        m_radioError = QRadioTuner::ResourceError;
        m_errorString = QString(tr("Resource Error."));
        emit error(m_radioError);
    } else if (aError == KFmRadioErrFrequencyOutOfBandRange) {
        m_radioError = QRadioTuner::OutOfRangeError;
        m_errorString = QString(tr("Frequency out of band range"));
        emit error(m_radioError);
    }else{
        m_radioError = QRadioTuner::OpenError;
        m_errorString = QString(tr("Unknown Error."));
        emit error(m_radioError);
    }

  DP0("S60RadioTunerControl::MrftoRequestTunerControlComplete ---");
}

void S60RadioTunerControl::MrftoSetFrequencyRangeComplete(TInt aError)
{
    DP0("S60RadioTunerControl::MrftoSetFrequencyRangeComplete +++");
    DP1("S60RadioTunerControl::MrftoSetFrequencyRangeComplete, aError:", aError);
    if (aError == KFmRadioErrFrequencyOutOfBandRange || KFmRadioErrFrequencyNotValid) {
        m_radioError = QRadioTuner::OutOfRangeError;
        m_errorString = QString(tr("Frequency Out of Band Range or Frequency Not Valid"));
        emit error(m_radioError);
    } else if (aError == KFmRadioErrHardwareFaulty || KFmRadioErrOfflineMode) {
        m_radioError = QRadioTuner::OpenError;
        m_errorString = QString(tr("Hardware failure or RadioInOfflineMode"));
        emit error(m_radioError);
    }
  DP0("S60RadioTunerControl::MrftoSetFrequencyRangeComplete ---");
}

void S60RadioTunerControl::MrftoSetFrequencyComplete(TInt aError)
{
    DP0("S60RadioTunerControl::MrftoSetFrequencyComplete +++");
    DP1("S60RadioTunerControl::MrftoSetFrequencyComplete, aError", aError);
    if (aError == KErrNone) {
        m_radioError = QRadioTuner::NoError;
    } else if (aError == KFmRadioErrFrequencyOutOfBandRange || KFmRadioErrFrequencyNotValid) {
        m_radioError = QRadioTuner::OutOfRangeError;
        m_errorString = QString(tr("Frequency Out of range or not Valid."));
        emit error(m_radioError);
    } else if (aError == KFmRadioErrHardwareFaulty || KFmRadioErrOfflineMode) {
        m_radioError = QRadioTuner::OpenError;
        m_errorString = QString("Hardware failure or Radio In Offline Mode");
        emit error(m_radioError);
    }
  DP0("S60RadioTunerControl::MrftoSetFrequencyComplete ---");
}

void S60RadioTunerControl::MrftoStationSeekComplete(TInt aError, TInt aFrequency)
{
    DP0("S60RadioTunerControl::MrftoStationSeekComplete +++");
    DP3("S60RadioTunerControl::MrftoStationSeekComplete, aError:", aError, " Frequency:", aFrequency);
    m_scanning = false;
    if (aError == KErrNone) {
        m_radioError = QRadioTuner::NoError;
        m_currentFreq = aFrequency;
        emit searchingChanged(m_scanning);
    } else {
        m_radioError = QRadioTuner::OpenError;
        emit searchingChanged(m_scanning);
        m_errorString = QString("Scanning Error");
        emit error(m_radioError);
    }
  DP0("S60RadioTunerControl::MrftoStationSeekComplete ---");
}

void S60RadioTunerControl::MrftoFmTransmitterStatusChange(TBool aActive)
{
    DP0("S60RadioTunerControl::MrftoFmTransmitterStatusChange +++");

    DP0("S60RadioTunerControl::MrftoFmTransmitterStatusChange ---");

    //no actions
}

void S60RadioTunerControl::MrftoAntennaStatusChange(TBool aAttached)
{
    DP0("S60RadioTunerControl::MrftoAntennaStatusChange +++");
    DP1("S60RadioTunerControl::MrftoAntennaStatusChange, aAttached:", aAttached);
    if (aAttached && m_tunerControl) {
        m_playerUtility->Play();
    }
  DP0("S60RadioTunerControl::MrftoAntennaStatusChange ---");
}

void S60RadioTunerControl::MrftoOfflineModeStatusChange(TBool /*aOfflineMode*/)
{
    DP0("S60RadioTunerControl::MrftoOfflineModeStatusChange +++");

    DP0("S60RadioTunerControl::MrftoOfflineModeStatusChange ---");


}

void S60RadioTunerControl::MrftoFrequencyRangeChange(TFmRadioFrequencyRange aBand /*, TInt aMinFreq, TInt aMaxFreq*/)
{
    DP0("S60RadioTunerControl::MrftoFrequencyRangeChange +++");
    if (aBand == EFmRangeEuroAmerica) {
        setBand(QRadioTuner::FM);
    }
  DP0("S60RadioTunerControl::MrftoFrequencyRangeChange ---");
}

void S60RadioTunerControl::MrftoFrequencyChange(TInt aNewFrequency)
{
    DP0("S60RadioTunerControl::MrftoFrequencyChange +++");
    DP1("S60RadioTunerControl::MrftoFrequencyChange, aNewFrequency:", aNewFrequency);
    m_currentFreq = aNewFrequency;
    emit frequencyChanged(m_currentFreq);

    int signal = signalStrength();
    if (m_signal != signal) {
        emit signalStrengthChanged(signal);
        m_signal = signal;
    }
  DP0("S60RadioTunerControl::MrftoFrequencyChange ---");
}

void S60RadioTunerControl::MrftoForcedMonoChange(TBool aForcedMono)
{
    DP0("S60RadioTunerControl::MrftoForcedMonoChange +++");
    DP1("S60RadioTunerControl::MrftoForcedMonoChange, aForcedMono:", aForcedMono);
    if (aForcedMono) {
        m_stereoMode = QRadioTuner::ForceMono;
    } else {
        m_stereoMode = QRadioTuner::ForceStereo;
    }
    emit stereoStatusChanged(!aForcedMono);
  DP0("S60RadioTunerControl::MrftoForcedMonoChange ---");
}

void S60RadioTunerControl::MrftoSquelchChange(TBool aSquelch)
{
    DP0("S60RadioTunerControl::MrftoSquelchChange");

    DP1("S60RadioTunerControl::MrftoSquelchChange, aSquelch:", aSquelch);

    // no actions
}