acp-mach.h (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | acp-mach.h (0439eb4d94e0fc17c6dd3829fabd88c11773381d) |
---|---|
1/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2/* 3 * This file is provided under a dual BSD/GPLv2 license. When using or 4 * redistributing this file, you may do so under either license. 5 * 6 * Copyright(c) 2021 Advanced Micro Devices, Inc. All rights reserved. 7 * 8 * Author: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> 9 */ 10#ifndef __ACP_MACH_H 11#define __ACP_MACH_H 12 13#include <sound/core.h> 14#include <sound/jack.h> 15#include <sound/pcm_params.h> 16#include <sound/soc-dapm.h> 17#include <linux/input.h> 18#include <linux/module.h> 19#include <sound/soc.h> | 1/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2/* 3 * This file is provided under a dual BSD/GPLv2 license. When using or 4 * redistributing this file, you may do so under either license. 5 * 6 * Copyright(c) 2021 Advanced Micro Devices, Inc. All rights reserved. 7 * 8 * Author: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> 9 */ 10#ifndef __ACP_MACH_H 11#define __ACP_MACH_H 12 13#include <sound/core.h> 14#include <sound/jack.h> 15#include <sound/pcm_params.h> 16#include <sound/soc-dapm.h> 17#include <linux/input.h> 18#include <linux/module.h> 19#include <sound/soc.h> |
20#include <linux/gpio.h> 21#include <linux/gpio/consumer.h> | |
22 | 20 |
23#define EN_SPKR_GPIO_GB 0x11F 24#define EN_SPKR_GPIO_NONE -EINVAL 25 | |
26enum be_id { 27 HEADSET_BE_ID = 0, 28 AMP_BE_ID, 29 DMIC_BE_ID, 30}; 31 32enum cpu_endpoints { 33 NONE = 0, | 21enum be_id { 22 HEADSET_BE_ID = 0, 23 AMP_BE_ID, 24 DMIC_BE_ID, 25}; 26 27enum cpu_endpoints { 28 NONE = 0, |
29 I2S_HS, |
|
34 I2S_SP, 35 I2S_BT, 36 DMIC, 37}; 38 39enum codec_endpoints { 40 DUMMY = 0, 41 RT5682, 42 RT1019, 43 MAX98360A, 44 RT5682S, | 30 I2S_SP, 31 I2S_BT, 32 DMIC, 33}; 34 35enum codec_endpoints { 36 DUMMY = 0, 37 RT5682, 38 RT1019, 39 MAX98360A, 40 RT5682S, |
41 NAU8825, |
|
45}; 46 47struct acp_card_drvdata { 48 unsigned int hs_cpu_id; 49 unsigned int amp_cpu_id; 50 unsigned int dmic_cpu_id; 51 unsigned int hs_codec_id; 52 unsigned int amp_codec_id; 53 unsigned int dmic_codec_id; 54 unsigned int dai_fmt; 55 struct clk *wclk; 56 struct clk *bclk; | 42}; 43 44struct acp_card_drvdata { 45 unsigned int hs_cpu_id; 46 unsigned int amp_cpu_id; 47 unsigned int dmic_cpu_id; 48 unsigned int hs_codec_id; 49 unsigned int amp_codec_id; 50 unsigned int dmic_codec_id; 51 unsigned int dai_fmt; 52 struct clk *wclk; 53 struct clk *bclk; |
57 unsigned int gpio_spkr_en; | 54 bool soc_mclk; |
58}; 59 60int acp_sofdsp_dai_links_create(struct snd_soc_card *card); 61int acp_legacy_dai_links_create(struct snd_soc_card *card); | 55}; 56 57int acp_sofdsp_dai_links_create(struct snd_soc_card *card); 58int acp_legacy_dai_links_create(struct snd_soc_card *card); |
62int event_spkr_handler(struct snd_soc_dapm_widget *w, 63 struct snd_kcontrol *k, int event); | 59 |
64#endif | 60#endif |