aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8903.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index eebcb1da3b7b..b82b70a3b3d3 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -489,28 +489,28 @@ static const char *hpf_mode_text[] = {
489 "Hi-fi", "Voice 1", "Voice 2", "Voice 3" 489 "Hi-fi", "Voice 1", "Voice 2", "Voice 3"
490}; 490};
491 491
492static const struct soc_enum hpf_mode = 492static SOC_ENUM_SINGLE_DECL(hpf_mode,
493 SOC_ENUM_SINGLE(WM8903_ADC_DIGITAL_0, 5, 4, hpf_mode_text); 493 WM8903_ADC_DIGITAL_0, 5, hpf_mode_text);
494 494
495static const char *osr_text[] = { 495static const char *osr_text[] = {
496 "Low power", "High performance" 496 "Low power", "High performance"
497}; 497};
498 498
499static const struct soc_enum adc_osr = 499static SOC_ENUM_SINGLE_DECL(adc_osr,
500 SOC_ENUM_SINGLE(WM8903_ANALOGUE_ADC_0, 0, 2, osr_text); 500 WM8903_ANALOGUE_ADC_0, 0, osr_text);
501 501
502static const struct soc_enum dac_osr = 502static SOC_ENUM_SINGLE_DECL(dac_osr,
503 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 0, 2, osr_text); 503 WM8903_DAC_DIGITAL_1, 0, osr_text);
504 504
505static const char *drc_slope_text[] = { 505static const char *drc_slope_text[] = {
506 "1", "1/2", "1/4", "1/8", "1/16", "0" 506 "1", "1/2", "1/4", "1/8", "1/16", "0"
507}; 507};
508 508
509static const struct soc_enum drc_slope_r0 = 509static SOC_ENUM_SINGLE_DECL(drc_slope_r0,
510 SOC_ENUM_SINGLE(WM8903_DRC_2, 3, 6, drc_slope_text); 510 WM8903_DRC_2, 3, drc_slope_text);
511 511
512static const struct soc_enum drc_slope_r1 = 512static SOC_ENUM_SINGLE_DECL(drc_slope_r1,
513 SOC_ENUM_SINGLE(WM8903_DRC_2, 0, 6, drc_slope_text); 513 WM8903_DRC_2, 0, drc_slope_text);
514 514
515static const char *drc_attack_text[] = { 515static const char *drc_attack_text[] = {
516 "instantaneous", 516 "instantaneous",
@@ -518,125 +518,125 @@ static const char *drc_attack_text[] = {
518 "46.4ms", "92.8ms", "185.6ms" 518 "46.4ms", "92.8ms", "185.6ms"
519}; 519};
520 520
521static const struct soc_enum drc_attack = 521static SOC_ENUM_SINGLE_DECL(drc_attack,
522 SOC_ENUM_SINGLE(WM8903_DRC_1, 12, 11, drc_attack_text); 522 WM8903_DRC_1, 12, drc_attack_text);
523 523
524static const char *drc_decay_text[] = { 524static const char *drc_decay_text[] = {
525 "186ms", "372ms", "743ms", "1.49s", "2.97s", "5.94s", "11.89s", 525 "186ms", "372ms", "743ms", "1.49s", "2.97s", "5.94s", "11.89s",
526 "23.87s", "47.56s" 526 "23.87s", "47.56s"
527}; 527};
528 528
529static const struct soc_enum drc_decay = 529static SOC_ENUM_SINGLE_DECL(drc_decay,
530 SOC_ENUM_SINGLE(WM8903_DRC_1, 8, 9, drc_decay_text); 530 WM8903_DRC_1, 8, drc_decay_text);
531 531
532static const char *drc_ff_delay_text[] = { 532static const char *drc_ff_delay_text[] = {
533 "5 samples", "9 samples" 533 "5 samples", "9 samples"
534}; 534};
535 535
536static const struct soc_enum drc_ff_delay = 536static SOC_ENUM_SINGLE_DECL(drc_ff_delay,
537 SOC_ENUM_SINGLE(WM8903_DRC_0, 5, 2, drc_ff_delay_text); 537 WM8903_DRC_0, 5, drc_ff_delay_text);
538 538
539static const char *drc_qr_decay_text[] = { 539static const char *drc_qr_decay_text[] = {
540 "0.725ms", "1.45ms", "5.8ms" 540 "0.725ms", "1.45ms", "5.8ms"
541}; 541};
542 542
543static const struct soc_enum drc_qr_decay = 543static SOC_ENUM_SINGLE_DECL(drc_qr_decay,
544 SOC_ENUM_SINGLE(WM8903_DRC_1, 4, 3, drc_qr_decay_text); 544 WM8903_DRC_1, 4, drc_qr_decay_text);
545 545
546static const char *drc_smoothing_text[] = { 546static const char *drc_smoothing_text[] = {
547 "Low", "Medium", "High" 547 "Low", "Medium", "High"
548}; 548};
549 549
550static const struct soc_enum drc_smoothing = 550static SOC_ENUM_SINGLE_DECL(drc_smoothing,
551 SOC_ENUM_SINGLE(WM8903_DRC_0, 11, 3, drc_smoothing_text); 551 WM8903_DRC_0, 11, drc_smoothing_text);
552 552
553static const char *soft_mute_text[] = { 553static const char *soft_mute_text[] = {
554 "Fast (fs/2)", "Slow (fs/32)" 554 "Fast (fs/2)", "Slow (fs/32)"
555}; 555};
556 556
557static const struct soc_enum soft_mute = 557static SOC_ENUM_SINGLE_DECL(soft_mute,
558 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 10, 2, soft_mute_text); 558 WM8903_DAC_DIGITAL_1, 10, soft_mute_text);
559 559
560static const char *mute_mode_text[] = { 560static const char *mute_mode_text[] = {
561 "Hard", "Soft" 561 "Hard", "Soft"
562}; 562};
563 563
564static const struct soc_enum mute_mode = 564static SOC_ENUM_SINGLE_DECL(mute_mode,
565 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 9, 2, mute_mode_text); 565 WM8903_DAC_DIGITAL_1, 9, mute_mode_text);
566 566
567static const char *companding_text[] = { 567static const char *companding_text[] = {
568 "ulaw", "alaw" 568 "ulaw", "alaw"
569}; 569};
570 570
571static const struct soc_enum dac_companding = 571static SOC_ENUM_SINGLE_DECL(dac_companding,
572 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 0, 2, companding_text); 572 WM8903_AUDIO_INTERFACE_0, 0, companding_text);
573 573
574static const struct soc_enum adc_companding = 574static SOC_ENUM_SINGLE_DECL(adc_companding,
575 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 2, 2, companding_text); 575 WM8903_AUDIO_INTERFACE_0, 2, companding_text);
576 576
577static const char *input_mode_text[] = { 577static const char *input_mode_text[] = {
578 "Single-Ended", "Differential Line", "Differential Mic" 578 "Single-Ended", "Differential Line", "Differential Mic"
579}; 579};
580 580
581static const struct soc_enum linput_mode_enum = 581static SOC_ENUM_SINGLE_DECL(linput_mode_enum,
582 SOC_ENUM_SINGLE(WM8903_ANALOGUE_LEFT_INPUT_1, 0, 3, input_mode_text); 582 WM8903_ANALOGUE_LEFT_INPUT_1, 0, input_mode_text);
583 583
584static const struct soc_enum rinput_mode_enum = 584static SOC_ENUM_SINGLE_DECL(rinput_mode_enum,
585 SOC_ENUM_SINGLE(WM8903_ANALOGUE_RIGHT_INPUT_1, 0, 3, input_mode_text); 585 WM8903_ANALOGUE_RIGHT_INPUT_1, 0, input_mode_text);
586 586
587static const char *linput_mux_text[] = { 587static const char *linput_mux_text[] = {
588 "IN1L", "IN2L", "IN3L" 588 "IN1L", "IN2L", "IN3L"
589}; 589};
590 590
591static const struct soc_enum linput_enum = 591static SOC_ENUM_SINGLE_DECL(linput_enum,
592 SOC_ENUM_SINGLE(WM8903_ANALOGUE_LEFT_INPUT_1, 2, 3, linput_mux_text); 592 WM8903_ANALOGUE_LEFT_INPUT_1, 2, linput_mux_text);
593 593
594static const struct soc_enum linput_inv_enum = 594static SOC_ENUM_SINGLE_DECL(linput_inv_enum,
595 SOC_ENUM_SINGLE(WM8903_ANALOGUE_LEFT_INPUT_1, 4, 3, linput_mux_text); 595 WM8903_ANALOGUE_LEFT_INPUT_1, 4, linput_mux_text);
596 596
597static const char *rinput_mux_text[] = { 597static const char *rinput_mux_text[] = {
598 "IN1R", "IN2R", "IN3R" 598 "IN1R", "IN2R", "IN3R"
599}; 599};
600 600
601static const struct soc_enum rinput_enum = 601static SOC_ENUM_SINGLE_DECL(rinput_enum,
602 SOC_ENUM_SINGLE(WM8903_ANALOGUE_RIGHT_INPUT_1, 2, 3, rinput_mux_text); 602 WM8903_ANALOGUE_RIGHT_INPUT_1, 2, rinput_mux_text);
603 603
604static const struct soc_enum rinput_inv_enum = 604static SOC_ENUM_SINGLE_DECL(rinput_inv_enum,
605 SOC_ENUM_SINGLE(WM8903_ANALOGUE_RIGHT_INPUT_1, 4, 3, rinput_mux_text); 605 WM8903_ANALOGUE_RIGHT_INPUT_1, 4, rinput_mux_text);
606 606
607 607
608static const char *sidetone_text[] = { 608static const char *sidetone_text[] = {
609 "None", "Left", "Right" 609 "None", "Left", "Right"
610}; 610};
611 611
612static const struct soc_enum lsidetone_enum = 612static SOC_ENUM_SINGLE_DECL(lsidetone_enum,
613 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_0, 2, 3, sidetone_text); 613 WM8903_DAC_DIGITAL_0, 2, sidetone_text);
614 614
615static const struct soc_enum rsidetone_enum = 615static SOC_ENUM_SINGLE_DECL(rsidetone_enum,
616 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_0, 0, 3, sidetone_text); 616 WM8903_DAC_DIGITAL_0, 0, sidetone_text);
617 617
618static const char *adcinput_text[] = { 618static const char *adcinput_text[] = {
619 "ADC", "DMIC" 619 "ADC", "DMIC"
620}; 620};
621 621
622static const struct soc_enum adcinput_enum = 622static SOC_ENUM_SINGLE_DECL(adcinput_enum,
623 SOC_ENUM_SINGLE(WM8903_CLOCK_RATE_TEST_4, 9, 2, adcinput_text); 623 WM8903_CLOCK_RATE_TEST_4, 9, adcinput_text);
624 624
625static const char *aif_text[] = { 625static const char *aif_text[] = {
626 "Left", "Right" 626 "Left", "Right"
627}; 627};
628 628
629static const struct soc_enum lcapture_enum = 629static SOC_ENUM_SINGLE_DECL(lcapture_enum,
630 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 7, 2, aif_text); 630 WM8903_AUDIO_INTERFACE_0, 7, aif_text);
631 631
632static const struct soc_enum rcapture_enum = 632static SOC_ENUM_SINGLE_DECL(rcapture_enum,
633 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 6, 2, aif_text); 633 WM8903_AUDIO_INTERFACE_0, 6, aif_text);
634 634
635static const struct soc_enum lplay_enum = 635static SOC_ENUM_SINGLE_DECL(lplay_enum,
636 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 5, 2, aif_text); 636 WM8903_AUDIO_INTERFACE_0, 5, aif_text);
637 637
638static const struct soc_enum rplay_enum = 638static SOC_ENUM_SINGLE_DECL(rplay_enum,
639 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 4, 2, aif_text); 639 WM8903_AUDIO_INTERFACE_0, 4, aif_text);
640 640
641static const struct snd_kcontrol_new wm8903_snd_controls[] = { 641static const struct snd_kcontrol_new wm8903_snd_controls[] = {
642 642