mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
6f03b446cb
Add handling of the "spk-id-gpios" _DSD property. If present, the value indicated by the GPIOs is appended to the subsystem-id part of the firmware name to load the appropriate tunings for that speaker. Some manufacturers use multiple sources of speakers, which need different tunings for best performance. On these models the type of speaker fitted is indicated by the values of one or more GPIOs. The number formed by the GPIOs identifies the tuning required. The speaker ID is only used in combination with a _SUB identifier because the value is only meaningful if the exact model is known. The code to get the speaker ID value has been implemented as a new library so that the cs35l41_hda driver can be switched in future to share common code. This library can be extended for other common functionality shared by Cirrus Logic amp drivers. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230918095129.440-2-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 lines
343 B
C
14 lines
343 B
C
/* SPDX-License-Identifier: GPL-2.0
|
|
*
|
|
* Copyright (C) 2023 Cirrus Logic, Inc. and
|
|
* Cirrus Logic International Semiconductor Ltd.
|
|
*/
|
|
|
|
#ifndef CIRRUS_SCODEC_H
|
|
#define CIRRUS_SCODEC_H
|
|
|
|
int cirrus_scodec_get_speaker_id(struct device *dev, int amp_index,
|
|
int num_amps, int fixed_gpio_id);
|
|
|
|
#endif /* CIRRUS_SCODEC_H */
|