Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. diff -bur -x .git msm8996-O/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c msm8996-O2/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
  2. --- msm8996-O/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c 2017-11-23 04:30:52.273658118 -0600
  3. +++ msm8996-O2/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c 2017-11-23 04:25:03.391528272 -0600
  4. @@ -572,6 +572,28 @@
  5. return 0;
  6. }
  7.  
  8. +static int msm_afe_lb_vol_ctrl_mmi;
  9. +static const DECLARE_TLV_DB_LINEAR(afe_lb_vol_gain_mmi, 0, INT_RX_VOL_MAX_STEPS);
  10. +
  11. +static int msm_qti_pp_get_slimbus_0_tx_lb_vol_mixer(struct snd_kcontrol *kcontrol,
  12. + struct snd_ctl_elem_value *ucontrol)
  13. +{
  14. + ucontrol->value.integer.value[0] = msm_afe_lb_vol_ctrl_mmi;
  15. + return 0;
  16. +}
  17. +
  18. +static int msm_qti_pp_set_slimbus_0_tx_lb_vol_mixer(struct snd_kcontrol *kcontrol,
  19. + struct snd_ctl_elem_value *ucontrol)
  20. +{
  21. + afe_loopback_gain(SLIMBUS_0_TX,
  22. + ucontrol->value.integer.value[0]);
  23. + pr_info("%s: mmi vol %ld\n", __func__, ucontrol->value.integer.value[0]);
  24. +
  25. + msm_afe_lb_vol_ctrl_mmi = ucontrol->value.integer.value[0];
  26. +
  27. + return 0;
  28. +}
  29. +
  30. static int msm_qti_pp_get_channel_map_mixer(struct snd_kcontrol *kcontrol,
  31. struct snd_ctl_elem_value *ucontrol)
  32. {
  33. @@ -856,6 +878,12 @@
  34. sec_auxpcm_lb_vol_gain),
  35. };
  36.  
  37. +static const struct snd_kcontrol_new int_mmi_vol_mixer_controls[] = {
  38. + SOC_SINGLE_EXT_TLV("SLIMBUS LOOPBACK Volume", SND_SOC_NOPM, 0,
  39. + INT_RX_VOL_GAIN, 0, msm_qti_pp_get_slimbus_0_tx_lb_vol_mixer,
  40. + msm_qti_pp_set_slimbus_0_tx_lb_vol_mixer, afe_lb_vol_gain_mmi),
  41. +};
  42. +
  43. static const struct snd_kcontrol_new multi_ch_channel_map_mixer_controls[] = {
  44. SOC_SINGLE_MULTI_EXT("Playback Device Channel Map", SND_SOC_NOPM, 0, 16,
  45. 0, 8, msm_qti_pp_get_channel_map_mixer,
  46. @@ -1060,4 +1088,7 @@
  47.  
  48. snd_soc_add_platform_controls(platform, msm_multichannel_ec_controls,
  49. ARRAY_SIZE(msm_multichannel_ec_controls));
  50. +
  51. + snd_soc_add_platform_controls(platform, int_mmi_vol_mixer_controls,
  52. + ARRAY_SIZE(int_mmi_vol_mixer_controls));
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement