Hello Moose:
I was looking into the source file for the tas5805 and found that this device lacks a capture stream, which is essential for record operations:
tas5808m.c
static struct snd_soc_dai_driver tas5805m_dai = {
.name = "tas5805m-amplifier",
.playback = {
.stream_name = "Playback",
.channels_min = 2,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_48000,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
},
.ops = &tas5805m_dai_ops,
};
Take for instance a codec device from same manufacturer. This device exposes both a playback and a capture stream:
tlv320aic3x.c
static struct snd_soc_dai_driver aic3x_dai = {
.name = "tlv320aic3x-hifi",
.playback = {
.stream_name = "Playback",
.channels_min = 2,
.channels_max = 2,
.rates = AIC3X_RATES,
.formats = AIC3X_FORMATS,},
.capture = {
.stream_name = "Capture",
.channels_min = 2,
.channels_max = 2,
.rates = AIC3X_RATES,
.formats = AIC3X_FORMATS,},
.ops = &aic3x_dai_ops,
.symmetric_rate = 1,
};
This would be a reason as to why the device isn't shown when listing devices with arecord as it does not have a valid capture stream.
---
Nevertheless, there is one last thing that we could try, and that is, to move your current sound card implementation from the generic simple-card.c (which is playback based only and does not support capture) to fsl-asoc-card.c
The code bellow is an example of how the move to fsl-asoc-card could be done:
fsl-asoc-card.c
/*Add the card to fsl_asoc_card_type enum found in line 39*/
enum fsl_asoc_card_type {
CARD_CS42888 = 1,
CARD_WM8960,
CARD_WM8962,
CARD_SGTL5000,
CARD_AC97,
CARD_CS427X,
CARD_TLV320AIC32X4,
CARD_MQS,
CARD_WM8524,
CARD_SI476X,
CARD_WM8958,
CARD_TAS5805M, /*new card*/
};
/*Add an -else if- to the conditional block on line 773 containing card data*/
else if (of_device_is_compatible(np, "fsl,imx-audio-tas5805m")) {
codec_dai_name = "tas5805m";
priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; /*This will depend on the configuration of the DTS whether the codec is Bit and Frame master*/
priv->card_type = CARD_TAS5805M; /*name defined in the enum above*/
}
/*Line 1156: add a -compatible- member to the fsl_asoc_card_dt_ids array. It must be the same name we defined in the else if case above*/
static const struct of_device_id fsl_asoc_card_dt_ids[] = {
{ .compatible = "fsl,imx-audio-ac97", },
{ .compatible = "fsl,imx-audio-cs42888", },
{ .compatible = "fsl,imx-audio-cs427x", },
{ .compatible = "fsl,imx-audio-tlv320aic32x4", },
{ .compatible = "fsl,imx-audio-sgtl5000", },
{ .compatible = "fsl,imx-audio-wm8962", },
{ .compatible = "fsl,imx-audio-wm8960", },
{ .compatible = "fsl,imx-audio-mqs", },
{ .compatible = "fsl,imx-audio-wm8524", },
{ .compatible = "fsl,imx-audio-si476x", },
{ .compatible = "fsl,imx-audio-wm8958", },
{ .compatible = "fsl,imx-audio-tas5805m", }, /*user card*/
{}
};
This is a basic entry for the sound card on the dts using fsl-asoc-card:
sound-tas5805m {
audio-cpu = <&sai2>;
audio-codec = <&tas5805m>;
audio-routing =
"External Speaker", "OUT",
"IN", "Audio Monitoring";
compatible = "fsl,imx-audio-tas5805m";
model = "tas5805m-audio";
};
Let me know if you run into any issue.
Regards