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

kitakami-common: Bring back FM-Radio!

Change-Id: Ib5e6848034516afa6dad343afbb2bff5bab4281f
parent e8f3fc19
......@@ -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/"
......
......@@ -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,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
......
......@@ -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
......
......@@ -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
......
type brcm_uim, domain;
type brcm_uim_exec, exec_type, file_type;
# Started by init
init_daemon_domain(brcm_uim)
r_dir_file(brcm_uim, ta_data_file)
rw_dir_file(brcm_uim, bluetooth_data_file)
rw_dir_file(brcm_uim, brcm_ldisc_sysfs)
rw_dir_file(brcm_uim, sysfs)
rw_dir_file(brcm_uim, sysfs_bluetooth_writable)
allow brcm_uim bluetooth_prop:file r_file_perms;
allow brcm_uim exported_bluetooth_prop:file r_file_perms;
allow brcm_uim hci_attach_dev:chr_file rw_file_perms;
allow brcm_uim property_socket:sock_file write;
allow brcm_uim self:capability net_admin;
type brcm_ldisc_sysfs, sysfs_type, fs_type;
type fpc_data_file, file_type;
type proc_kernel_sched, fs_type;
type secd_data_file, file_type;
......
......@@ -23,6 +23,9 @@
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@1\.2-service.clearkey u:object_r:hal_drm_clearkey_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@1\.1-service.widevine u:object_r:hal_drm_widevine_exec:s0
# BRCM BT FM
/sys/bus/platform/drivers/bcm_ldisc/bcmbt_ldisc(/.*)? u:object_r:brcm_ldisc_sysfs:s0
# Camera
/sys/devices(/soc\.0)?/pmi8994-flash-27(/.*)? u:object_r:sysfs_camera_torch:s0
......@@ -43,6 +46,9 @@
# Fingerprint
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service.kitakami u:object_r:hal_fingerprint_default_exec:s0
# FM
/(vendor|system/vendor)/bin/brcm-uim-sysfs u:object_r:brcm_uim_exec:s0
# TA
/dev/socket/tad u:object_r:tad_socket:s0
/dev/socket/secd_credmgr_sock u:object_r:secd_socket:s0
......
# rw_dir_file(domain, type)
# Allow the specified domain to read and write directories, files
# and symbolic links of the specified type.
define(`rw_dir_file', `
allow $1 $2:dir rw_dir_perms;
allow $1 $2:{ file lnk_file } rw_file_perms;
')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment