The TI E2E™ design support forums will undergo maintenance from July 11 to July 13. If you need design support during this time, open a new support request with our customer support center.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TAS2563: TAS2563 Linux driver supports PDM ??

Part Number: TAS2563
Other Parts Discussed in Thread: , TAS2781

We are currently designing a hardware with the TAS2563RPPT on a NXP i.MX8M Plus system runnung under Yocto Linux.

As far as I've seen there is a Linux driver out there for the TAS2563, but when checking the sources I could not find anything about PDM. As we need to connect two PDM microphones to the TAS2563 I would like to know if there exists a driver supporting PDM too.

  • Kindly use this driver. tas2781-linux-drivers/tas2781-linux-driver - Unnamed repository; edit this file 'description' to name the repository.

    The guideline also in that link

    Offer me following information:

    the audio format: i2s or tdm, bitwidth, samplerate

    except for pure playback and recording, does your project support playback and recording at the same time.

    I will upload a jason file for you, which is containing the register settings.

    One more thing, how many pieces of tas2563 are there in one device?

  • Dear Shengdao,

    thank you very, very much for your fast and competent reply!

    The project uses one TAS2563 and the use of the TAS2563 will be like an intercom (playback and recording at the same time) for a parking system with one speaker and two PDM microphones.The idea for using two microphones is either to have a better quality or to implement beamforming at a later time to compensate ambient noise a bit.

    Audio format is I2S (using FSYNC, SBCLK1, SDOUT1 and SDIN1 of the TAS2563RPPT to communicate with the i.MX8M Plus), two PDM microphones will be connected to PDMCLK and PDMD.

    Please choose the sample rate and the bitwidth according to your experience, I suppose our Linux software guy will contact you anyway ;-)

    Best regards

    Herbert

  • One more thing, do you need rx ref signal? In our other projects, not only the recorded data from pdm microphone, the rx reference data(echo ref data) is also needed.

  • Ooops, I need to confess that I don't know what you are speaking about ;-(

    I could not find a corresponding hardware pin, so this must be either a software related issue, can you please explain further?

  • OK, let me explain further.

    Most of our pdm projects, the audio rx path is i2s, 32-bit, 16kHz or 48kHz(tas2563 supported min audio sepc is 32-bit, stereo, 16kHz, kindly check your platform can support this)

    normally, tx path is 4-slot, 16-bit, samplerate is same as the rx path's. the signal in tx path is slot 0 is pdm-left mic data, slot 1 is pdm-right mic, slot 2 is echo reference data (about -6db less than rx data ). ,

    Pls check which package type of tas2563 you will use: qfn or wcsp. After you confirm this, you will apply for the related ppc3 tool.

    Hope this can help you.

  • Dear Shengdao,

    we can confirm that our platform supports 48kHz 32-bit stereo.

    We will use a qfn package on our device, but currently we are evaluating with a TAS2563YBGEVM-DC board.

    Kind regards, in representation, Christian (the "Linux software guy")

  • Thanks for your feedback.

  • Hello Shenghao,

    I tried to integrate the driver from https://git.ti.com/cgit/tas2781-linux-drivers/tas2781-linux-driver/tree/ following the documentation. Unfortunately, I got some build errors (log is attached below).

    It seems like the driver is not compatible with the kernel version we use - we are on 5.15.71 (NXP i.mx8m-plus). Do you have a driver compatible to this kernel or an other solution to fix this issue?

    Kind regards, Christian

    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:365:18: error: 'struct snd_soc_dai_driver' has no member named 'symmetric_rates'; did you mean 'symmetric_rate'?
    |   365 |                 .symmetric_rates = 1,
    |       |                  ^~~~~~~~~~~~~~~
    |       |                  symmetric_rate
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:365:36: warning: initialization of 'const struct snd_soc_cdai_ops *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    |   365 |                 .symmetric_rates = 1,
    |       |                                    ^
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:365:36: note: (near initialization for 'tasdevice_dai_driver[0].cops')
    |   CC      sound/soc/codecs/cs42xx8-i2c.o
    |   AR      sound/soc/cirrus/built-in.a
    | In file included from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/asm-generic/bug.h:22,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/arch/arm64/include/asm/bug.h:26,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/bug.h:5,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/mmdebug.h:5,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/gfp.h:5,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/firmware.h:7,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:17:
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c: In function 'fw_parse_block_data':
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/kern_levels.h:5:25: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
    |     5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
    |       |                         ^~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
    |   422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
    |       |                         ^~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/printk.h:493:9: note: in expansion of macro 'printk'
    |   493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
    |       |         ^~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
    |    11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
    |       |                         ^~~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/printk.h:493:16: note: in expansion of macro 'KERN_ERR'
    |   493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
    |       |                ^~~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:200:17: note: in expansion of macro 'pr_err'
    |   200 |                 pr_err("%s: File Size(%u) error offset = %d n = %d\n",
    |       |                 ^~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c: In function 'fw_parse_header':
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/kern_levels.h:5:25: warning: format '%d' expects argument of type 'int', but argument 2 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
    |     5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
    |       |                         ^~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
    |   422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
    |       |                         ^~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/printk.h:493:9: note: in expansion of macro 'printk'
    |   493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
    |       |         ^~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
    |    11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
    |       |                         ^~~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/printk.h:493:16: note: in expansion of macro 'KERN_ERR'
    |   493 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
    |       |                ^~~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:610:17: note: in expansion of macro 'pr_err'
    |   610 |                 pr_err("File size not match, %d %d", pFW->size,
    |       |                 ^~~~~~
    | In file included from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/device.h:15,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/miscdevice.h:7,
    |                  from /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:19:
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c: In function 'tas2781_load_calibration':
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:1224:33: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
    |  1224 |                                 "%s: file read error: size = %d\n",
    |       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
    |   110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
    |       |                              ^~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
    |   144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
    |       |                                                        ^~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:1223:25: note: in expansion of macro 'dev_err'
    |  1223 |                         dev_err(tas_dev->dev,
    |       |                         ^~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-dsp.c:1224:63: note: format string is defined here
    |  1224 |                                 "%s: file read error: size = %d\n",
    |       |                                                              ~^
    |       |                                                               |
    |       |                                                               int
    |       |                                                              %ld
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c: In function 'tasdevice_codec_probe':
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:383:52: error: 'FW_ACTION_HOTPLUG' undeclared (first use in this function)
    |   383 |         ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
    |       |                                                    ^~~~~~~~~~~~~~~~~
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:383:52: note: each undeclared identifier is reported only once for each function it appears in
    | make[4]: *** [/home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/scripts/Makefile.build:289: sound/soc/codecs/tas2563/tasdevice-codec.o] Error 1

  • Sorry, our driver support 5.4 and 6.x. We have no kernel 5.15

    Solution, see following

    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:365:18: error: 'struct snd_soc_dai_driver' has no member named 'symmetric_rates'; did you mean 'symmetric_rate'?
    |   365 |                 .symmetric_rates = 1,
    |       |                  ^~~~~~~~~~~~~~~
    |       |                  symmetric_rate
    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:365:36: warning: initialization of 'const struct snd_soc_cdai_ops *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    |   365 |                 .symmetric_rates = 1,
    |       |                                    ^

    See Line 599, tas2781-i2c.c « codecs « soc « sound - kernel/git/torvalds/linux.git - Linux kernel source tree

    | /home/christian/data/iLCDyocto_kirkstone_2.2.0/build-ucm-imx8m-plus/workspace/sources/linux-compulab/sound/soc/codecs/tas2563/tasdevice-codec.c:383:52: error: 'FW_ACTION_HOTPLUG' undeclared (first use in this function)
    |   383 |         ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
    |       |                                                    ^~~~~~~~~~~~~~~~~

    See Line 283, tas2781-comlib.c « codecs « soc « sound - kernel/git/torvalds/linux.git - Linux kernel source tree