piccolo-dev / android_device_bq_piccolo

Android device configuration for the bq Aquaris M5
19 stars 8 forks source link

Radio FM #1

Closed RetroMarioBros closed 8 years ago

Kra1o5 commented 9 years ago

Camera FM?

What is this?

RetroMarioBros commented 9 years ago

Sorry , radio fm not found

RetroMarioBros commented 9 years ago

The batery not arrive to 100% Is in 96%

Kra1o5 commented 9 years ago

Not found or not working correctly?

If is the second, is a know issue.

For battery is really weird I get 100% without problems.

stucki commented 9 years ago

Hey @angelhp! Please create 1 ticket per issue. This one is about Camera FM. The status is, it works for 3 seconds only. I had in mind that @Kra1o5 already fixed this but it still seems to exist.

Kra1o5 commented 9 years ago

Yes @stucki .

But really is Radio FM not Camera is a typo error.

We have located the error on audio HAL & we are looking one method to fix it.

stucki commented 9 years ago

Right. Can you fix the title of this ticket?

Kra1o5 commented 9 years ago

@stucki Fixed!

DerSaxxe commented 9 years ago

Hello! FM-Radio doesn't crash but there is no output. Recording works. Thanks!

Kra1o5 commented 9 years ago

Yes, we have located the problem (audio HAL).

But not fixed yet.

andy-de commented 9 years ago

Spirit 2 works fine. Only switching output from headphone to internal speaker does not work. Maybe it helps solving this issues.

Kra1o5 commented 9 years ago

Hi @andy-de ,

We have the issue located but thanks for the tip, people can use Spirit 2 as temporal workaround.

Greetings

Kra1o5 commented 9 years ago

By request of @stucki ,

More info about the issue.

Is located in audio.primary.msm8916.so (/system/lib/hw/).

It seems like stock lib make something on it to avoid cut audio on kernel suspend.

We have two options.

Fix it on kernel (sounds part) or try to fix it on audio HAL part (audio.primary.msm8916.so).

starvoid commented 8 years ago

Hi, the fix for this issue....

could be get from this kernel?

https://github.com/CyanogenMod/android_kernel_bq_msm8916

I'm not sure, but I guess that is for aquaris X5.

The last change was 3 days ago. It seems an active develop

Thanks for your effort.

piwats commented 8 years ago

Does the FM Radio app from the bq firmware run on cm?

Kra1o5 commented 8 years ago

The problem is on audio HAL.

piwats commented 8 years ago

Please excuse me, if I'm getting annoying.

I was looking the reference cynogenmod msm8939 device description files and noticed that they have a slightly different uevent.qcom.d file, where you can find the following line:

https://github.com/CyanogenMod/android_device_cyanogen_msm8939-common/blob/72c919fe35521ae0b907c1eb755ddd7c17c4e021/rootdir/etc/ueventd.qcom.rc#L138

/dev/msm_fm               0660   system     audio

via: https://github.com/CyanogenMod/android_device_cyanogen_msm8939-common/search?utf8=%E2%9C%93&q=fm

A quick search over at codeaurora (caf, msm sources or how else they are called) revealed, that they do something like this (via https://www.codeaurora.org/cgit/external/gigabyte/ag-gb-dsds-7227/plain/hardware/msm7k/libaudio-msm8660/AudioHardware.cpp)

#define FM_DEVICE  "/dev/msm_fm"

Do you know where "our" /dev/msm_fm has gone??

UPDATE: found a question to this, this one is obsolete, as radio from the kernel perspective is working, spirit radio app proves it.

piwats commented 8 years ago

Looking at the repo for the Xiami ferrari (msm8939) - it seems they have a working fm radio -, I noticed the following:

There is a

init.qcom.fm.sh

Look here: https://github.com/dh-harald/android_device_xiaomi_ferrari/blob/cm-12.1/rootdir/etc/init.qcom.fm.sh

which makes use of the following files/blobs/binaries included also in the original bq firmware (init.qcom.rc.sh is also present in the bq firmware):

# FM
bin/fmconfig
bin/fmfactorytest
bin/fmfactorytestserver
bin/fm_qsoc_patches
bin/ftmdaemon

It is worth mentioning, that google is exploding when trying to search for "init.qcom.fm.sh" as it seems to "turn on" fm radio where there was none before.

Happy new year!

piwats commented 8 years ago

Seems to work in CM-13 (cm-13-20160120) :+1:

stucki commented 8 years ago

This issue was moved to bq-dev/android_device_bq_piccolo#87