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

Commit c9c702ef authored by Bernhard Thoben's avatar Bernhard Thoben
Browse files

kitakami-common: Bring back FM-Radio!

Change-Id: Ib5e6848034516afa6dad343afbb2bff5bab4281f
parent e8f3fc19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ TARGET_EXFAT_DRIVER := sdfat
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs

# FM radio
BOARD_HAVE_BCM_FM := false #UIM not compatible with Oreo, yet;
BOARD_HAVE_BCM_FM := true

# BT/FM (Broadcom): Adjust the sysfs patch for 3.10 kernel
BOARD_HAVE_BCM_FM_SYSFS := "/sys/bus/platform/drivers/bcm_ldisc/bcm_ldisc/"
+12 −2
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@
                <item>Built-In Mic</item>
                <item>Built-In Back Mic</item>
                <item>Telephony Rx</item>
                <item>FM Tuner</item>
            </attachedDevices>
            <defaultOutputDevice>Speaker</defaultOutputDevice>
            <mixPorts>
@@ -203,7 +204,10 @@
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
                </devicePort>

                <devicePort tagName="FM" type="AUDIO_DEVICE_OUT_FM" role="sink">
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                </devicePort>
                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -227,6 +231,10 @@
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
                </devicePort>
                <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
                </devicePort>
            </devicePorts>
            <!-- route declaration, i.e. list all available sources for a given sink -->
            <routes>
@@ -242,6 +250,8 @@
                       sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
                <route type="mix" sink="Proxy"
                       sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
                <route type="mix" sink="FM"
                       sources="primary output"/>
                <route type="mix" sink="BT SCO"
                       sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
                <route type="mix" sink="BT SCO Headset"
@@ -251,7 +261,7 @@
                <route type="mix" sink="Telephony Tx"
                       sources="voice_tx"/>
                <route type="mix" sink="primary input"
                       sources="Wired Headset Mic,BT SCO Headset Mic,Telephony Rx"/>
                       sources="Built-In Back Mic,Built-In Mic,Wired Headset Mic,BT SCO Headset Mic,Telephony Rx,FM Tuner"/>
                <route type="mix" sink="surround_sound"
                       sources="Built-In Mic,Built-In Back Mic,Telephony Rx"/>
                <route type="mix" sink="Telephony Tx"
+3 −3
Original line number Diff line number Diff line
@@ -3,10 +3,10 @@
#######################################################################################

# UART device port where Bluetooth controller is attached (default ttyS1)
UartPort = /dev/ttyHS0
#UartPort = /dev/ttyHS0

#UartPort = /dev/brcm_bt_drv
#UimUartPort = /dev/ttyHS0
UartPort = /dev/brcm_bt_drv
UimUartPort = /dev/ttyHS0

# Target Baudrate to change to if different from 3000000
# This entry is mandatory if using V4L2
+6 −0
Original line number Diff line number Diff line
@@ -172,6 +172,12 @@ PRODUCT_PACKAGES += \
    libtinyxml \
    memtrack.msm8994

# FM
PRODUCT_PACKAGES += \
    FMRadio \
    brcm-uim-sysfs \
   libfmradio.v4l2-fm

# Fingerprint
PRODUCT_COPY_FILES += \
    frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
+5 −5
Original line number Diff line number Diff line
@@ -669,11 +669,11 @@ service ppd /system/vendor/bin/mm-pp-daemon
    writepid /dev/cpuset/system-background/tasks

# brcm-uim-sysfs (BT/FM/ANT+)
#service uim /system/vendor/bin/brcm-uim-sysfs
#    class late_start
#    user root
#    group bluetooth net_bt_admin net_bt
#    writepid /dev/cpuset/system-background/tasks
service uim /system/vendor/bin/brcm-uim-sysfs
    class late_start
    user root
    group bluetooth net_bt_admin net_bt
    writepid /dev/cpuset/system-background/tasks

on property:persist.radio.multisim.config=dsds
    enable ril-daemon2
Loading