/arch/arm/mach-fsm/include/mach/qdsp5v2/qdsp5afecmdi.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase · C++ Header · 83 lines · 45 code · 10 blank · 28 comment · 0 complexity · 6b36cc6e3d2312e9126153f2e63befe3 MD5 · raw file

  1. /* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
  2. *
  3. * Redistribution and use in source and binary forms, with or without
  4. * modification, are permitted provided that the following conditions are
  5. * met:
  6. * * Redistributions of source code must retain the above copyright
  7. * notice, this list of conditions and the following disclaimer.
  8. * * Redistributions in binary form must reproduce the above
  9. * copyright notice, this list of conditions and the following
  10. * disclaimer in the documentation and/or other materials provided
  11. * with the distribution.
  12. * * Neither the name of Code Aurora Forum, Inc. nor the names of its
  13. * contributors may be used to endorse or promote products derived
  14. * from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  17. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
  19. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
  20. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  21. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  22. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  23. * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  24. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  25. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  26. * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. *
  28. */
  29. #ifndef __MACH_QDSP5_V2_QDSP5AFECMDI_H
  30. #define __MACH_QDSP5_V2_QDSP5AFECMDI_H
  31. #define QDSP5_DEVICE_mI2S_CODEC_RX 1 /* internal codec rx path */
  32. #define QDSP5_DEVICE_mI2S_CODEC_TX 2 /* internal codec tx path */
  33. #define QDSP5_DEVICE_AUX_CODEC_RX 3 /* external codec rx path */
  34. #define QDSP5_DEVICE_AUX_CODEC_TX 4 /* external codec tx path */
  35. #define QDSP5_DEVICE_mI2S_HDMI_RX 5 /* HDMI/FM block rx path */
  36. #define QDSP5_DEVICE_mI2S_HDMI_TX 6 /* HDMI/FM block tx path */
  37. #define QDSP5_DEVICE_ID_MAX 7
  38. #define AFE_CMD_CODEC_CONFIG_CMD 0x1
  39. #define AFE_CMD_CODEC_CONFIG_LEN sizeof(struct afe_cmd_codec_config)
  40. struct afe_cmd_codec_config{
  41. uint16_t cmd_id;
  42. uint16_t device_id;
  43. uint16_t activity;
  44. uint16_t sample_rate;
  45. uint16_t channel_mode;
  46. uint16_t volume;
  47. uint16_t reserved;
  48. } __attribute__ ((packed));
  49. #define AFE_CMD_AUX_CODEC_CONFIG_CMD 0x3
  50. #define AFE_CMD_AUX_CODEC_CONFIG_LEN sizeof(struct afe_cmd_aux_codec_config)
  51. struct afe_cmd_aux_codec_config{
  52. uint16_t cmd_id;
  53. uint16_t dma_path_ctl;
  54. uint16_t pcm_ctl;
  55. uint16_t eight_khz_int_mode;
  56. uint16_t aux_codec_intf_ctl;
  57. uint16_t data_format_padding_info;
  58. } __attribute__ ((packed));
  59. #define AFE_CMD_FM_RX_ROUTING_CMD 0x6
  60. #define AFE_CMD_FM_RX_ROUTING_LEN sizeof(struct afe_cmd_fm_codec_config)
  61. struct afe_cmd_fm_codec_config{
  62. uint16_t cmd_id;
  63. uint16_t enable;
  64. uint16_t device_id;
  65. } __attribute__ ((packed));
  66. #define AFE_CMD_FM_PLAYBACK_VOLUME_CMD 0x8
  67. #define AFE_CMD_FM_PLAYBACK_VOLUME_LEN sizeof(struct afe_cmd_fm_volume_config)
  68. struct afe_cmd_fm_volume_config{
  69. uint16_t cmd_id;
  70. uint16_t volume;
  71. uint16_t reserved;
  72. } __attribute__ ((packed));
  73. #endif