linux-amazon-douglas: disable sound in kernel (MR 1304)

Accessing the sound system causes freezes of the system, so it is
disabled for now.
This commit is contained in:
Shuhao Wu 2020-06-14 21:48:20 -04:00 committed by Alexey Min
parent 552c5c93bc
commit 1a72946609
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
3 changed files with 72 additions and 145 deletions

View file

@ -32,6 +32,7 @@ _config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/shuhaowu/$_repository/archive/$_commit.tar.gz
$_config
disable-sound.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
@ -52,4 +53,5 @@ package() {
}
sha512sums="eb3804fcbadb268429640a5171ea4788cf8974444a1aa1005801902dbce1c4d67d88cb43d0cee259dc082161a92b285de0a0d18d721220f6d2dff84a179a7dc5 linux-amazon-douglas-4ff2b5a4534e275748920ba4ad105af36495bf89.tar.gz
49da89d9a12db904685da02d14e43f92af1d9375cda9644592a898089b45e246214b8eab9a8b23ddf742e23cceda4fd348d7088deb47c3bc0330affa7c48c148 config-amazon-douglas.aarch64"
573eeab95570c6e4cb514396e4dd4fea9ee0afb6474783298081e079930b84559ca68e8c24ab46f17344c3201f8d2ffdefce763c5731e85c17b1494ca60dfc1c config-amazon-douglas.aarch64
aed9fd018a6367214dd00aad9c376c93ed356efbd74e21b49316ab0a21bc372a2077eeed8810f66464544c5bbc7bca6c46985ef42e6cb8f95ad94a1644130d1c disable-sound.patch"

View file

@ -917,7 +917,6 @@ CONFIG_HAVE_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_SPI=y
CONFIG_REGMAP_MMIO=y
CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_FENCE_TRACE is not set
@ -2408,147 +2407,7 @@ CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
CONFIG_SOUND=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_COMPRESS_OFFLOAD=y
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_HRTIMER=y
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
CONFIG_SND_DEBUG_VERBOSE=y
CONFIG_SND_PCM_XRUN_DEBUG=y
CONFIG_SND_RAWMIDI_SEQ=y
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
# CONFIG_SND_EMU10K1_SEQ is not set
CONFIG_SND_DRIVERS=y
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_ALOOP is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
#
# HD-Audio
#
# CONFIG_SND_SPI is not set
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=y
# CONFIG_SND_USB_UA101 is not set
# CONFIG_SND_USB_CAIAQ is not set
# CONFIG_SND_USB_6FIRE is not set
# CONFIG_SND_USB_HIFACE is not set
# CONFIG_SND_BCD2000 is not set
CONFIG_SND_SOC=y
# CONFIG_SND_ATMEL_SOC is not set
# CONFIG_SND_DESIGNWARE_I2S is not set
#
# SoC Audio for Freescale CPUs
#
#
# Common SoC Audio options for Freescale CPUs:
#
# CONFIG_SND_SOC_FSL_ASRC is not set
# CONFIG_SND_SOC_FSL_SAI is not set
# CONFIG_SND_SOC_FSL_SSI is not set
# CONFIG_SND_SOC_FSL_SPDIF is not set
# CONFIG_SND_SOC_FSL_ESAI is not set
# CONFIG_SND_SOC_IMX_AUDMUX is not set
# CONFIG_MT_SND_SOC_V1 is not set
# CONFIG_MT_SND_SOC_V2 is not set
# CONFIG_MT_SND_SOC_V3 is not set
# CONFIG_MT_SND_SOC_6580 is not set
# CONFIG_MT_SND_SOC_6755 is not set
CONFIG_MT_SND_SOC_8163=y
# CONFIG_MT_SND_SOC_8163_AMZN is not set
# CONFIG_SND_I2S_MCLK is not set
# CONFIG_SND_SOC_8_MICS is not set
# CONFIG_MTK_SPEAKER is not set
# CONFIG_MTK_NXP_TFA9890 is not set
# CONFIG_SND_SOC_MT2701_EVB is not set
# CONFIG_MTK_ALIGN_24BIT_DATA_8BIT_0 is not set
# CONFIG_SND_SOC_MT2701_RT5640 is not set
# CONFIG_MTK_16BIT_IN_24BIT_OUT is not set
# CONFIG_SND_BT_SCO_I2S is not set
CONFIG_MTK_AUDIO_USE_SHARED_SRAM=y
CONFIG_SND_SOC_I2C_AND_SPI=y
#
# CODEC drivers
#
# CONFIG_SND_SOC_ADAU1701 is not set
# CONFIG_SND_SOC_AK4104 is not set
# CONFIG_SND_SOC_AK4554 is not set
# CONFIG_SND_SOC_AK4642 is not set
# CONFIG_SND_SOC_AK5386 is not set
# CONFIG_SND_SOC_ALC5623 is not set
# CONFIG_SND_SOC_CS35L32 is not set
# CONFIG_SND_SOC_CS42L52 is not set
# CONFIG_SND_SOC_CS42L56 is not set
# CONFIG_SND_SOC_CS42L73 is not set
# CONFIG_SND_SOC_CS4265 is not set
# CONFIG_SND_SOC_CS4270 is not set
# CONFIG_SND_SOC_CS4271 is not set
# CONFIG_SND_SOC_CS42XX8_I2C is not set
# CONFIG_SND_SOC_HDMI_CODEC is not set
# CONFIG_SND_SOC_ES8328 is not set
# CONFIG_SND_SOC_PCM1681 is not set
# CONFIG_SND_SOC_PCM1792A is not set
# CONFIG_SND_SOC_PCM512x_I2C is not set
# CONFIG_SND_SOC_PCM512x_SPI is not set
# CONFIG_SND_SOC_SGTL5000 is not set
# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set
# CONFIG_SND_SOC_SPDIF is not set
# CONFIG_SND_SOC_SSM2602_SPI is not set
# CONFIG_SND_SOC_SSM2602_I2C is not set
# CONFIG_SND_SOC_SSM4567 is not set
# CONFIG_SND_SOC_STA350 is not set
# CONFIG_SND_SOC_TAS2552 is not set
# CONFIG_SND_SOC_TAS5086 is not set
# CONFIG_SND_SOC_TLV320AIC31XX is not set
# CONFIG_SND_SOC_TLV320AIC3101 is not set
# CONFIG_SND_SOC_TLV320AIC3X is not set
# CONFIG_SND_SOC_WM8510 is not set
# CONFIG_SND_SOC_WM8523 is not set
# CONFIG_SND_SOC_WM8580 is not set
# CONFIG_SND_SOC_WM8711 is not set
# CONFIG_SND_SOC_WM8728 is not set
# CONFIG_SND_SOC_WM8731 is not set
# CONFIG_SND_SOC_WM8737 is not set
# CONFIG_SND_SOC_WM8741 is not set
# CONFIG_SND_SOC_WM8750 is not set
# CONFIG_SND_SOC_WM8753 is not set
# CONFIG_SND_SOC_WM8770 is not set
# CONFIG_SND_SOC_WM8776 is not set
# CONFIG_SND_SOC_WM8804 is not set
# CONFIG_SND_SOC_WM8903 is not set
# CONFIG_SND_SOC_WM8962 is not set
# CONFIG_SND_SOC_WM8978 is not set
# CONFIG_SND_SOC_TPA6130A2 is not set
CONFIG_SND_SIMPLE_CARD=y
CONFIG_SOUND_PRIME=y
# CONFIG_SOUND is not set
#
# HID support
@ -2572,7 +2431,6 @@ CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
# CONFIG_HID_PRODIKEYS is not set
# CONFIG_HID_CP2112 is not set
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
@ -3057,7 +2915,6 @@ CONFIG_STAGING=y
# CONFIG_RTLLIB is not set
# CONFIG_R8712U is not set
# CONFIG_R8188EU is not set
# CONFIG_LINE6_USB is not set
# CONFIG_BCM_WIMAX is not set
# CONFIG_FT1000 is not set

View file

@ -0,0 +1,68 @@
From 25b85f89a276fa67ef4c8fa1681020fc843adfd5 Mon Sep 17 00:00:00 2001
From: Shuhao Wu <shuhao@shuhaowu.com>
Date: Tue, 16 Jun 2020 23:58:01 -0400
Subject: [PATCH] Disable sound in kernel
Everytime the audio subsystem is accessed (such as via hwtest), the
device hangs. This causes problems as one cannot enter even simple DEs
like XFCE4 without freezes.
---
drivers/regulator/Kconfig | 1 +
drivers/usb/gadget/android.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 5173112b..432cb6d1 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -586,6 +586,7 @@ config REGULATOR_SKY81452
config REGULATOR_SYM827
tristate "Silergy SYM827 regulator"
depends on I2C
+ select REGMAP_I2C
help
Say y here to support for the Silergy SYM827.
The SYM827 is a high efficiency synchronous step down
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index 0ebdb434..b60743ee 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -41,7 +41,9 @@
#include "f_fs.c"
+#ifdef CONFIG_SOUND
#include "f_audio_source.c"
+#endif
#ifdef CONFIG_SND_RAWMIDI
#include "f_midi.c"
#endif
@@ -1675,6 +1677,7 @@ static struct android_usb_function accessory_function = {
.ctrlrequest = accessory_function_ctrlrequest,
};
+#ifdef CONFIG_SOUND
static int audio_source_function_init(struct android_usb_function *f,
struct usb_composite_dev *cdev)
{
@@ -1736,6 +1739,7 @@ static struct android_usb_function audio_source_function = {
.unbind_config = audio_source_function_unbind_config,
.attributes = audio_source_function_attributes,
};
+#endif
#ifdef CONFIG_MTK_C2K_SUPPORT
static int rawbulk_function_init(struct android_usb_function *f,
@@ -1886,7 +1890,9 @@ static struct android_usb_function *supported_functions[] = {
&rndis_function,
&mass_storage_function,
&accessory_function,
+#ifdef CONFIG_SOUND
&audio_source_function,
+#endif
#ifdef CONFIG_SND_RAWMIDI
&midi_function,
#endif
--
2.25.1