mirror of
https://github.com/joel16/android_device_sony_kitakami-common.git
synced 2024-11-23 11:49:47 +00:00
kitakami-common: Bring back FM-Radio!
Change-Id: Ib5e6848034516afa6dad343afbb2bff5bab4281f
This commit is contained in:
parent
96b176c3ba
commit
089d1ecb52
@ -132,7 +132,7 @@ TARGET_EXFAT_DRIVER := sdfat
|
|||||||
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
|
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
|
||||||
|
|
||||||
# FM radio
|
# 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
|
# BT/FM (Broadcom): Adjust the sysfs patch for 3.10 kernel
|
||||||
BOARD_HAVE_BCM_FM_SYSFS := "/sys/bus/platform/drivers/bcm_ldisc/bcm_ldisc/"
|
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 Mic</item>
|
||||||
<item>Built-In Back Mic</item>
|
<item>Built-In Back Mic</item>
|
||||||
<item>Telephony Rx</item>
|
<item>Telephony Rx</item>
|
||||||
|
<item>FM Tuner</item>
|
||||||
</attachedDevices>
|
</attachedDevices>
|
||||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||||
<mixPorts>
|
<mixPorts>
|
||||||
@ -203,7 +204,10 @@
|
|||||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||||
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
|
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
|
||||||
</devicePort>
|
</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">
|
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
|
||||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||||
@ -227,6 +231,10 @@
|
|||||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||||
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||||
</devicePort>
|
</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>
|
</devicePorts>
|
||||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||||
<routes>
|
<routes>
|
||||||
@ -242,6 +250,8 @@
|
|||||||
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
|
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
|
||||||
<route type="mix" sink="Proxy"
|
<route type="mix" sink="Proxy"
|
||||||
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
|
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
|
||||||
|
<route type="mix" sink="FM"
|
||||||
|
sources="primary output"/>
|
||||||
<route type="mix" sink="BT SCO"
|
<route type="mix" sink="BT SCO"
|
||||||
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
|
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
|
||||||
<route type="mix" sink="BT SCO Headset"
|
<route type="mix" sink="BT SCO Headset"
|
||||||
@ -251,7 +261,7 @@
|
|||||||
<route type="mix" sink="Telephony Tx"
|
<route type="mix" sink="Telephony Tx"
|
||||||
sources="voice_tx"/>
|
sources="voice_tx"/>
|
||||||
<route type="mix" sink="primary input"
|
<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"
|
<route type="mix" sink="surround_sound"
|
||||||
sources="Built-In Mic,Built-In Back Mic,Telephony Rx"/>
|
sources="Built-In Mic,Built-In Back Mic,Telephony Rx"/>
|
||||||
<route type="mix" sink="Telephony Tx"
|
<route type="mix" sink="Telephony Tx"
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|
||||||
# UART device port where Bluetooth controller is attached (default ttyS1)
|
# UART device port where Bluetooth controller is attached (default ttyS1)
|
||||||
UartPort = /dev/ttyHS0
|
#UartPort = /dev/ttyHS0
|
||||||
|
|
||||||
#UartPort = /dev/brcm_bt_drv
|
UartPort = /dev/brcm_bt_drv
|
||||||
#UimUartPort = /dev/ttyHS0
|
UimUartPort = /dev/ttyHS0
|
||||||
|
|
||||||
# Target Baudrate to change to if different from 3000000
|
# Target Baudrate to change to if different from 3000000
|
||||||
# This entry is mandatory if using V4L2
|
# This entry is mandatory if using V4L2
|
||||||
|
@ -151,6 +151,16 @@ PRODUCT_PACKAGES += \
|
|||||||
libtinyxml \
|
libtinyxml \
|
||||||
memtrack.msm8994
|
memtrack.msm8994
|
||||||
|
|
||||||
|
# DumpState
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
android.hardware.dumpstate@1.1-service-kitakami
|
||||||
|
|
||||||
|
# FM
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
FMRadio \
|
||||||
|
brcm-uim-sysfs \
|
||||||
|
libfmradio.v4l2-fm
|
||||||
|
|
||||||
# Gatekeeper
|
# Gatekeeper
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.gatekeeper@1.0-impl
|
android.hardware.gatekeeper@1.0-impl
|
||||||
|
17
sepolicy/vendor/brcm_uim.te
vendored
Normal file
17
sepolicy/vendor/brcm_uim.te
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
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;
|
3
sepolicy/vendor/file.te
vendored
3
sepolicy/vendor/file.te
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# FM
|
||||||
|
type brcm_ldisc_sysfs, sysfs_type, fs_type;
|
||||||
|
|
||||||
# TAD
|
# TAD
|
||||||
type tad_socket, file_type;
|
type tad_socket, file_type;
|
||||||
type ta_data_file, file_type;
|
type ta_data_file, file_type;
|
||||||
|
6
sepolicy/vendor/file_contexts
vendored
6
sepolicy/vendor/file_contexts
vendored
@ -22,6 +22,12 @@
|
|||||||
# Camera
|
# Camera
|
||||||
/sys/devices(/soc\.0)?/pmi8994-flash-27(/.*)? u:object_r:sysfs_camera_torch:s0
|
/sys/devices(/soc\.0)?/pmi8994-flash-27(/.*)? u:object_r:sysfs_camera_torch:s0
|
||||||
|
|
||||||
|
# Dumpstate HAL
|
||||||
|
/(vendor|system/vendor)/bin/hw/android\.hardware\.dumpstate@1\.1-service-kitakami u:object_r:hal_dumpstate_impl_exec:s0
|
||||||
|
|
||||||
|
# FM
|
||||||
|
/(vendor|system/vendor)/bin/brcm-uim-sysfs u:object_r:brcm_uim_exec:s0
|
||||||
|
|
||||||
# HCI
|
# HCI
|
||||||
/dev/ttyHS0 u:object_r:hci_attach_dev:s0
|
/dev/ttyHS0 u:object_r:hci_attach_dev:s0
|
||||||
/dev/brcm_bt_drv u:object_r:hci_attach_dev:s0
|
/dev/brcm_bt_drv u:object_r:hci_attach_dev:s0
|
||||||
|
7
sepolicy/vendor/te_macros
vendored
Normal file
7
sepolicy/vendor/te_macros
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# 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;
|
||||||
|
')
|
Loading…
Reference in New Issue
Block a user