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

TOMOYO Linux Cross Reference
Linux/sound/pci/hda/cs35l41_hda.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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 ] ~

Diff markup

Differences between /sound/pci/hda/cs35l41_hda.h (Architecture i386) and /sound/pci/hda/cs35l41_hda.h (Architecture m68k)


  1 /* SPDX-License-Identifier: GPL-2.0                 1 /* SPDX-License-Identifier: GPL-2.0
  2  *                                                  2  *
  3  * CS35L41 ALSA HDA audio driver                    3  * CS35L41 ALSA HDA audio driver
  4  *                                                  4  *
  5  * Copyright 2021 Cirrus Logic, Inc.                5  * Copyright 2021 Cirrus Logic, Inc.
  6  *                                                  6  *
  7  * Author: Lucas Tanure <tanureal@opensource.c      7  * Author: Lucas Tanure <tanureal@opensource.cirrus.com>
  8  */                                                 8  */
  9                                                     9 
 10 #ifndef __CS35L41_HDA_H__                          10 #ifndef __CS35L41_HDA_H__
 11 #define __CS35L41_HDA_H__                          11 #define __CS35L41_HDA_H__
 12                                                    12 
 13 #include <linux/acpi.h>                            13 #include <linux/acpi.h>
 14 #include <linux/efi.h>                             14 #include <linux/efi.h>
 15 #include <linux/regulator/consumer.h>              15 #include <linux/regulator/consumer.h>
 16 #include <linux/gpio/consumer.h>                   16 #include <linux/gpio/consumer.h>
 17 #include <linux/device.h>                          17 #include <linux/device.h>
 18 #include <sound/cs35l41.h>                         18 #include <sound/cs35l41.h>
 19 #include <sound/cs-amp-lib.h>                      19 #include <sound/cs-amp-lib.h>
 20                                                    20 
 21 #include <linux/firmware/cirrus/cs_dsp.h>          21 #include <linux/firmware/cirrus/cs_dsp.h>
 22 #include <linux/firmware/cirrus/wmfw.h>            22 #include <linux/firmware/cirrus/wmfw.h>
 23                                                    23 
 24 #define CS35L41_MAX_ACCEPTABLE_SPI_SPEED_HZ        24 #define CS35L41_MAX_ACCEPTABLE_SPI_SPEED_HZ     1000000
 25 #define DEFAULT_AMP_GAIN_PCM                       25 #define DEFAULT_AMP_GAIN_PCM                    17      /* 17.5dB Gain */
 26 #define DEFAULT_AMP_GAIN_PDM                       26 #define DEFAULT_AMP_GAIN_PDM                    19      /* 19.5dB Gain */
 27                                                    27 
 28 struct cs35l41_amp_cal_data {                      28 struct cs35l41_amp_cal_data {
 29         u32 calTarget[2];                          29         u32 calTarget[2];
 30         u32 calTime[2];                            30         u32 calTime[2];
 31         s8 calAmbient;                             31         s8 calAmbient;
 32         u8 calStatus;                              32         u8 calStatus;
 33         u16 calR;                                  33         u16 calR;
 34 } __packed;                                        34 } __packed;
 35                                                    35 
 36 struct cs35l41_amp_efi_data {                      36 struct cs35l41_amp_efi_data {
 37         u32 size;                                  37         u32 size;
 38         u32 count;                                 38         u32 count;
 39         struct cs35l41_amp_cal_data data[];        39         struct cs35l41_amp_cal_data data[];
 40 } __packed;                                        40 } __packed;
 41                                                    41 
 42 enum cs35l41_hda_spk_pos {                         42 enum cs35l41_hda_spk_pos {
 43         CS35L41_LEFT,                              43         CS35L41_LEFT,
 44         CS35L41_RIGHT,                             44         CS35L41_RIGHT,
 45 };                                                 45 };
 46                                                    46 
 47 enum cs35l41_hda_gpio_function {                   47 enum cs35l41_hda_gpio_function {
 48         CS35L41_NOT_USED,                          48         CS35L41_NOT_USED,
 49         CS35l41_VSPK_SWITCH,                       49         CS35l41_VSPK_SWITCH,
 50         CS35L41_INTERRUPT,                         50         CS35L41_INTERRUPT,
 51         CS35l41_SYNC,                              51         CS35l41_SYNC,
 52 };                                                 52 };
 53                                                    53 
 54 enum control_bus {                                 54 enum control_bus {
 55         I2C,                                       55         I2C,
 56         SPI                                        56         SPI
 57 };                                                 57 };
 58                                                    58 
 59 struct cs35l41_hda {                               59 struct cs35l41_hda {
 60         struct device *dev;                        60         struct device *dev;
 61         struct regmap *regmap;                     61         struct regmap *regmap;
 62         struct gpio_desc *reset_gpio;              62         struct gpio_desc *reset_gpio;
 63         struct gpio_desc *cs_gpio;                 63         struct gpio_desc *cs_gpio;
 64         struct cs35l41_hw_cfg hw_cfg;              64         struct cs35l41_hw_cfg hw_cfg;
 65         struct hda_codec *codec;                   65         struct hda_codec *codec;
 66                                                    66 
 67         int irq;                                   67         int irq;
 68         int index;                                 68         int index;
 69         int channel_index;                         69         int channel_index;
 70         unsigned volatile long irq_errors;         70         unsigned volatile long irq_errors;
 71         const char *amp_name;                      71         const char *amp_name;
 72         const char *acpi_subsystem_id;             72         const char *acpi_subsystem_id;
 73         int firmware_type;                         73         int firmware_type;
 74         int speaker_id;                            74         int speaker_id;
 75         struct mutex fw_mutex;                     75         struct mutex fw_mutex;
 76         struct work_struct fw_load_work;           76         struct work_struct fw_load_work;
 77                                                    77 
 78         struct regmap_irq_chip_data *irq_data;     78         struct regmap_irq_chip_data *irq_data;
 79         bool firmware_running;                     79         bool firmware_running;
 80         bool request_fw_load;                      80         bool request_fw_load;
 81         bool fw_request_ongoing;                   81         bool fw_request_ongoing;
 82         bool halo_initialized;                     82         bool halo_initialized;
 83         bool playback_started;                     83         bool playback_started;
 84         struct cs_dsp cs_dsp;                      84         struct cs_dsp cs_dsp;
 85         struct acpi_device *dacpi;                 85         struct acpi_device *dacpi;
 86         bool mute_override;                        86         bool mute_override;
 87         enum control_bus control_bus;              87         enum control_bus control_bus;
 88         bool bypass_fw;                            88         bool bypass_fw;
 89         unsigned int tuning_gain;                  89         unsigned int tuning_gain;
 90         struct cirrus_amp_cal_data cal_data;       90         struct cirrus_amp_cal_data cal_data;
 91         bool cal_data_valid;                       91         bool cal_data_valid;
 92                                                    92 
 93 };                                                 93 };
 94                                                    94 
 95 enum halo_state {                                  95 enum halo_state {
 96         HALO_STATE_CODE_INIT_DOWNLOAD = 0,         96         HALO_STATE_CODE_INIT_DOWNLOAD = 0,
 97         HALO_STATE_CODE_START,                     97         HALO_STATE_CODE_START,
 98         HALO_STATE_CODE_RUN                        98         HALO_STATE_CODE_RUN
 99 };                                                 99 };
100                                                   100 
101 extern const struct dev_pm_ops cs35l41_hda_pm_    101 extern const struct dev_pm_ops cs35l41_hda_pm_ops;
102                                                   102 
103 int cs35l41_hda_probe(struct device *dev, cons    103 int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq,
104                       struct regmap *regmap, e    104                       struct regmap *regmap, enum control_bus control_bus);
105 void cs35l41_hda_remove(struct device *dev);      105 void cs35l41_hda_remove(struct device *dev);
106 int cs35l41_get_speaker_id(struct device *dev,    106 int cs35l41_get_speaker_id(struct device *dev, int amp_index, int num_amps, int fixed_gpio_id);
107 int cs35l41_hda_parse_acpi(struct cs35l41_hda     107 int cs35l41_hda_parse_acpi(struct cs35l41_hda *cs35l41, struct device *physdev, int id);
108                                                   108 
109 #endif /*__CS35L41_HDA_H__*/                      109 #endif /*__CS35L41_HDA_H__*/
110                                                   110 

~ [ 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