soc_amd_sdw_common.h 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-only
  2. * Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved
  3. */
  4. /*
  5. * soc_amd_sdw_common.h - prototypes for common helpers
  6. */
  7. #ifndef SOC_AMD_SDW_COMMON_H
  8. #define SOC_AMD_SDW_COMMON_H
  9. #include <linux/bits.h>
  10. #include <linux/types.h>
  11. #include <sound/soc.h>
  12. #include <sound/soc_sdw_utils.h>
  13. #define ACP63_SDW_MAX_CPU_DAIS 8
  14. #define ACP63_SDW_MAX_LINKS 2
  15. #define AMD_SDW_MAX_GROUPS 9
  16. #define ACP63_PCI_REV 0x63
  17. #define SOC_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0))
  18. #define ASOC_SDW_FOUR_SPK BIT(4)
  19. #define ASOC_SDW_ACP_DMIC BIT(5)
  20. #define AMD_SDW0 0
  21. #define AMD_SDW1 1
  22. #define ACP63_SW0_AUDIO0_TX 0
  23. #define ACP63_SW0_AUDIO1_TX 1
  24. #define ACP63_SW0_AUDIO2_TX 2
  25. #define ACP63_SW0_AUDIO0_RX 3
  26. #define ACP63_SW0_AUDIO1_RX 4
  27. #define ACP63_SW0_AUDIO2_RX 5
  28. #define ACP63_SW1_AUDIO0_TX 0
  29. #define ACP63_SW1_AUDIO0_RX 1
  30. struct amd_mc_ctx {
  31. unsigned int acp_rev;
  32. unsigned int max_sdw_links;
  33. };
  34. #endif