wm8737.c (2a9ae13a2641373d06e24f866c7427644c39bfea) | wm8737.c (fcd02e261bb3b1ae14830d33da5401c6c4ee9bcc) |
---|---|
1/* 2 * wm8737.c -- WM8737 ALSA SoC Audio driver 3 * 4 * Copyright 2010 Wolfson Microelectronics plc 5 * 6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 64 unchanged lines hidden (view full) --- 73 0, 0, TLV_DB_SCALE_ITEM(1300, 0, 0), 74 1, 1, TLV_DB_SCALE_ITEM(1800, 0, 0), 75 2, 2, TLV_DB_SCALE_ITEM(2800, 0, 0), 76 3, 3, TLV_DB_SCALE_ITEM(3300, 0, 0), 77}; 78static const DECLARE_TLV_DB_SCALE(pga_tlv, -9750, 50, 1); 79static const DECLARE_TLV_DB_SCALE(adc_tlv, -600, 600, 0); 80static const DECLARE_TLV_DB_SCALE(ng_tlv, -7800, 600, 0); | 1/* 2 * wm8737.c -- WM8737 ALSA SoC Audio driver 3 * 4 * Copyright 2010 Wolfson Microelectronics plc 5 * 6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 64 unchanged lines hidden (view full) --- 73 0, 0, TLV_DB_SCALE_ITEM(1300, 0, 0), 74 1, 1, TLV_DB_SCALE_ITEM(1800, 0, 0), 75 2, 2, TLV_DB_SCALE_ITEM(2800, 0, 0), 76 3, 3, TLV_DB_SCALE_ITEM(3300, 0, 0), 77}; 78static const DECLARE_TLV_DB_SCALE(pga_tlv, -9750, 50, 1); 79static const DECLARE_TLV_DB_SCALE(adc_tlv, -600, 600, 0); 80static const DECLARE_TLV_DB_SCALE(ng_tlv, -7800, 600, 0); |
81static const DECLARE_TLV_DB_SCALE(alc_max_tlv, -1200, 600, 0); 82static const DECLARE_TLV_DB_SCALE(alc_target_tlv, -1800, 100, 0); |
|
81 82static const char *micbias_enum_text[] = { 83 "25%", 84 "50%", 85 "75%", 86 "100%", 87}; 88 --- 9 unchanged lines hidden (view full) --- 98 99static const char *high_cutoff_text[] = { 100 "High", "Low" 101}; 102 103static const struct soc_enum high_3d = 104 SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 5, 2, high_cutoff_text); 105 | 83 84static const char *micbias_enum_text[] = { 85 "25%", 86 "50%", 87 "75%", 88 "100%", 89}; 90 --- 9 unchanged lines hidden (view full) --- 100 101static const char *high_cutoff_text[] = { 102 "High", "Low" 103}; 104 105static const struct soc_enum high_3d = 106 SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 5, 2, high_cutoff_text); 107 |
108static const char *alc_fn_text[] = { 109 "Disabled", "Right", "Left", "Stereo" 110}; 111 112static const struct soc_enum alc_fn = 113 SOC_ENUM_SINGLE(WM8737_ALC1, 7, 4, alc_fn_text); 114 115static const char *alc_hold_text[] = { 116 "0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms", 117 "170.56ms", "341.12ms", "682.24ms", "1.364s", "2.728s", "5.458s", 118 "10.916s", "21.832s", "43.691s" 119}; 120 121static const struct soc_enum alc_hold = 122 SOC_ENUM_SINGLE(WM8737_ALC2, 0, 16, alc_hold_text); 123 124static const char *alc_atk_text[] = { 125 "8.4ms", "16.8ms", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", 126 "1.075s", "2.15s", "4.3s", "8.6s" 127}; 128 129static const struct soc_enum alc_atk = 130 SOC_ENUM_SINGLE(WM8737_ALC3, 0, 11, alc_atk_text); 131 132static const char *alc_dcy_text[] = { 133 "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "1.075s", "2.15s", 134 "4.3s", "8.6s", "17.2s", "34.41s" 135}; 136 137static const struct soc_enum alc_dcy = 138 SOC_ENUM_SINGLE(WM8737_ALC3, 4, 11, alc_dcy_text); 139 |
|
106static const struct snd_kcontrol_new wm8737_snd_controls[] = { 107SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 108 6, 3, 0, micboost_tlv), 109SOC_DOUBLE_R("Mic Boost Switch", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 110 4, 1, 0), 111SOC_DOUBLE("Mic ZC Switch", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 112 3, 1, 0), 113 --- 13 unchanged lines hidden (view full) --- 127SOC_SINGLE("3D Depth", WM8737_3D_ENHANCE, 1, 15, 0), 128SOC_ENUM("3D Low Cut-off", low_3d), 129SOC_ENUM("3D High Cut-off", low_3d), 130SOC_SINGLE_TLV("3D ADC Volume", WM8737_3D_ENHANCE, 7, 1, 1, adc_tlv), 131 132SOC_SINGLE("Noise Gate Switch", WM8737_NOISE_GATE, 0, 1, 0), 133SOC_SINGLE_TLV("Noise Gate Threshold Volume", WM8737_NOISE_GATE, 2, 7, 0, 134 ng_tlv), | 140static const struct snd_kcontrol_new wm8737_snd_controls[] = { 141SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 142 6, 3, 0, micboost_tlv), 143SOC_DOUBLE_R("Mic Boost Switch", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 144 4, 1, 0), 145SOC_DOUBLE("Mic ZC Switch", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 146 3, 1, 0), 147 --- 13 unchanged lines hidden (view full) --- 161SOC_SINGLE("3D Depth", WM8737_3D_ENHANCE, 1, 15, 0), 162SOC_ENUM("3D Low Cut-off", low_3d), 163SOC_ENUM("3D High Cut-off", low_3d), 164SOC_SINGLE_TLV("3D ADC Volume", WM8737_3D_ENHANCE, 7, 1, 1, adc_tlv), 165 166SOC_SINGLE("Noise Gate Switch", WM8737_NOISE_GATE, 0, 1, 0), 167SOC_SINGLE_TLV("Noise Gate Threshold Volume", WM8737_NOISE_GATE, 2, 7, 0, 168 ng_tlv), |
169 170SOC_ENUM("ALC", alc_fn), 171SOC_SINGLE_TLV("ALC Max Gain Volume", WM8737_ALC1, 4, 7, 0, alc_max_tlv), 172SOC_SINGLE_TLV("ALC Target Volume", WM8737_ALC1, 0, 15, 0, alc_target_tlv), 173SOC_ENUM("ALC Hold Time", alc_hold), 174SOC_SINGLE("ALC ZC Switch", WM8737_ALC2, 4, 1, 0), 175SOC_ENUM("ALC Attack Time", alc_atk), 176SOC_ENUM("ALC Decay Time", alc_dcy), |
|
135}; 136 137static const char *linsel_text[] = { 138 "LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC", 139}; 140 141static const struct soc_enum linsel_enum = 142 SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_L, 7, 4, linsel_text); --- 571 unchanged lines hidden --- | 177}; 178 179static const char *linsel_text[] = { 180 "LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC", 181}; 182 183static const struct soc_enum linsel_enum = 184 SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_L, 7, 4, linsel_text); --- 571 unchanged lines hidden --- |