change sound driver to solve record wrong data format && can not play music && kernel other configs update

This commit is contained in:
wangzijiao 2018-12-25 19:34:39 +08:00
parent 6c5704361a
commit b7cbb88418
7 changed files with 562 additions and 344 deletions

View File

@ -9,6 +9,80 @@
#include "sun8iw15p1.dtsi"
/{
opp_dvfs_table:opp_dvfs_table {
cluster_num = <1>;
opp_table_count = <1>;
cpu_opp_l_table0: opp_l_table0 {
/* compatible = "operating-points-v2"; */
compatible = "allwinner,opp_l_table0";
opp_count = <5>;
opp-shared;
opp00 {
opp-hz = /bits/ 64 <480000000>;
opp-microvolt = <880000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp01 {
opp-hz = /bits/ 64 <720000000>;
opp-microvolt = <880000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp02 {
opp-hz = /bits/ 64 <816000000>;
opp-microvolt = <880000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp03 {
opp-hz = /bits/ 64 <1008000000>;
opp-microvolt = <880000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp04 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <940000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp05 {
opp-hz = /bits/ 64 <1416000000>;
opp-microvolt = <1000000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp06 {
opp-hz = /bits/ 64 <1512000000>;
opp-microvolt = <1040000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp07 {
opp-hz = /bits/ 64 <1608000000>;
opp-microvolt = <1160000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
opp08 {
opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <1160000>;
axi-bus-divide-ratio = <3>;
clock-latency-ns = <2000000>;
};
};
};
soc@03000000 {
wlan:wlan {
compatible = "allwinner,sunxi-wlan";
@ -35,5 +109,35 @@
bt_hostwake = <&r_pio PL 4 6 0 0 0>;
status = "okay";
};
pmu0: pmu0@0{
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";
powerkey0: powerkey@0{
status = "okay";
};
regulator0: regulator@0{
status = "okay";
};
axp_gpio0: axp_gpio@0{
gpio-controller;
#size-cells = <0>;
#gpio-cells = <6>;
status = "okay";
};
};
pmu1: pmu1@0{
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";
device_type = "pmu1";
charger0: charger@0{
status = "okay";
};
};
};
};

View File

@ -762,9 +762,9 @@ static void sunxi_hs_reg_init(struct mc_private *ctx)
(0x1 << HMICBIASEN), (0x1 << HMICBIASEN));
snd_soc_update_bits(ctx->codec, JACK_MIC_CTRL,
(0x1 << MICADCEN), (0x1 << MICADCEN));
snd_soc_update_bits(ctx->codec, SUNXI_HMIC_CTRL1,
(0x1 << MIC_DET_IRQ_EN),
(0x1 << MIC_DET_IRQ_EN));
//snd_soc_update_bits(ctx->codec, SUNXI_HMIC_CTRL1,
// (0x1 << MIC_DET_IRQ_EN),
// (0x1 << MIC_DET_IRQ_EN));
schedule_delayed_work(&ctx->hs_init_work, msecs_to_jiffies(10));
}

View File

@ -42,7 +42,6 @@
#define SUNXI_DAUDIO_EXTERNAL_TYPE 1
#define SUNXI_DAUDIO_TDMHDMI_TYPE 2
#if defined CONFIG_SND_SUN8IW8_ADC_TRIGGER_SYNC_WITH_OTHER_CODEC
#include "sun8iw8/sun8iw8_sndcodec.h"
#endif
@ -348,11 +347,17 @@ static void sunxi_daudio_rxctrl_enable(struct sunxi_daudio_info *sunxi_daudio,
(1 << CTL_RXEN), (1 << CTL_RXEN));
regmap_update_bits(sunxi_daudio->regmap, SUNXI_DAUDIO_INTCTL,
(1 << RXDRQEN), (1 << RXDRQEN));
#if defined CONFIG_SND_SUN8IW8_TRIGGER_SYNC_WITH_DAUDIO_CAPTURE
sun8iw8_codec_adc_drq_enable(1);
#endif
} else {
regmap_update_bits(sunxi_daudio->regmap, SUNXI_DAUDIO_INTCTL,
(1 << RXDRQEN), (0 << RXDRQEN));
regmap_update_bits(sunxi_daudio->regmap, SUNXI_DAUDIO_CTL,
(1 << CTL_RXEN), (0 << CTL_RXEN));
#if defined CONFIG_SND_SUN8IW8_TRIGGER_SYNC_WITH_DAUDIO_CAPTURE
sun8iw8_codec_adc_drq_enable(0);
#endif
}
}
@ -637,7 +642,7 @@ static int sunxi_daudio_hw_params(struct snd_pcm_substream *substream,
else
regmap_update_bits(sunxi_daudio->regmap, SUNXI_DAUDIO_FIFOCTL,
(SUNXI_DAUDIO_RXOM_MASK << RXOM),
(SUNXI_DAUDIO_RXOM_EXPH << RXOM));
(SUNXI_DAUDIO_RXOM_EXP0 << RXOM));
break;
case SNDRV_PCM_FORMAT_S32_LE:
regmap_update_bits(sunxi_daudio->regmap, SUNXI_DAUDIO_FMT0,
@ -1465,9 +1470,9 @@ static ssize_t daudio_class_debug_store(struct class *class,
int ret;
int rw_flag;
int reg_val_read;
int input_reg_val = 0;
int input_reg_group = 0;
int input_reg_offset = 0;
unsigned int input_reg_val = 0;
int input_reg_group = 0;
unsigned int input_reg_offset = 0;
int i = 0;
ret = sscanf(buf, "%d,%d,0x%x,0x%x", &rw_flag, &input_reg_group,

View File

@ -80,7 +80,7 @@ static int sunxi_snddaudio_hw_params(struct snd_pcm_substream *substream,
ret = snd_soc_dai_set_sysclk(codec_dai, 0, freq, 0);
if (ret < 0)
dev_warn(card->dev, "codec_dai set sysclk failed\n");
#if 0 //by leo
ret = snd_soc_dai_set_pll(codec_dai, 0, 0, freq, freq);
if (ret < 0) {
pr_warn("[daudio],the codec_dai set set_pll failed.\n");
@ -93,10 +93,11 @@ static int sunxi_snddaudio_hw_params(struct snd_pcm_substream *substream,
if (ret < 0) {
return ret;
}
#endif
/* set codec dai fmt */
ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_CBS_CFS);
SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
if (ret < 0)
dev_warn(card->dev, "codec dai set fmt failed\n");

@ -1 +1 @@
Subproject commit 5974f3a3638478d296e89bd0ec0ad4cc14addbfc
Subproject commit d7b4254835e164235d99c3aa45cd219f69a1ca8b

View File

@ -7,6 +7,7 @@ CONFIG_ADVISE_SYSCALLS=y
CONFIG_ALIGNMENT_TRAP=y
CONFIG_ANDROID=y
# CONFIG_ANDROID_BINDER_IPC is not set
# CONFIG_ANDROID_INTF_ALARM_DEV is not set
# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
# CONFIG_ANDROID_PARANOID_NETWORK is not set
# CONFIG_APM_EMULATION is not set
@ -30,8 +31,11 @@ CONFIG_ARCH_SUN8I=y
# CONFIG_ARCH_SUN8IW12 is not set
CONFIG_ARCH_SUN8IW15=y
CONFIG_ARCH_SUN8IW15P1=y
# CONFIG_ARCH_SUN8IW17 is not set
# CONFIG_ARCH_SUN8IW18 is not set
# CONFIG_ARCH_SUN8IW6 is not set
# CONFIG_ARCH_SUN8IW7 is not set
# CONFIG_ARCH_SUN8IW8 is not set
CONFIG_ARCH_SUNXI=y
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
@ -44,6 +48,7 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_ARM=y
CONFIG_ARM_ARCH_TIMER=y
# CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set
CONFIG_ARM_ARCH_TIMER_VCT_ACCESS=y
CONFIG_ARM_CPUIDLE=y
CONFIG_ARM_CPU_SUSPEND=y
CONFIG_ARM_ERRATA_643719=y
@ -75,8 +80,10 @@ CONFIG_ARM_VIRT_EXT=y
CONFIG_ATAGS=y
CONFIG_ATOMIC64_SELFTEST=y
CONFIG_AW_AXP=y
# CONFIG_AW_AXP22X is not set
CONFIG_AW_BMU1760=y
CONFIG_AW_PMU1736=y
# CONFIG_AXP_ARISC_TWI_USED is not set
# CONFIG_AXP_TWI_USED is not set
CONFIG_BCMDHD=m
CONFIG_BCMDHD_FW_PATH="/lib/firmware/fw_bcmdhd.bin"
@ -161,7 +168,6 @@ CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHED is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
@ -170,17 +176,18 @@ CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
# CONFIG_CPU_FREQ_GOV_SCHED is not set
# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_TIMES=y
CONFIG_CPU_HAS_ASID=y
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
# CONFIG_CPU_ICACHE_DISABLE is not set
CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_GOV_LADDER is not set
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
# CONFIG_CPU_NO_EFFICIENT_FFS is not set
CONFIG_CPU_PABRT_V7=y
CONFIG_CPU_PM=y
@ -232,6 +239,7 @@ CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
# CONFIG_CRYPTO_SHA3 is not set
# CONFIG_CRYPTO_SPECK is not set
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_RNG=y
@ -251,6 +259,7 @@ CONFIG_DEBUG_PREEMPT=y
CONFIG_DEBUG_RODATA=y
CONFIG_DEBUG_SUNXI_UART0=y
# CONFIG_DEBUG_SUNXI_UART1 is not set
# CONFIG_DEBUG_SUNXI_UART2 is not set
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
CONFIG_DEBUG_UART_8250=y
# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
@ -417,6 +426,7 @@ CONFIG_HAVE_UID16=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
# CONFIG_HDMI2_DISP2_SUNXI is not set
# CONFIG_HDMI_DISP2_SUNXI is not set
# CONFIG_HDMI_EP952_DISP2_SUNXI is not set
CONFIG_HID=y
# CONFIG_HID_ALPS is not set
# CONFIG_HID_CMEDIA is not set
@ -508,6 +518,7 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_IRQ_FORCED_THREADING=y
# CONFIG_IRQ_POLL is not set
CONFIG_IRQ_WORK=y
# CONFIG_IR_TX_SUNXI is not set
# CONFIG_ISA_BUS_API is not set
CONFIG_JBD2=y
CONFIG_JUMP_LABEL=y
@ -542,6 +553,8 @@ CONFIG_LIBFDT=y
# CONFIG_LNET is not set
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_LTO is not set
CONFIG_LTO_NONE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MAC80211=y
@ -568,6 +581,7 @@ CONFIG_MEDIA_SUPPORT=y
CONFIG_MEMORY_ISOLATION=y
# CONFIG_MEMORY_STATE_TIME is not set
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7
# CONFIG_MFD_AC100 is not set
# CONFIG_MFD_ACT8945A is not set
# CONFIG_MFD_ACX00 is not set
# CONFIG_MFD_AXP20X_I2C is not set
@ -579,6 +593,7 @@ CONFIG_MFD_CORE=y
# CONFIG_MFD_TPS65086 is not set
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
CONFIG_MIGRATION=y
CONFIG_MISC_PWM_LEDS=m
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
# CONFIG_MMC_EMBEDDED_SDIO is not set
@ -669,6 +684,7 @@ CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_PCI_SYSCALL is not set
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
# CONFIG_PHY_SUN9I_USB is not set
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GR8 is not set
# CONFIG_PINCTRL_SINGLE is not set
@ -677,15 +693,18 @@ CONFIG_PINCTRL=y
# CONFIG_PINCTRL_SUN5I_A13 is not set
# CONFIG_PINCTRL_SUN6I_A31 is not set
# CONFIG_PINCTRL_SUN6I_A31S is not set
# CONFIG_PINCTRL_SUN6I_A31_R is not set
# CONFIG_PINCTRL_SUN7I_A20 is not set
CONFIG_PINCTRL_SUN8IW15P1=y
CONFIG_PINCTRL_SUN8IW15P1_R=y
# CONFIG_PINCTRL_SUN8I_A23 is not set
# CONFIG_PINCTRL_SUN8I_A23_R is not set
# CONFIG_PINCTRL_SUN8I_A33 is not set
# CONFIG_PINCTRL_SUN8I_A83T is not set
# CONFIG_PINCTRL_SUN8I_H3 is not set
# CONFIG_PINCTRL_SUN8I_H3_R is not set
# CONFIG_PINCTRL_SUN9I_A80 is not set
# CONFIG_PINCTRL_SUN9I_A80_R is not set
CONFIG_PINCTRL_SUNXI=y
# CONFIG_PINCTRL_SUNXI_TEST is not set
# CONFIG_PL310_ERRATA_588369 is not set
@ -713,6 +732,7 @@ CONFIG_PREEMPT_RCU=y
CONFIG_PRINTK_NMI=y
CONFIG_PRINTK_TIME=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_UID=y
CONFIG_PROFILING=y
CONFIG_PWM=y
# CONFIG_PWM_SUN4I is not set
@ -740,6 +760,16 @@ CONFIG_REGULATOR=y
# CONFIG_REGULATOR_PV88060 is not set
# CONFIG_REGULATOR_PV88080 is not set
# CONFIG_REGULATOR_PV88090 is not set
# CONFIG_RESET_ATH79 is not set
# CONFIG_RESET_BERLIN is not set
CONFIG_RESET_CONTROLLER=y
# CONFIG_RESET_LPC18XX is not set
# CONFIG_RESET_MESON is not set
# CONFIG_RESET_PISTACHIO is not set
# CONFIG_RESET_SOCFPGA is not set
# CONFIG_RESET_STM32 is not set
CONFIG_RESET_SUNXI=y
# CONFIG_RESET_ZYNQ is not set
CONFIG_RFKILL=y
# CONFIG_RFKILL_GPIO is not set
CONFIG_RFKILL_INPUT=y
@ -757,8 +787,11 @@ CONFIG_RTC_CLASS=y
# CONFIG_RTC_DRV_RX8010 is not set
CONFIG_RTC_DRV_SUNXI=y
CONFIG_RTC_I2C_AND_SPI=y
# CONFIG_RTC_SHUTDOWN_ALARM is not set
# CONFIG_RTL8189ES is not set
# CONFIG_RTL8723BS_VQ0 is not set
# CONFIG_RTL8723CS is not set
# CONFIG_RTL8723DS is not set
# CONFIG_RTL_BT_LPM is not set
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@ -780,6 +813,7 @@ CONFIG_SCSI=y
# CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_SUNXI=y
CONFIG_SERIAL_SUNXI_CONSOLE=y
# CONFIG_SERIAL_SUNXI_DMA is not set
# CONFIG_SERIAL_SUNXI_EARLYCON is not set
CONFIG_SERIO=y
CONFIG_SERIO_LIBPS2=y
@ -802,7 +836,8 @@ CONFIG_SND_PROC_FS=y
CONFIG_SND_RAWMIDI=y
# CONFIG_SND_SIMPLE_SCU_CARD is not set
CONFIG_SND_SOC=y
CONFIG_SND_SOC_AD82584F=y
# CONFIG_SND_SOC_AC108 is not set
# CONFIG_SND_SOC_AD82584F is not set
# CONFIG_SND_SOC_ADAU7002 is not set
# CONFIG_SND_SOC_AMD_ACP is not set
# CONFIG_SND_SOC_BT_SCO is not set
@ -846,6 +881,7 @@ CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_SPIDEV=y
# CONFIG_SPI_SUN4I is not set
# CONFIG_SPI_SUN6I is not set
CONFIG_SPI_SUNXI=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XATTR=y
@ -911,15 +947,19 @@ CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_OF=y
# CONFIG_THUMB2_KERNEL is not set
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_TI_SYSCON_RESET is not set
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_TOUCHSCREEN_FT5X16_TS is not set
# CONFIG_TOUCHSCREEN_FTS is not set
# CONFIG_TOUCHSCREEN_GSLX680NEW is not set
# CONFIG_TOUCHSCREEN_GT82X is not set
# CONFIG_TOUCHSCREEN_GT9XXNEW_TS is not set
CONFIG_TOUCHSCREEN_GT9XX_TS=m
CONFIG_TOUCHSCREEN_PROPERTIES=y
# CONFIG_TOUCHSCREEN_SUN4I is not set
# CONFIG_TRIM_UNUSED_KSYMS is not set
# CONFIG_TV_DISP2_SUNXI is not set
# CONFIG_TYPE_C is not set
# CONFIG_UBSAN is not set
CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h"
CONFIG_UNINLINE_SPIN_UNLOCK=y
@ -1005,6 +1045,7 @@ CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_ENCODER_DECODER_SUNXI=y
CONFIG_VIDEO_GOOGLE_VP9_DECODER_SUNXI=y
# CONFIG_VIDEO_SUNXI_EVE is not set
# CONFIG_VIDEO_SUNXI_VFE is not set
CONFIG_VIDEO_SUNXI_VIN=m
CONFIG_VIDEO_V4L2=y
@ -1040,6 +1081,7 @@ CONFIG_XFRM_MIGRATE=y
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_USER=y
CONFIG_XPS=y
# CONFIG_XR829_WLAN is not set
# CONFIG_XR_WLAN is not set
CONFIG_XUNFEI_CPLD=y
CONFIG_ZBOOT_ROM_BSS=0

File diff suppressed because it is too large Load Diff