I'm working on a custom board with an OMAP4460 and a TLV320AIC3256 codec. Up to this point we haven't used the ABE and instead hooked up our PCM interface directly to the McBSP2 interface with something like this in our ALSA SoC machine driver:
static struct snd_soc_dai_link m100_dai[] = { { .name = "tlv320aic3256", .stream_name = "Multimedia", .cpu_dai_name ="omap-mcbsp-dai.2", .codec_dai_name = "tlv320aic325x-MM_EXT", .platform_name = "omap-pcm-audio", .codec_name = "tlv320aic325x-codec.0", .init = aic3256_init, .ops = &aic3256_ops, }, }
However, I now want to take advantage of the ABE hardware. I've expanded our machine driver with following DAI links defined:
/* * Frontend DAIs - i.e. userspace visible interfaces (ALSA PCMs) */ { .name = "aic3256_Playback", .stream_name = "Multimedia", /* ABE components - MM-UL & MM_DL */ .cpu_dai_name = "MultiMedia1", .platform_name = "omap-pcm-audio", .dynamic = 1, /* BE is dynamic */ .init = sdp44xx_aic3256_fe_init, .dsp_link = &fe_media, }, { .name = "aic3256_Capture", .stream_name = "Multimedia Capture", /* ABE components - MM-UL2 */ .cpu_dai_name = "MultiMedia2", .platform_name = "omap-pcm-audio", .dynamic = 1, /* BE is dynamic */ .dsp_link = &fe_media_capture, }, { .name = "aic3256_Voice", .stream_name = "Voice", /* ABE components - VX-UL & VX-DL */ .cpu_dai_name = "Voice", .platform_name = "omap-pcm-audio", .dynamic = 1, /* BE is dynamic */ .dsp_link = &fe_media, .no_host_mode = SND_SOC_DAI_LINK_OPT_HOST, }, { .name = "aic3256_Tones_Playback", .stream_name = "Tone Playback", /* ABE components - TONES_DL */ .cpu_dai_name = "Tones", .platform_name = "omap-pcm-audio", .dynamic = 1, /* BE is dynamic */ .dsp_link = &fe_tones, }, { .name = "aic3256_Modem", .stream_name = "MODEM", /* ABE components - MODEM <-> McBSP2 */ .cpu_dai_name = "MODEM", .platform_name = "aess", .dynamic = 1, /* BE is dynamic */ .init = sdp44xx_aic3256_fe_init, .dsp_link = &fe_modem, .ops = &sdp44xx_aic3256_modem_ops, .no_host_mode = SND_SOC_DAI_LINK_NO_HOST, .ignore_suspend = 1, }, { .name = "aic3256_Media_LP", .stream_name = "Multimedia", /* ABE components - MM-DL (mmap) */ .cpu_dai_name = "MultiMedia1 LP", .platform_name = "aess", .dynamic = 1, /* BE is dynamic */ .dsp_link = &fe_lp_media, }, { .name = "Legacy McBSP", .stream_name = "Multimedia", /* ABE components - MCBSP3 - MM-EXT */ .cpu_dai_name = "omap-mcbsp-dai.2", .platform_name = "omap-pcm-audio", /* FM */ .codec_dai_name = "tlv320aic325x-MM_EXT", .codec_name = "tlv320aic325x-codec.0", .ops = &sdp44xx_aic3256_mcbsp_ops, .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_BT_VX_UL, .stream_name = "BT Capture", /* ABE components - MCBSP1 - BT-VX */ .cpu_dai_name = "omap-mcbsp-dai.0", .platform_name = "aess", /* Bluetooth */ .codec_dai_name = "Bluetooth", .no_pcm = 1, /* don't create ALSA pcm for this */ .no_codec = 1, /* TODO: have a dummy CODEC */ .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp44xx_aic3256_mcbsp_ops, .be_id = OMAP_ABE_DAI_BT_VX, .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_BT_VX_DL, .stream_name = "BT Playback", /* ABE components - MCBSP1 - BT-VX */ .cpu_dai_name = "omap-mcbsp-dai.0", .platform_name = "aess", /* Bluetooth */ .codec_dai_name = "Bluetooth", .no_pcm = 1, /* don't create ALSA pcm for this */ .no_codec = 1, /* TODO: have a dummy CODEC */ .init = sdp44xx_aic3256_bt_init, .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp44xx_aic3256_mcbsp_ops, .be_id = OMAP_ABE_DAI_BT_VX, .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_MM_EXT0_DL, .stream_name = "FM Playback", /* ABE components - MCBSP3 - MM-EXT */ .cpu_dai_name = "omap-mcbsp-dai.2", .platform_name = "aess", /* FM */ .codec_dai_name = "tlv320aic325x-MM_EXT", .codec_name = "tlv320aic325x-codec.0", .no_pcm = 1, /* don't create ALSA pcm for this */ .init=sdp44xx_aic3256_init, .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp44xx_aic3256_mcbsp_ops, .be_id = OMAP_ABE_DAI_MM_FM, .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_MM_EXT0_UL, .stream_name = "FM Capture", /* ABE components - MCBSP3 - MM-EXT */ .cpu_dai_name = "omap-mcbsp-dai.2", .platform_name = "aess", /* FM */ .codec_dai_name = "tlv320aic325x-MM_EXT", .codec_name = "tlv320aic325x-codec.0", .no_pcm = 1, /* don't create ALSA pcm for this */ .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp44xx_aic3256_mcbsp_ops, .be_id = OMAP_ABE_DAI_MM_FM, .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_MM_EXT1, .stream_name = "MODEM", /* ABE components - MCBSP2 - MM-EXT */ .cpu_dai_name = "omap-mcbsp-dai.1", .platform_name = "aess", /* MODEM */ .codec_dai_name = "MODEM", .no_pcm = 1, /* don't create ALSA pcm for this */ .no_codec = 1, /* TODO: have a dummy CODEC */ .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp44xx_aic3256_mcbsp_ops, .be_id = OMAP_ABE_DAI_MODEM, .ignore_suspend = 1, }, };
And this creates 12 PCM devices instead of the 1 that I had before. But while audio output works when using tinyplay to pcm6 (the Legacy McBSP interface) I don't see any I2S output when using pcm0 (the MultiMedia1 interface).
I don't know much about debugging the ABE, but I was able to capture the debug buffer while trying to play an audio sample. It's a binary file with repeating entries like the following:
00000000: 0000 0000 0000 0000 0000 0000 0000 0000 00000010: 0000 0000 0000 0000 0000 0000 0000 0000 00000020: 0000 0000 0000 0000 0000 0000 0000 0000 00000030: 0000 0000 0000 0000 0000 0000 0000 0000 00000040: 0000 0000 0000 0000 fb30 0000 fa30 0000 00000050: 2321 0000 2321 0000 b610 0000 b610 0000 00000060: 0000 0000 0000 0000 4fef ffff 4fef ffff 00000070: e2de ffff e1de ffff 04cf ffff 05cf ffff
Any help is greatly appreciated. I can provide other debug info like dmesg output if it would be helpful.