diff options
| -rw-r--r-- | sound/soc/codecs/wm8903.c | 108 |
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 | ||
| 492 | static const struct soc_enum hpf_mode = | 492 | static 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 | ||
| 495 | static const char *osr_text[] = { | 495 | static const char *osr_text[] = { |
| 496 | "Low power", "High performance" | 496 | "Low power", "High performance" |
| 497 | }; | 497 | }; |
| 498 | 498 | ||
| 499 | static const struct soc_enum adc_osr = | 499 | static 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 | ||
| 502 | static const struct soc_enum dac_osr = | 502 | static 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 | ||
| 505 | static const char *drc_slope_text[] = { | 505 | static 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 | ||
| 509 | static const struct soc_enum drc_slope_r0 = | 509 | static 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 | ||
| 512 | static const struct soc_enum drc_slope_r1 = | 512 | static 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 | ||
| 515 | static const char *drc_attack_text[] = { | 515 | static 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 | ||
| 521 | static const struct soc_enum drc_attack = | 521 | static 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 | ||
| 524 | static const char *drc_decay_text[] = { | 524 | static 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 | ||
| 529 | static const struct soc_enum drc_decay = | 529 | static 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 | ||
| 532 | static const char *drc_ff_delay_text[] = { | 532 | static const char *drc_ff_delay_text[] = { |
| 533 | "5 samples", "9 samples" | 533 | "5 samples", "9 samples" |
| 534 | }; | 534 | }; |
| 535 | 535 | ||
| 536 | static const struct soc_enum drc_ff_delay = | 536 | static 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 | ||
| 539 | static const char *drc_qr_decay_text[] = { | 539 | static const char *drc_qr_decay_text[] = { |
| 540 | "0.725ms", "1.45ms", "5.8ms" | 540 | "0.725ms", "1.45ms", "5.8ms" |
| 541 | }; | 541 | }; |
| 542 | 542 | ||
| 543 | static const struct soc_enum drc_qr_decay = | 543 | static 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 | ||
| 546 | static const char *drc_smoothing_text[] = { | 546 | static const char *drc_smoothing_text[] = { |
| 547 | "Low", "Medium", "High" | 547 | "Low", "Medium", "High" |
| 548 | }; | 548 | }; |
| 549 | 549 | ||
| 550 | static const struct soc_enum drc_smoothing = | 550 | static 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 | ||
| 553 | static const char *soft_mute_text[] = { | 553 | static const char *soft_mute_text[] = { |
| 554 | "Fast (fs/2)", "Slow (fs/32)" | 554 | "Fast (fs/2)", "Slow (fs/32)" |
| 555 | }; | 555 | }; |
| 556 | 556 | ||
| 557 | static const struct soc_enum soft_mute = | 557 | static 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 | ||
| 560 | static const char *mute_mode_text[] = { | 560 | static const char *mute_mode_text[] = { |
| 561 | "Hard", "Soft" | 561 | "Hard", "Soft" |
| 562 | }; | 562 | }; |
| 563 | 563 | ||
| 564 | static const struct soc_enum mute_mode = | 564 | static 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 | ||
| 567 | static const char *companding_text[] = { | 567 | static const char *companding_text[] = { |
| 568 | "ulaw", "alaw" | 568 | "ulaw", "alaw" |
| 569 | }; | 569 | }; |
| 570 | 570 | ||
| 571 | static const struct soc_enum dac_companding = | 571 | static 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 | ||
| 574 | static const struct soc_enum adc_companding = | 574 | static 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 | ||
| 577 | static const char *input_mode_text[] = { | 577 | static const char *input_mode_text[] = { |
| 578 | "Single-Ended", "Differential Line", "Differential Mic" | 578 | "Single-Ended", "Differential Line", "Differential Mic" |
| 579 | }; | 579 | }; |
| 580 | 580 | ||
| 581 | static const struct soc_enum linput_mode_enum = | 581 | static 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 | ||
| 584 | static const struct soc_enum rinput_mode_enum = | 584 | static 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 | ||
| 587 | static const char *linput_mux_text[] = { | 587 | static const char *linput_mux_text[] = { |
| 588 | "IN1L", "IN2L", "IN3L" | 588 | "IN1L", "IN2L", "IN3L" |
| 589 | }; | 589 | }; |
| 590 | 590 | ||
| 591 | static const struct soc_enum linput_enum = | 591 | static 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 | ||
| 594 | static const struct soc_enum linput_inv_enum = | 594 | static 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 | ||
| 597 | static const char *rinput_mux_text[] = { | 597 | static const char *rinput_mux_text[] = { |
| 598 | "IN1R", "IN2R", "IN3R" | 598 | "IN1R", "IN2R", "IN3R" |
| 599 | }; | 599 | }; |
| 600 | 600 | ||
| 601 | static const struct soc_enum rinput_enum = | 601 | static 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 | ||
| 604 | static const struct soc_enum rinput_inv_enum = | 604 | static 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 | ||
| 608 | static const char *sidetone_text[] = { | 608 | static const char *sidetone_text[] = { |
| 609 | "None", "Left", "Right" | 609 | "None", "Left", "Right" |
| 610 | }; | 610 | }; |
| 611 | 611 | ||
| 612 | static const struct soc_enum lsidetone_enum = | 612 | static 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 | ||
| 615 | static const struct soc_enum rsidetone_enum = | 615 | static 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 | ||
| 618 | static const char *adcinput_text[] = { | 618 | static const char *adcinput_text[] = { |
| 619 | "ADC", "DMIC" | 619 | "ADC", "DMIC" |
| 620 | }; | 620 | }; |
| 621 | 621 | ||
| 622 | static const struct soc_enum adcinput_enum = | 622 | static 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 | ||
| 625 | static const char *aif_text[] = { | 625 | static const char *aif_text[] = { |
| 626 | "Left", "Right" | 626 | "Left", "Right" |
| 627 | }; | 627 | }; |
| 628 | 628 | ||
| 629 | static const struct soc_enum lcapture_enum = | 629 | static 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 | ||
| 632 | static const struct soc_enum rcapture_enum = | 632 | static 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 | ||
| 635 | static const struct soc_enum lplay_enum = | 635 | static 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 | ||
| 638 | static const struct soc_enum rplay_enum = | 638 | static 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 | ||
| 641 | static const struct snd_kcontrol_new wm8903_snd_controls[] = { | 641 | static const struct snd_kcontrol_new wm8903_snd_controls[] = { |
| 642 | 642 | ||
