linux/sound/soc/codecs/hdac_hda.h
Bard Liao 2f3fb85b25
ASoC: hdac_hda: fix HDA patch loader support
The array size is irrelevant with SNDRV_CARDS. dev_index is from
codec address and the available codec number is HDA_MAX_CODECS.
Also, hda_pvt->fw is for a temporary use, no need to add a new extra
field in hdac_hda_priv{}.

Fixes: 842a62a75e ("ASoC: hdac_hda: add HDA patch loader support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230921064317.2120452-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-21 14:34:04 +01:00

35 lines
620 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright(c) 2015-18 Intel Corporation.
*/
#ifndef __HDAC_HDA_H__
#define __HDAC_HDA_H__
enum {
HDAC_ANALOG_DAI_ID = 0,
HDAC_DIGITAL_DAI_ID,
HDAC_ALT_ANALOG_DAI_ID,
HDAC_HDMI_0_DAI_ID,
HDAC_HDMI_1_DAI_ID,
HDAC_HDMI_2_DAI_ID,
HDAC_HDMI_3_DAI_ID,
HDAC_DAI_ID_NUM
};
struct hdac_hda_pcm {
int stream_tag[2];
unsigned int format_val[2];
};
struct hdac_hda_priv {
struct hda_codec *codec;
struct hdac_hda_pcm pcm[HDAC_DAI_ID_NUM];
bool need_display_power;
int dev_index;
};
struct hdac_ext_bus_ops *snd_soc_hdac_hda_get_ops(void);
#endif /* __HDAC_HDA_H__ */