QRD: Need to check FM Radio configuration

RESOLVED FIXED in Firefox 38, Firefox OS v2.2

Status

Firefox OS
Gaia::FMRadio
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: Greg Grisco, Assigned: xwaynec)

Tracking

unspecified
2.2 S6 (20feb)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:2.2+, firefox36 wontfix, firefox37 wontfix, firefox38 fixed, b2g-v2.2 fixed, b2g-master fixed)

Details

(Whiteboard: [caf priority: p2][CR 795088])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
On v2.2 reference device (8909), wondering if we need same configuration as this:

https://github.com/mozilla-b2g/device-flame/commit/1577f314faaabcb8bb03b405e4e8b53c0b37d653

I tried applying this same setting, but after setting it, I am still seeing "config_dac" in the log:


3739:I/qcom-fm ( 1311): /system/etc/init.qcom.fm.sh: FM QSoC calibration and firmware download succeeded 
3740:I/qcom-fm ( 1319): /system/etc/init.qcom.fm.sh: In FM shell Script 
3741:I/qcom-fm ( 1320): /system/etc/init.qcom.fm.sh: mode: config_dac 
3742:I/qcom-fm ( 1321): /system/etc/init.qcom.fm.sh: isAnalog: true 
3743:I/qcom-fm ( 1322): /system/etc/init.qcom.fm.sh: Transport : smd 
3744:I/qcom-fm ( 1323): /system/etc/init.qcom.fm.sh: Version : 199217 
3745:I/qcom-fm ( 1325): /system/etc/init.qcom.fm.sh: FM QSoC calibration and firmware download succeeded 

Just looking for some help to understand this since I am unable to play FM radio on the reference device.

Comment 1

4 years ago
Mike Wu/Shawn: this issue is on CAF's QRD device. Any pointers for Greg?

thanks
Hema
Flags: needinfo?(sku)
Flags: needinfo?(mwu)

Comment 2

4 years ago
Greg, please check the AudioManager enums in gecko/dom/system/gonk/android_audio/AudioSystem.h and gecko/dom/system/gonk/AudioManager and make sure everything still matches up. The FM enums used for audio routing are non-standard so things might stop matching up when google adds new enums.
Flags: needinfo?(mwu)

Comment 3

4 years ago
Wayne
 Please help check this issue first.
Thanks!!
Flags: needinfo?(waychen)
(Assignee)

Comment 4

4 years ago
Hi Greg,

In gecko/dom/system/gonk/AudioManager.cpp, gecko use setDeviceConnectionState(AUDIO_DEVICE_OUT_FM) to notify driver. Please have a check does this enum match your settings.


    AUDIO_DEVICE_OUT_PROXY                     = 0x40000,
    AUDIO_DEVICE_OUT_FM                        = 0x80000,
    AUDIO_DEVICE_OUT_FM_TX                     = 0x100000,

thanks
Flags: needinfo?(waychen)
Flags: needinfo?(sku)

Updated

4 years ago
Duplicate of this bug: 1130301
(Reporter)

Comment 6

4 years ago
Hi Wayne, yes for ANDROID_VERSION >=17 that's what I see in AudioSystems.h.
(Reporter)

Comment 7

4 years ago
I'm not sure what changed from yesterday to today, but I'm seeing the logs now show "smd" transport when I disable analog audio routing:

4048:I/qcom-fm ( 1384): /system/etc/init.qcom.fm.sh: In FM shell Script 
4049:I/qcom-fm ( 1385): /system/etc/init.qcom.fm.sh: mode: normal 
4050:I/qcom-fm ( 1386): /system/etc/init.qcom.fm.sh: isAnalog:  
4051:I/qcom-fm ( 1387): /system/etc/init.qcom.fm.sh: Transport : smd 
4052:I/qcom-fm ( 1388): /system/etc/init.qcom.fm.sh: Version : 199217 
4053:I/qcom-fm ( 1389): /system/etc/init.qcom.fm.sh: inserting the radio transport module 
4054:I/qcom-fm ( 1392): /system/etc/init.qcom.fm.sh: FM QSoC calibration and firmware download succeeded 

Should we be disabling this on msm8909?
(Reporter)

Updated

4 years ago
Flags: needinfo?(waychen)
(Assignee)

Comment 8

4 years ago
Hi Michael,

I have no idea about the spec of msm8909. Could you recommend this?
Flags: needinfo?(waychen) → needinfo?(mwu)
(Reporter)

Comment 9

