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

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/wcd-clsh-v2.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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 
  3 #ifndef _WCD_CLSH_V2_H_
  4 #define _WCD_CLSH_V2_H_
  5 #include <sound/soc.h>
  6 
  7 enum wcd_clsh_event {
  8         WCD_CLSH_EVENT_PRE_DAC = 1,
  9         WCD_CLSH_EVENT_POST_PA,
 10 };
 11 
 12 /*
 13  * Basic states for Class H state machine.
 14  * represented as a bit mask within a u8 data type
 15  * bit 0: EAR mode
 16  * bit 1: HPH Left mode
 17  * bit 2: HPH Right mode
 18  * bit 3: Lineout mode
 19  */
 20 #define WCD_CLSH_STATE_IDLE     0
 21 #define WCD_CLSH_STATE_EAR      BIT(0)
 22 #define WCD_CLSH_STATE_HPHL     BIT(1)
 23 #define WCD_CLSH_STATE_HPHR     BIT(2)
 24 #define WCD_CLSH_STATE_LO       BIT(3)
 25 #define WCD_CLSH_STATE_AUX      BIT(4)
 26 #define WCD_CLSH_STATE_MAX      4
 27 #define WCD_CLSH_V3_STATE_MAX   5
 28 #define NUM_CLSH_STATES_V2      BIT(WCD_CLSH_STATE_MAX)
 29 #define NUM_CLSH_STATES_V3      BIT(WCD_CLSH_V3_STATE_MAX)
 30 
 31 enum wcd_clsh_mode {
 32         CLS_H_NORMAL = 0, /* Class-H Default */
 33         CLS_H_HIFI, /* Class-H HiFi */
 34         CLS_H_LP, /* Class-H Low Power */
 35         CLS_AB, /* Class-AB */
 36         CLS_H_LOHIFI, /* LoHIFI */
 37         CLS_H_ULP, /* Ultra Low power */
 38         CLS_AB_HIFI, /* Class-AB */
 39         CLS_AB_LP, /* Class-AB Low Power */
 40         CLS_AB_LOHIFI, /* Class-AB Low HIFI */
 41         CLS_NONE, /* None of the above modes */
 42 };
 43 
 44 enum wcd_codec_version {
 45         WCD9335  = 0,
 46         WCD934X  = 1,
 47         /* New CLSH after this */
 48         WCD937X  = 2,
 49         WCD938X  = 3,
 50         WCD939X  = 4,
 51 };
 52 struct wcd_clsh_ctrl;
 53 
 54 extern struct wcd_clsh_ctrl *wcd_clsh_ctrl_alloc(
 55                                 struct snd_soc_component *comp,
 56                                 int version);
 57 extern void wcd_clsh_ctrl_free(struct wcd_clsh_ctrl *ctrl);
 58 extern int wcd_clsh_ctrl_get_state(struct wcd_clsh_ctrl *ctrl);
 59 extern int wcd_clsh_ctrl_set_state(struct wcd_clsh_ctrl *ctrl,
 60                                    enum wcd_clsh_event clsh_event,
 61                                    int nstate,
 62                                    enum wcd_clsh_mode mode);
 63 extern void wcd_clsh_set_hph_mode(struct wcd_clsh_ctrl *ctrl,
 64                                   int mode);
 65 
 66 #endif /* _WCD_CLSH_V2_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