TAS2552: Linux driver to support DOUT

Part Number: TAS2552

Hi

It seems the current linux driver doesn't support DOUT configuration and I'm looking for it.

My platform is i.MX8MP and the pin configuration is as following: 

I.MX8MP

TAS2552

Pin name

Mux mode

IO direction

Pin Name

SAI3_TXFS

AUDIOMIX_SAI3_TX_SYNC

O

WCLK

SAI3_TXC

AUDIOMIX_SAI3_TX_BCLK

O

BCLK

SAI3_RXD

AUDIOMIX_SAI3_RX_DATA00

I

DOUT

SAI3_TXD

AUDIOMIX_SAI3_TX_DATA00

O

DIN

SAI3_MCLK

AUDIOMIX_SAI3_MCLK

O

MCLK

Does anybody know how to do that?

Any suggestions would be highly appreciated.

  • Would you be so kind and let me know which current Linux driver you used?

  • Hi Shenghao,

    The driver is the same as TI provided on https://www.ti.com/tool/TAS2552SW-LINUX

    And the Linux kernel have included this driver at sound/soc/codecs/tas2552.c

  • You must setup tx path for DOUT signal

    Kindly node the newly-added with bold font as following

    /* TAS2552 dai structure. */
    static struct snd_soc_dai_driver tas2552_dai[] = {
    	{
    		.name = "tas2552-amplifier",
    		.playback = {
    			.stream_name = "Playback",
    			.channels_min = 2,
    			.channels_max = 2,
    			.rates = SNDRV_PCM_RATE_8000_192000,
    			.formats = TAS2552_FORMATS,
    		},
    		.capture = { 
    .stream_name = "Capture",
    .channels_min = 2,
    			.channels_max = 2,
    			.rates = SNDRV_PCM_RATE_8000_192000,
    			.formats = TAS2552_FORMATS,
    },
     .ops = &tas2552_speaker_dai_ops, 
    },
    };
    static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
    {
    	SND_SOC_DAPM_INPUT("IN"),
    	/* MUX Controls */
    	SND_SOC_DAPM_MUX("Input selection", SND_SOC_NOPM, 0, 0,
    			 &tas2552_input_mux_control),
    	SND_SOC_DAPM_AIF_IN("DAC IN", "DAC Playback", 0, SND_SOC_NOPM, 0, 0),
    SND_SOC_DAPM_AIF_OUT("ASI OUT", "DAC Capture", 0, SND_SOC_NOPM, 0, 0),
    SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
    SND_SOC_DAPM_OUT_DRV("ClassD", TAS2552_CFG_2, 7, 0, NULL, 0),
    SND_SOC_DAPM_SUPPLY("PLL", TAS2552_CFG_2, 3, 0, NULL, 0),
    SND_SOC_DAPM_POST("Post Event", tas2552_post_event),
    SND_SOC_DAPM_OUTPUT("OUT"),
    SND_SOC_DAPM_INPUT("DMIC")
    };
    static const struct snd_soc_dapm_route tas2552_audio_map[] = {
    	{"DAC", NULL, "DAC IN"},
    	{"Input selection", "Digital", "DAC"},
    	{"Input selection", "Analog", "IN"},
    	{"ClassD", NULL, "Input selection"},
    	{"OUT", NULL, "ClassD"},
    	{"ClassD", NULL, "PLL"},
    {"ASI OUT", NULL, "DMIC"}
    };

    As to how to config the rgister, I will involve our tas2552 expert to support you.
    Remember to set the DOUT related register before setting chip power on.
  • Hi Shenghao,

    Thanks a lot! I now can see the capture interface by "arecord -l".

    Looking forward to the registers configuration.

  • Hi Chris,

    Digital data output is controlled by register 7.
    By default you should get Isense data on both L and R channels. You may write 0xc8 into this register.

    Best regards,
    -Ivan Salazar
    Applications Engineer