Common patch - kensuke/How-to-Miracast-on-AOSP GitHub Wiki
.
- View tilapia / grouper / maguro patch
- apply to all models: /frameworks/base/core/res/res/values/config.xml
- apply to specific model: /device/vendor/model/overray/frameworks/base/core/res/res/values/config.xml
- Reference(Nexus 4): /device/lge/mako/overlay/frameworks/base/core/res/res/values/config.xml
- <bool name="config_enableWifiDisplay">false</bool>
+ <bool name="config_enableWifiDisplay">true</bool>
"config_enableWifiDisplay"'s comment is helpful to Miracast porting.
<!-- Whether WiFi display is supported by this device.
There are many prerequisites for this feature to work correctly.
Here are a few of them:
* The WiFi radio must support WiFi P2P.
* The WiFi radio must support concurrent connections to the WiFi display and
to an access point.
* The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix"
remote submix module. This module is used to record and stream system
audio output to the WiFi display encoder in the media server.
* The remote submix module "audio.r_submix.default" must be installed on the device.
* The device must be provisioned with HDCP keys (for protected content).
-->
- View tilapia/grouper / maguro patch
- Reference(Nexus 4): /device/lge/mako/audio_policy.conf
+ r_submix {
+ outputs {
+ submix {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+ }
+ }
+ inputs {
+ submix {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ }
+ }
+ }
- View tilapia/grouper / maguro patch
- Reference(Nexus 4): /device/lge/mako/device.mk
PRODUCT_PACKAGES += \
alsa.msm8960 \
audio_policy.msm8960 \
audio.primary.msm8960 \
audio.a2dp.default \
audio.usb.default \
+ audio.r_submix.default \
libaudio-resampler
I/WifiDisplayController( 398): Initiated connection to Wifi display: Wifi display00:90:00:00:43:18
// ...
I/WifiDisplayController( 398): Connected to Wifi display: Wifi display00:90:00:00:43:18
E/AudioPolicyManagerBase( 131): setDeviceConnectionState() invalid remote submix audio device: 8000
E/MonoPipe( 131): Failed to fetch local time frequency when constructing a MonoPipe (res = -32). getNextWriteTimestamp calls will be non-functional
I/AudioFlinger( 131): HAL output buffer size 1024 frames, normal mix buffer size 1024 frames
I/AudioMixer( 131): found effect "Multichannel Downmix To Stereo" from The Android Open Source Project
I/AudioFlinger( 131): HAL output buffer size 1024 frames, normal mix buffer size 1024 frames
I/AudioFlinger( 131): AudioFlinger-s thread 0x41012008 ready to run
I/AudioMixer( 131): found effect "Multichannel Downmix To Stereo" from The Android Open Source Project
I/AudioFlinger( 131): AudioFlinger-s thread 0x40015008 ready to run
I/r_submix( 131): out_standby()
- View AOSP patch
- /packages/apps/Settings/src/com/android/settings/wfd/WifiDisplaySettings.java