4 years ago
(In reply to Greg Grisco from comment #6)
> Hi Wayne, yes for ANDROID_VERSION >=17 that's what I see in AudioSystems.h.
Flags: needinfo?(waychen)
(Reporter)

Comment 10

4 years ago
(In reply to Greg Grisco from comment #9)
> (In reply to Greg Grisco from comment #6)
> > Hi Wayne, yes for ANDROID_VERSION >=17 that's what I see in AudioSystems.h.

Oops, I hit return to soon, sorry.  I meant to say that I misunderstood the original question.  I see that there are changes to the enums in system/core/include/system/audio.h:

AUDIO_DEVICE_OUT_FM = 0x10000,
AUDIO_DEVICE_OUT_FM_TX = 0x100000,

could you change AudioSystem.h to conform?  I tested locally and am able to play FM Radio by making these changes.  Thanks.

Updated

4 years ago
Summary: Need to check FM Radio configuration → QRD: Need to check FM Radio configuration

Comment 11

4 years ago
Not sure what I'm being asked about, and judging by comment 10, it's not relevant anymore.
Flags: needinfo?(mwu)

Comment 12

4 years ago
(In reply to Greg Grisco from comment #10)
> could you change AudioSystem.h to conform?  I tested locally and am able to
> play FM Radio by making these changes.  Thanks.

Possible to do, but it'll break other platforms which depend on the current value of the enum. Additionally, this enum value is very specific to msm hardware. We want to support this case more generally if possible. One possible solution is to configure the FM radio via AudioSystem::setParameters, which can then do the right thing for the given device. Then we can have pass things like "fm_radio=off"/"fm_radio=rx"/"fm_radio=tx". Would we be able to get an interface like that?
(Reporter)

Comment 13

4 years ago
(In reply to Michael Wu [:mwu] from comment #12)
> 
> Possible to do, but it'll break other platforms which depend on the current
> value of the enum. Additionally, this enum value is very specific to msm

Oh, but the change to audio.h I think is an AOSP change, not CAF.  So it should affect all platforms.  Sorry, I had trouble finding a reference to point you to, would you mind checking?
Flags: needinfo?(mwu)

Comment 14

4 years ago
(In reply to Greg Grisco from comment #13)
> Oh, but the change to audio.h I think is an AOSP change, not CAF.  So it
> should affect all platforms.  Sorry, I had trouble finding a reference to
> point you to, would you mind checking?

Looks like AOSP added some official support for FM in lollipop. Got it - should be fine for us to support it then.
Flags: needinfo?(mwu)
(Assignee)

Comment 15

4 years ago
Created attachment 8563224 [details] [diff] [review]
bug-1130196-fix.patch

Hi Greg,

I have no device to try this patch.
please help to try this patch first. 

I sync audio.h to AudioSystem.h and use android version to seperate them.

Sincerely,
Wayne
Flags: needinfo?(waychen) → needinfo?(ggrisco)
(Reporter)

Comment 16

4 years ago
Hi Wayne, the patch looks good and works fine for me, thanks.
Flags: needinfo?(ggrisco) → needinfo?(waychen)

Updated

4 years ago
Whiteboard: [CR 795088]

Updated

4 years ago
Whiteboard: [CR 795088] → [caf priority: p2][CR 795088]
(Assignee)

Comment 17

4 years ago
Comment on attachment 8563224 [details] [diff] [review]
bug-1130196-fix.patch

Hi Michael,

could you help to review this patch?
thanks

Sincerely,
Wayne
Flags: needinfo?(waychen)
Attachment #8563224 - Flags: review?(mwu)

Updated

4 years ago
Attachment #8563224 - Flags: review?(mwu) → review+
(Assignee)

Comment 18

4 years ago
Created attachment 8564827 [details] [diff] [review]
bug-1130196-fix.patch
Attachment #8563224 - Attachment is obsolete: true
Attachment #8564827 - Flags: review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/b2g-inbound/rev/0106580da072
Assignee: nobody → waychen
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/0106580da072
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox38: --- → fixed
Resolution: --- → FIXED
Comment on attachment 8564827 [details] [diff] [review]
bug-1130196-fix.patch

User impact if declined: FM radio won't work on L builds
Attachment #8564827 - Flags: approval-mozilla-b2g37?

Updated

4 years ago
blocking-b2g: 2.2? → 2.2+

Updated

4 years ago
Attachment #8564827 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/e33bf2fce4a6
status-b2g-v2.2: --- → fixed
status-b2g-master: --- → fixed
status-firefox36: --- → wontfix
status-firefox37: --- → wontfix
Target Milestone: --- → 2.2 S6 (20feb)

Updated

3 years ago
Blocks: 1142220

Updated

3 years ago
No longer blocks: 1142220
You need to log in before you can comment on or make changes to this bug.