mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
ASOC: update wcd934x codec driver
Compile wcd934x driver for sm6150. Change-Id: Ia0f41d6f1de03ec41cddb0bc1cef5d62ac815cdf
This commit is contained in:
parent
389f9c7901
commit
374b84c9b5
3 changed files with 39 additions and 0 deletions
|
|
@ -147,6 +147,7 @@ ifdef CONFIG_WCD9XXX_CODEC_CORE
|
|||
WCD9XXX_OBJS += wcd9xxx-resmgr-v2.o
|
||||
WCD9XXX_OBJS += wcd-dsp-utils.o
|
||||
WCD9XXX_OBJS += wcd-dsp-mgr.o
|
||||
WCD9XXX_OBJS += wcd-clsh.o
|
||||
else
|
||||
WCD9XXX_OBJS += wcd-clsh.o
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
#include <linux/spi/spi.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <audio/linux/mfd/wcd9xxx/wcd9xxx_registers.h>
|
||||
#include <soc/swr-common.h>
|
||||
#include <soc/swr-wcd.h>
|
||||
#include <soc/snd_event.h>
|
||||
#include <sound/pcm.h>
|
||||
|
|
@ -748,6 +750,34 @@ void *tavil_get_afe_config(struct snd_soc_component *component,
|
|||
}
|
||||
EXPORT_SYMBOL(tavil_get_afe_config);
|
||||
|
||||
int tavil_set_port_map(struct snd_soc_component *component,
|
||||
u32 size, void *data)
|
||||
{
|
||||
|
||||
struct swr_mstr_port_map *map = NULL;
|
||||
struct swrm_port_config port_cfg;
|
||||
struct tavil_priv *priv = NULL;
|
||||
|
||||
if (!component || (size == 0) || !data)
|
||||
return -EINVAL;
|
||||
|
||||
priv = snd_soc_component_get_drvdata(component);
|
||||
|
||||
map = (struct swr_mstr_port_map *)data;
|
||||
|
||||
port_cfg.uc = map->uc;
|
||||
port_cfg.size = SWR_MSTR_PORT_LEN;
|
||||
port_cfg.params = map->swr_port_params;
|
||||
|
||||
|
||||
swrm_wcd_notify(
|
||||
priv->swr.ctrl_data[0].swr_pdev,
|
||||
SWR_SET_PORT_MAP, &port_cfg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(tavil_set_port_map);
|
||||
|
||||
static bool is_tavil_playback_dai(int dai_id)
|
||||
{
|
||||
if ((dai_id == AIF1_PB) || (dai_id == AIF2_PB) ||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#ifndef WCD934X_H
|
||||
#define WCD934X_H
|
||||
|
|
@ -129,6 +130,8 @@ struct tavil_reg_mask_val {
|
|||
#if IS_ENABLED(CONFIG_SND_SOC_WCD934X)
|
||||
extern void *tavil_get_afe_config(struct snd_soc_component *component,
|
||||
enum afe_config_type config_type);
|
||||
extern int tavil_set_port_map(struct snd_soc_component *component,
|
||||
u32 size, void *data);
|
||||
extern int tavil_cdc_mclk_enable(struct snd_soc_component *component,
|
||||
bool enable);
|
||||
extern int tavil_cdc_mclk_tx_enable(struct snd_soc_component *component,
|
||||
|
|
@ -159,6 +162,11 @@ extern void *tavil_get_afe_config(struct snd_soc_component *component,
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
extern int tavil_set_port_map(struct snd_soc_component *component,
|
||||
u32 size, void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
extern int tavil_cdc_mclk_enable(struct snd_soc_component *component,
|
||||
bool enable)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue