aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-13 10:19:38 -0400
committerMark Brown <broonie@linaro.org>2014-03-13 10:19:38 -0400
commit57487c911d0c42f15c2a2c86e2df6deabde66179 (patch)
tree9758a4ca028a22fa3293f111575211d178b4fbb0 /sound/soc/codecs
parentbb198dc6454a4eb91725304341cb6a96517751d0 (diff)
parenta0628934d6d3fcca5588fd9617270f63c5387f1b (diff)
Merge remote-tracking branch 'asoc/topic/max98088' into asoc-next
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/max98088.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index d489b2d10eca..ef7cf89f5623 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -597,28 +597,27 @@ static const unsigned int max98088_exmode_values[] = {
597 0x00, 0x43, 0x10, 0x20, 0x30, 0x40, 0x11, 0x22, 0x32 597 0x00, 0x43, 0x10, 0x20, 0x30, 0x40, 0x11, 0x22, 0x32
598}; 598};
599 599
600static const struct soc_enum max98088_exmode_enum = 600static SOC_VALUE_ENUM_SINGLE_DECL(max98088_exmode_enum,
601 SOC_VALUE_ENUM_SINGLE(M98088_REG_41_SPKDHP, 0, 127, 601 M98088_REG_41_SPKDHP, 0, 127,
602 ARRAY_SIZE(max98088_exmode_texts), 602 max98088_exmode_texts,
603 max98088_exmode_texts, 603 max98088_exmode_values);
604 max98088_exmode_values);
605 604
606static const char *max98088_ex_thresh[] = { /* volts PP */ 605static const char *max98088_ex_thresh[] = { /* volts PP */
607 "0.6", "1.2", "1.8", "2.4", "3.0", "3.6", "4.2", "4.8"}; 606 "0.6", "1.2", "1.8", "2.4", "3.0", "3.6", "4.2", "4.8"};
608static const struct soc_enum max98088_ex_thresh_enum[] = { 607static SOC_ENUM_SINGLE_DECL(max98088_ex_thresh_enum,
609 SOC_ENUM_SINGLE(M98088_REG_42_SPKDHP_THRESH, 0, 8, 608 M98088_REG_42_SPKDHP_THRESH, 0,
610 max98088_ex_thresh), 609 max98088_ex_thresh);
611};
612 610
613static const char *max98088_fltr_mode[] = {"Voice", "Music" }; 611static const char *max98088_fltr_mode[] = {"Voice", "Music" };
614static const struct soc_enum max98088_filter_mode_enum[] = { 612static SOC_ENUM_SINGLE_DECL(max98088_filter_mode_enum,
615 SOC_ENUM_SINGLE(M98088_REG_18_DAI1_FILTERS, 7, 2, max98088_fltr_mode), 613 M98088_REG_18_DAI1_FILTERS, 7,
616}; 614 max98088_fltr_mode);
617 615
618static const char *max98088_extmic_text[] = { "None", "MIC1", "MIC2" }; 616static const char *max98088_extmic_text[] = { "None", "MIC1", "MIC2" };
619 617
620static const struct soc_enum max98088_extmic_enum = 618static SOC_ENUM_SINGLE_DECL(max98088_extmic_enum,
621 SOC_ENUM_SINGLE(M98088_REG_48_CFG_MIC, 0, 3, max98088_extmic_text); 619 M98088_REG_48_CFG_MIC, 0,
620 max98088_extmic_text);
622 621
623static const struct snd_kcontrol_new max98088_extmic_mux = 622static const struct snd_kcontrol_new max98088_extmic_mux =
624 SOC_DAPM_ENUM("External MIC Mux", max98088_extmic_enum); 623 SOC_DAPM_ENUM("External MIC Mux", max98088_extmic_enum);
@@ -626,12 +625,12 @@ static const struct snd_kcontrol_new max98088_extmic_mux =
626static const char *max98088_dai1_fltr[] = { 625static const char *max98088_dai1_fltr[] = {
627 "Off", "fc=258/fs=16k", "fc=500/fs=16k", 626 "Off", "fc=258/fs=16k", "fc=500/fs=16k",
628 "fc=258/fs=8k", "fc=500/fs=8k", "fc=200"}; 627 "fc=258/fs=8k", "fc=500/fs=8k", "fc=200"};
629static const struct soc_enum max98088_dai1_dac_filter_enum[] = { 628static SOC_ENUM_SINGLE_DECL(max98088_dai1_dac_filter_enum,
630 SOC_ENUM_SINGLE(M98088_REG_18_DAI1_FILTERS, 0, 6, max98088_dai1_fltr), 629 M98088_REG_18_DAI1_FILTERS, 0,
631}; 630 max98088_dai1_fltr);
632static const struct soc_enum max98088_dai1_adc_filter_enum[] = { 631static SOC_ENUM_SINGLE_DECL(max98088_dai1_adc_filter_enum,
633 SOC_ENUM_SINGLE(M98088_REG_18_DAI1_FILTERS, 4, 6, max98088_dai1_fltr), 632 M98088_REG_18_DAI1_FILTERS, 4,
634}; 633 max98088_dai1_fltr);
635 634
636static int max98088_mic1pre_set(struct snd_kcontrol *kcontrol, 635static int max98088_mic1pre_set(struct snd_kcontrol *kcontrol,
637 struct snd_ctl_elem_value *ucontrol) 636 struct snd_ctl_elem_value *ucontrol)