mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
634f3b4e7d
It is possible that during system boot when there multiple devices attempting simultaneous initialization on a slow control bus the download of firmware and tuning data may take a user perceivable amount of time (a slow I2C bus with 4 amps this work could take over 2 seconds). Adopt a pattern used in the ASoC driver and perform this activity in a background thread so that interactive performance is not impaired. The system_long_wq is a parallel workqueue and driver instances will perform their firmware downloads in parallel to make best use of available bus bandwidth. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://lore.kernel.org/20240618130011.62860-1-simont@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only
|
|
*
|
|
* HDA audio driver for Cirrus Logic CS35L56 smart amp
|
|
*
|
|
* Copyright (C) 2023 Cirrus Logic, Inc. and
|
|
* Cirrus Logic International Semiconductor Ltd.
|
|
*/
|
|
|
|
#ifndef __CS35L56_HDA_H__
|
|
#define __CS35L56_HDA_H__
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/gpio/consumer.h>
|
|
#include <linux/firmware/cirrus/cs_dsp.h>
|
|
#include <linux/firmware/cirrus/wmfw.h>
|
|
#include <linux/regulator/consumer.h>
|
|
#include <linux/workqueue.h>
|
|
#include <sound/cs35l56.h>
|
|
|
|
struct dentry;
|
|
|
|
struct cs35l56_hda {
|
|
struct cs35l56_base base;
|
|
struct hda_codec *codec;
|
|
struct work_struct dsp_work;
|
|
struct work_struct control_work;
|
|
|
|
int index;
|
|
const char *system_name;
|
|
const char *amp_name;
|
|
|
|
struct cs_dsp cs_dsp;
|
|
bool playing;
|
|
bool suspended;
|
|
u8 asp_tx_mask;
|
|
|
|
struct snd_kcontrol *posture_ctl;
|
|
struct snd_kcontrol *volume_ctl;
|
|
struct snd_kcontrol *mixer_ctl[4];
|
|
|
|
#if IS_ENABLED(CONFIG_SND_DEBUG)
|
|
struct dentry *debugfs_root;
|
|
#endif
|
|
};
|
|
|
|
extern const struct dev_pm_ops cs35l56_hda_pm_ops;
|
|
|
|
int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id);
|
|
void cs35l56_hda_remove(struct device *dev);
|
|
|
|
#endif /*__CS35L56_HDA_H__*/
|