[alsa-devel] Fwd: new codec tda1543

George Makdessi george at gdis.se
Tue May 2 08:30:12 CEST 2017


Hi
Just reminder.


Vidarebefordrat brev:

Från: George Makdessi <george at gdis.se<mailto:george at gdis.se>>
Datum: 25 april 2017 21:05:43 CEST
Till: "alsa-devel at alsa-project.org<mailto:alsa-devel at alsa-project.org>" <alsa-devel at alsa-project.org<mailto:alsa-devel at alsa-project.org>>
Ämne: new codec tda1543

Commit 9f79c0289fa4b02544c6a51c789c84edd6a479fc ("audio: add support for philips tda1543 dac chip") new simple driver for the old well known philips tda1543 dac chip.


Hello,

We would like to contribute with an audio codec file for the well known Philips TDA1543 dac chip. We have already made a PR for Raspbian with Raspberry Pi specific driver that is well suited together with this codec. We have already got OK confirmation for our PR request and we just need to upstream this codec to finalize the system for our new commersial dac module for Raspberyy PI.
https://github.com/McDaisy/linux-1/commit/9f79c0289fa4b02544c6a51c789c84edd6a479fc

Thanks!

BR
George




The code:

/*
 * Driver for the tda1543 codec
 *
 * Author:    Georgios F <georgios at gdis.se<mailto:georgios at gdis.se>>
 *                Copyright 2017
 *                based on code by Florian Meier <florian.meier at koalo.de<mailto:florian.meier at koalo.de>>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 */


#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/soc.h>

static struct snd_soc_dai_driver tda1543_dai = {
    .name = "tda1543-hifi",
    .playback = {
        .channels_min = 2,
        .channels_max = 2,
        .rates = SNDRV_PCM_RATE_8000_192000,
        .formats = SNDRV_PCM_FMTBIT_S16_LE |
               SNDRV_PCM_FMTBIT_S24_LE
    },
};

static struct snd_soc_codec_driver soc_codec_dev_tda1543;

static int tda1543_probe(struct platform_device *pdev)
{
    return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_tda1543,
            &tda1543_dai, 1);
}

static int tda1543_remove(struct platform_device *pdev)
{
    snd_soc_unregister_codec(&pdev->dev);
    return 0;
}

static const struct of_device_id tda1543_of_match[] = {
    { .compatible = "ti,tda1543", },
    { }
};
MODULE_DEVICE_TABLE(of, tda1543_of_match);

static struct platform_driver tda1543_codec_driver = {
    .probe         = tda1543_probe,
    .remove     = tda1543_remove,
    .driver        = {
        .name    = "tda1543-codec",
        .owner    = THIS_MODULE,
        .of_match_table = of_match_ptr(tda1543_of_match),
    },
};

module_platform_driver(tda1543_codec_driver);

MODULE_AUTHOR("Georgios F <georgios at gdis.se<mailto:georgios at gdis.se>>");
MODULE_DESCRIPTION("ASoC tda1543 codec driver");
MODULE_LICENSE("GPL v2");


More information about the Alsa-devel mailing list