Advertisement
Guest User

Untitled

a guest
Jan 10th, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. matt@olxdev:~/linux-sunxi-new/linux-sunxi$ diff -u sound/soc/sunxi/sunxi-codec.c /home/matt/sunxi-codec.c.works
  2. --- sound/soc/sunxi/sunxi-codec.c 2014-01-10 19:17:17.545978890 +0000
  3. +++ /home/matt/sunxi-codec.c.works 2014-01-10 19:12:11.133990274 +0000
  4. @@ -510,31 +510,15 @@
  5. };
  6.  
  7. static const struct snd_kcontrol_new codec_adc_controls[] = {
  8. - CODEC_SINGLE("Master Capture Mute",SUNXI_ADC_ACTL,4,1,0),
  9. - CODEC_SINGLE("Right Capture Mute",SUNXI_ADC_ACTL,31,1,0),
  10. - CODEC_SINGLE("Left Capture Mute",SUNXI_ADC_ACTL,30,1,0),
  11. CODEC_SINGLE("Capture Volume",SUNXI_ADC_ACTL,20,7,0),//录音音量
  12. - CODEC_SINGLE("Line Volume",SUNXI_ADC_ACTL,13,7,0),
  13. CODEC_SINGLE("MicL Volume",SUNXI_ADC_ACTL,25,3,0),//mic左音量
  14. CODEC_SINGLE("MicR Volume",SUNXI_ADC_ACTL,23,3,0),//mic右音量
  15. - CODEC_SINGLE("Mic2 Boost",SUNXI_ADC_ACTL,29,1,0),
  16. - CODEC_SINGLE("Mic1 Boost",SUNXI_ADC_ACTL,28,1,0),
  17. - CODEC_SINGLE("Mic Power",SUNXI_ADC_ACTL,27,1,0),
  18. CODEC_SINGLE("ADC Input Mux",SUNXI_ADC_ACTL,17,7,0),//ADC输入静音
  19. };
  20.  
  21. static const struct snd_kcontrol_new sun7i_dac_ctls[] = {
  22. /*SUNXI_DAC_ACTL = 0x10,PAVOL*/
  23. CODEC_SINGLE("Master Playback Volume", SUNXI_DAC_ACTL, 0, 0x3f, 0),
  24. - CODEC_SINGLE("Playback Switch", SUNXI_DAC_ACTL,6,1,0),//全局输出开关
  25. - CODEC_SINGLE("FmL Switch",SUNXI_DAC_ACTL,17,1,0),//Fm左开关
  26. - CODEC_SINGLE("FmR Switch",SUNXI_DAC_ACTL,16,1,0),//Fm右开关
  27. - CODEC_SINGLE("LineL Switch",SUNXI_DAC_ACTL,19,1,0),//Line左开关
  28. - CODEC_SINGLE("LineR Switch",SUNXI_DAC_ACTL,18,1,0),//Line右开关
  29. - CODEC_SINGLE("Ldac Left Mixer",SUNXI_DAC_ACTL,15,1,0),
  30. - CODEC_SINGLE("Rdac Right Mixer",SUNXI_DAC_ACTL,14,1,0),
  31. - CODEC_SINGLE("Ldac Right Mixer",SUNXI_DAC_ACTL,13,1,0),
  32. - CODEC_SINGLE("Mic Input Mux",SUNXI_DAC_ACTL,9,15,0),//from bit 9 to bit 12.Mic(麦克风)输入静音
  33. CODEC_SINGLE("MIC output volume", SUNXI_DAC_ACTL, 20, 7, 0),
  34. /* FM Input to output mixer Gain Control
  35. * From -4.5db to 6db,1.5db/step,default is 0db
  36. @@ -549,9 +533,9 @@
  37. };
  38.  
  39. static const struct snd_kcontrol_new sun7i_adc_ctls[] = {
  40. - CODEC_SINGLE("Master Capture Mute",SUNXI_ADC_ACTL,4,1,0),
  41. - CODEC_SINGLE("Right Capture Mute",SUNXI_ADC_ACTL,31,1,0),
  42. - CODEC_SINGLE("Left Capture Mute",SUNXI_ADC_ACTL,30,1,0),
  43. + CODEC_SINGLE("ADC Input Mux",SUNXI_ADC_ACTL,17,7,0),//ADC输入静音
  44. + CODEC_SINGLE("Linein Pre-AMP", SUNXI_ADC_ACTL, 13, 7, 0),
  45. + CODEC_SINGLE("Line Volume",SUNXI_DAC_ACTL,26,1,0),//Line音量
  46. CODEC_SINGLE("LINEIN APM Volume", SUNXI_MIC_CRT, 13, 0x7, 0),
  47. /* ADC Input Gain Control, capture volume
  48. * 000:-4.5db,001:-3db,010:-1.5db,011:0db,100:1.5db,101:3db,110:4.5db,111:6db
  49. @@ -561,12 +545,6 @@
  50. * MIC2 pre-amplifier Gain Control
  51. * 00:0db,01:35db,10:38db,11:41db
  52. */
  53. - CODEC_SINGLE("MicL Volume",SUNXI_ADC_ACTL,25,3,0),//mic左音量
  54. - CODEC_SINGLE("MicR Volume",SUNXI_ADC_ACTL,23,3,0),//mic右音量
  55. - CODEC_SINGLE("Mic2 Boost",SUNXI_ADC_ACTL,29,1,0),
  56. - CODEC_SINGLE("Mic1 Boost",SUNXI_ADC_ACTL,28,1,0),
  57. - CODEC_SINGLE("Mic Power",SUNXI_ADC_ACTL,27,1,0),
  58. - CODEC_SINGLE("ADC Input Mux",SUNXI_ADC_ACTL,17,7,0),//ADC输入静音
  59. CODEC_SINGLE("Mic2 gain Volume", SUNXI_MIC_CRT, 26, 7, 0),
  60. /*
  61. * MIC1 pre-amplifier Gain Control
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement