330
280
/* SDP4430 machine DAPM */
331
281
static const struct snd_soc_dapm_widget sdp4430_twl6040_dapm_widgets[] = {
332
282
SND_SOC_DAPM_MIC("Ext Mic", NULL),
333
SND_SOC_DAPM_MIC("Ext DMic0", NULL),
334
SND_SOC_DAPM_MIC("Ext DMic1", NULL),
335
SND_SOC_DAPM_MIC("Ext DMic2", NULL),
336
283
SND_SOC_DAPM_SPK("Ext Spk", NULL),
337
284
SND_SOC_DAPM_MIC("Headset Mic", NULL),
338
285
SND_SOC_DAPM_HP("Headset Stereophone", NULL),
339
286
SND_SOC_DAPM_SPK("Earphone Spk", NULL),
340
287
SND_SOC_DAPM_INPUT("Aux/FM Stereo In"),
288
SND_SOC_DAPM_MIC("Digital Mic 0", NULL),
289
SND_SOC_DAPM_MIC("Digital Mic 1", NULL),
290
SND_SOC_DAPM_MIC("Digital Mic 2", NULL),
343
293
static const struct snd_soc_dapm_route audio_map[] = {
344
/* External Mics: MAINMIC, SUBMIC and DMICs with bias */
294
/* External Mics: MAINMIC, SUBMIC with bias*/
345
295
{"MAINMIC", NULL, "Main Mic Bias"},
346
296
{"SUBMIC", NULL, "Main Mic Bias"},
347
297
{"Main Mic Bias", NULL, "Ext Mic"},
349
{"DMIC0", NULL, "Digital Mic1 Bias"},
350
{"Digital Mic1 Bias", NULL, "Ext DMic0"},
352
{"DMIC1", NULL, "Digital Mic1 Bias"},
353
{"Digital Mic1 Bias", NULL, "Ext DMic1"},
355
{"DMIC2", NULL, "Digital Mic1 Bias"},
356
{"Digital Mic1 Bias", NULL, "Ext DMic2"},
358
299
/* External Speakers: HFL, HFR */
359
300
{"Ext Spk", NULL, "HFL"},
360
301
{"Ext Spk", NULL, "HFR"},
494
476
.stream_name = "Playback",
495
477
.channels_min = 2,
496
478
.channels_max = 8,
497
.rates = SNDRV_PCM_RATE_48000,
498
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
479
.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
480
SNDRV_PCM_RATE_48000,
481
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
503
486
static const char *mm1_be[] = {
497
struct snd_soc_dsp_link fe_media = {
498
.supported_be = mm1_be,
499
.num_be = ARRAY_SIZE(mm1_be),
500
.fe_playback_channels = 2,
501
.fe_capture_channels = 8,
503
{SND_SOC_DSP_TRIGGER_BESPOKE, SND_SOC_DSP_TRIGGER_BESPOKE},
514
506
static const char *mm2_be[] = {
515
struct snd_soc_dsp_link fe_media_capture = {
516
.supported_be = mm2_be,
517
.num_be = ARRAY_SIZE(mm2_be),
518
.fe_capture_channels = 8,
520
{SND_SOC_DSP_TRIGGER_BESPOKE, SND_SOC_DSP_TRIGGER_BESPOKE},
523
523
static const char *tones_be[] = {
530
struct snd_soc_dsp_link fe_tones = {
531
.supported_be = tones_be,
532
.num_be = ARRAY_SIZE(tones_be),
533
.fe_playback_channels = 2,
535
{SND_SOC_DSP_TRIGGER_BESPOKE, SND_SOC_DSP_TRIGGER_BESPOKE},
530
538
static const char *vib_be[] = {
542
struct snd_soc_dsp_link fe_vib = {
543
.supported_be = vib_be,
544
.num_be = ARRAY_SIZE(vib_be),
545
.fe_playback_channels = 2,
547
{SND_SOC_DSP_TRIGGER_BESPOKE, SND_SOC_DSP_TRIGGER_BESPOKE},
534
550
static const char *modem_be[] = {
560
struct snd_soc_dsp_link fe_modem = {
561
.supported_be = modem_be,
562
.num_be = ARRAY_SIZE(modem_be),
563
.fe_playback_channels = 2,
564
.fe_capture_channels = 2,
566
{SND_SOC_DSP_TRIGGER_BESPOKE, SND_SOC_DSP_TRIGGER_BESPOKE},
544
569
static const char *mm_lp_be[] = {
576
struct snd_soc_dsp_link fe_lp_media = {
577
.supported_be = mm_lp_be,
578
.num_be = ARRAY_SIZE(mm_lp_be),
579
.fe_playback_channels = 2,
581
{SND_SOC_DSP_TRIGGER_BESPOKE, SND_SOC_DSP_TRIGGER_BESPOKE},
551
583
/* Digital audio interface glue - connects codec <--> CPU */
586
static struct snd_soc_dai_link sdp4430_dai = {
588
.stream_name = "TWL6040",
589
.cpu_dai_name ="omap-mcpdm-dai",
590
.codec_dai_name = "twl6040-hifi",
591
.platform_name = "omap-pcm-audio",
592
.codec_name = "twl6040-codec",
593
.init = sdp4430_twl6040_init,
599
static struct snd_soc_dai_link sdp4430_dai[] = {
602
* Frontend DAIs - i.e. userspace visible interfaces (ALSA PCMs)
606
.name = "SDP4430 Media",
607
.stream_name = "Multimedia",
609
/* ABE components - MM-UL & MM_DL */
610
.cpu_dai_name = "MultiMedia1",
611
.platform_name = "omap-pcm-audio",
613
.dynamic = 1, /* BE is dynamic */
614
.dsp_link = &fe_media,
617
.name = "SDP4430 Media Capture",
618
.stream_name = "Multimedia Capture",
620
/* ABE components - MM-UL2 */
621
.cpu_dai_name = "MultiMedia2",
622
.platform_name = "omap-pcm-audio",
624
.dynamic = 1, /* BE is dynamic */
625
.dsp_link = &fe_media_capture,
628
.name = "SDP4430 Voice",
629
.stream_name = "Voice",
631
/* ABE components - VX-UL & VX-DL */
632
.cpu_dai_name = "Voice",
633
.platform_name = "omap-pcm-audio",
635
.dynamic = 1, /* BE is dynamic */
636
.dsp_link = &fe_media,
637
.no_host_mode = SND_SOC_DAI_LINK_OPT_HOST,
640
.name = "SDP4430 Tones Playback",
641
.stream_name = "Tone Playback",
643
/* ABE components - TONES_DL */
644
.cpu_dai_name = "Tones",
645
.platform_name = "omap-pcm-audio",
647
.dynamic = 1, /* BE is dynamic */
648
.dsp_link = &fe_tones,
651
.name = "SDP4430 Vibra Playback",
652
.stream_name = "VIB-DL",
654
/* ABE components - DMIC UL 2 */
655
.cpu_dai_name = "Vibra",
656
.platform_name = "omap-pcm-audio",
658
.dynamic = 1, /* BE is dynamic */
662
.name = "SDP4430 MODEM",
663
.stream_name = "MODEM",
665
/* ABE components - MODEM <-> McBSP2 */
666
.cpu_dai_name = "MODEM",
667
.platform_name = "aess",
669
.dynamic = 1, /* BE is dynamic */
670
.dsp_link = &fe_modem,
671
.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
675
.name = "SDP4430 Media LP",
676
.stream_name = "Multimedia",
678
/* ABE components - MM-DL (mmap) */
679
.cpu_dai_name = "MultiMedia1 LP",
680
.platform_name = "aess",
682
.dynamic = 1, /* BE is dynamic */
683
.dsp_link = &fe_lp_media,
686
.name = "Legacy McBSP",
687
.stream_name = "Multimedia",
689
/* ABE components - MCBSP2 - MM-EXT */
690
.cpu_dai_name = "omap-mcbsp-dai.1",
691
.platform_name = "omap-pcm-audio",
694
.codec_dai_name = "FM Digital",
696
.no_codec = 1, /* TODO: have a dummy CODEC */
697
.ops = &sdp4430_mcbsp_ops,
700
.name = "Legacy McPDM",
701
.stream_name = "Headset Playback",
703
/* ABE components - DL1 */
704
.cpu_dai_name = "mcpdm-dl",
705
.platform_name = "omap-pcm-audio",
707
/* Phoenix - DL1 DAC */
708
.codec_dai_name = "twl6040-dl1",
709
.codec_name = "twl6040-codec",
711
.ops = &sdp4430_mcpdm_ops,
714
.name = "Legacy DMIC",
715
.stream_name = "DMIC Capture",
717
/* ABE components - DMIC0 */
718
.cpu_dai_name = "omap-dmic-dai-0",
719
.platform_name = "omap-pcm-audio",
722
.codec_dai_name = "dmic-hifi",
723
.codec_name = "dmic-codec.0",
725
.init = sdp4430_dmic_init,
726
.ops = &sdp4430_dmic_ops,
730
* Backend DAIs - i.e. dynamically matched interfaces, invisible to userspace.
731
* Matched to above interfaces at runtime, based upon use case.
735
.name = OMAP_ABE_BE_PDM_DL1,
736
.stream_name = "HS Playback",
738
/* ABE components - DL1 */
739
.cpu_dai_name = "mcpdm-dl1",
740
.platform_name = "aess",
742
/* Phoenix - DL1 DAC */
743
.codec_dai_name = "twl6040-dl1",
744
.codec_name = "twl6040-codec",
746
.no_pcm = 1, /* don't create ALSA pcm for this */
747
.init = sdp4430_twl6040_init,
748
.ops = &sdp4430_mcpdm_ops,
749
.be_id = OMAP_ABE_DAI_PDM_DL1,
752
.name = OMAP_ABE_BE_PDM_UL1,
753
.stream_name = "Analog Capture",
755
/* ABE components - UL1 */
756
.cpu_dai_name = "mcpdm-ul1",
757
.platform_name = "aess",
759
/* Phoenix - UL ADC */
760
.codec_dai_name = "twl6040-ul",
761
.codec_name = "twl6040-codec",
763
.no_pcm = 1, /* don't create ALSA pcm for this */
764
.ops = &sdp4430_mcpdm_ops,
765
.be_id = OMAP_ABE_DAI_PDM_UL,
768
.name = OMAP_ABE_BE_PDM_DL2,
769
.stream_name = "HF Playback",
771
/* ABE components - DL2 */
772
.cpu_dai_name = "mcpdm-dl2",
773
.platform_name = "aess",
775
/* Phoenix - DL2 DAC */
776
.codec_dai_name = "twl6040-dl2",
777
.codec_name = "twl6040-codec",
779
.no_pcm = 1, /* don't create ALSA pcm for this */
780
.init = sdp4430_twl6040_dl2_init,
781
.ops = &sdp4430_mcpdm_ops,
782
.be_id = OMAP_ABE_DAI_PDM_DL2,
785
.name = OMAP_ABE_BE_PDM_VIB,
786
.stream_name = "Vibra",
788
/* ABE components - VIB1 DL */
789
.cpu_dai_name = "mcpdm-vib",
790
.platform_name = "aess",
792
/* Phoenix - PDM to PWM */
793
.codec_dai_name = "twl6040-vib",
794
.codec_name = "twl6040-codec",
796
.no_pcm = 1, /* don't create ALSA pcm for this */
797
.ops = &sdp4430_mcpdm_ops,
798
.be_id = OMAP_ABE_DAI_PDM_VIB,
801
.name = OMAP_ABE_BE_BT_VX,
804
/* ABE components - MCBSP1 - BT-VX */
805
.cpu_dai_name = "omap-mcbsp-dai.0",
806
.platform_name = "aess",
809
.codec_dai_name = "Bluetooth",
811
.no_pcm = 1, /* don't create ALSA pcm for this */
812
.no_codec = 1, /* TODO: have a dummy CODEC */
813
.be_hw_params_fixup = mcbsp_be_hw_params_fixup,
814
.ops = &sdp4430_mcbsp_ops,
815
.be_id = OMAP_ABE_DAI_BT_VX,
818
.name = OMAP_ABE_BE_MM_EXT0,
821
/* ABE components - MCBSP2 - MM-EXT */
822
.cpu_dai_name = "omap-mcbsp-dai.1",
823
.platform_name = "aess",
826
.codec_dai_name = "FM Digital",
828
.no_pcm = 1, /* don't create ALSA pcm for this */
829
.no_codec = 1, /* TODO: have a dummy CODEC */
830
.be_hw_params_fixup = mcbsp_be_hw_params_fixup,
831
.ops = &sdp4430_mcbsp_ops,
832
.be_id = OMAP_ABE_DAI_MM_FM,
835
.name = OMAP_ABE_BE_MM_EXT1,
836
.stream_name = "MODEM",
838
/* ABE components - MCBSP2 - MM-EXT */
839
.cpu_dai_name = "omap-mcbsp-dai.1",
840
.platform_name = "aess",
843
.codec_dai_name = "MODEM",
845
.no_pcm = 1, /* don't create ALSA pcm for this */
846
.no_codec = 1, /* TODO: have a dummy CODEC */
847
.be_hw_params_fixup = mcbsp_be_hw_params_fixup,
848
.ops = &sdp4430_mcbsp_ops,
849
.be_id = OMAP_ABE_DAI_MODEM,
853
.name = OMAP_ABE_BE_DMIC0,
854
.stream_name = "DMIC0",
856
/* ABE components - DMIC UL 1 */
857
.cpu_dai_name = "omap-dmic-abe-dai-0",
858
.platform_name = "aess",
861
.codec_dai_name = "dmic-hifi",
862
.codec_name = "dmic-codec.0",
863
.ops = &sdp4430_dmic_ops,
865
.no_pcm = 1, /* don't create ALSA pcm for this */
866
.be_hw_params_fixup = dmic_be_hw_params_fixup,
867
.be_id = OMAP_ABE_DAI_DMIC0,
870
.name = OMAP_ABE_BE_DMIC1,
871
.stream_name = "DMIC1",
873
/* ABE components - DMIC UL 1 */
874
.cpu_dai_name = "omap-dmic-abe-dai-1",
875
.platform_name = "aess",
878
.codec_dai_name = "dmic-hifi",
879
.codec_name = "dmic-codec.1",
880
.ops = &sdp4430_dmic_ops,
882
.no_pcm = 1, /* don't create ALSA pcm for this */
883
.be_hw_params_fixup = dmic_be_hw_params_fixup,
884
.be_id = OMAP_ABE_DAI_DMIC1,
887
.name = OMAP_ABE_BE_DMIC2,
888
.stream_name = "DMIC2",
890
/* ABE components - DMIC UL 2 */
891
.cpu_dai_name = "omap-dmic-abe-dai-2",
892
.platform_name = "aess",
895
.codec_dai_name = "dmic-hifi",
896
.codec_name = "dmic-codec.2",
897
.ops = &sdp4430_dmic_ops,
899
.no_pcm = 1, /* don't create ALSA pcm for this */
900
.be_hw_params_fixup = dmic_be_hw_params_fixup,
901
.be_id = OMAP_ABE_DAI_DMIC2,
552
907
static struct snd_soc_dai_link sdp4430_dai[] = {