~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/sound/cs-amp-lib.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (C) 2024 Cirrus Logic, Inc. and
  4  *                    Cirrus Logic International Semiconductor Ltd.
  5  */
  6 
  7 #ifndef CS_AMP_LIB_H
  8 #define CS_AMP_LIB_H
  9 
 10 #include <linux/efi.h>
 11 #include <linux/types.h>
 12 
 13 struct cs_dsp;
 14 
 15 struct cirrus_amp_cal_data {
 16         u32 calTarget[2];
 17         u32 calTime[2];
 18         s8  calAmbient;
 19         u8  calStatus;
 20         u16 calR;
 21 } __packed;
 22 
 23 struct cirrus_amp_efi_data {
 24         u32 size;
 25         u32 count;
 26         struct cirrus_amp_cal_data data[];
 27 } __packed;
 28 
 29 /**
 30  * struct cirrus_amp_cal_controls - definition of firmware calibration controls
 31  * @alg_id:     ID of algorithm containing the controls.
 32  * @mem_region: DSP memory region containing the controls.
 33  * @ambient:    Name of control for calAmbient value.
 34  * @calr:       Name of control for calR value.
 35  * @status:     Name of control for calStatus value.
 36  * @checksum:   Name of control for checksum value.
 37  */
 38 struct cirrus_amp_cal_controls {
 39         unsigned int alg_id;
 40         int mem_region;
 41         const char *ambient;
 42         const char *calr;
 43         const char *status;
 44         const char *checksum;
 45 };
 46 
 47 int cs_amp_write_cal_coeffs(struct cs_dsp *dsp,
 48                             const struct cirrus_amp_cal_controls *controls,
 49                             const struct cirrus_amp_cal_data *data);
 50 int cs_amp_get_efi_calibration_data(struct device *dev, u64 target_uid, int amp_index,
 51                                     struct cirrus_amp_cal_data *out_data);
 52 
 53 struct cs_amp_test_hooks {
 54         efi_status_t (*get_efi_variable)(efi_char16_t *name,
 55                                          efi_guid_t *guid,
 56                                          unsigned long *size,
 57                                          void *buf);
 58 
 59         int (*write_cal_coeff)(struct cs_dsp *dsp,
 60                                const struct cirrus_amp_cal_controls *controls,
 61                                const char *ctl_name, u32 val);
 62 };
 63 
 64 extern const struct cs_amp_test_hooks * const cs_amp_test_hooks;
 65 
 66 #endif /* CS_AMP_LIB_H */
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php