From patchwork Wed Jun 3 15:37:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Mitchell X-Patchwork-Id: 6539361 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 951D7C0020 for ; Wed, 3 Jun 2015 15:37:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4CE220699 for ; Wed, 3 Jun 2015 15:37:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 407A2205F7 for ; Wed, 3 Jun 2015 15:37:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1A0A6265AE8; Wed, 3 Jun 2015 17:37:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6051E2606D9; Wed, 3 Jun 2015 17:37:05 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1E4032606E4; Wed, 3 Jun 2015 17:37:04 +0200 (CEST) Received: from owm.eumx.net (eumx.net [91.82.101.43]) by alsa0.perex.cz (Postfix) with ESMTP id 3238B2606CA for ; Wed, 3 Jun 2015 17:36:57 +0200 (CEST) Message-ID: <556F1F1E.8040405@embed.me.uk> Date: Wed, 03 Jun 2015 16:37:02 +0100 From: Jack Mitchell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: alsa-devel@alsa-project.org Subject: [alsa-devel] simple-audio-card with omap4-dmic X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP I'm currently working with a PandaBoard clone (OMAP44xx) which doesn't have the usual twl6040 codec, however I would like to attach a digital microphone directly into the OMAP. I have added the following to my device tree: sound { compatible = "simple-audio-card"; simple-audio-card,name = "dmic-card"; simple-audio-card,format = "pdm"; status = "okay"; simple-audio-card,dai-link@0 { cpu { sound-dai = <&dmic>; }; codec { sound-dai = <&dmic_codec>; }; }; }; dmic_codec: dmic_codec { #sound-dai-cells = <0>; compatible = "linux,dmic-codec"; }; and created a small patch to allow the generic dmic-hifi codec to be instantiated from device tree. However, no soundcards get loaded, and I don't get error or warnings in dmesg, so I'm at a bit of a loss at where I'm going wrong. Can anybody see any glaring mistakes? I know the driver is definitely getting loaded as I have seen errors relating to me not specifying the sound-dai-cells from the simple-audio-card driver. Any ideas would be greatly recieved! Cheers, diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c index fde5325..67b9198 100644 --- a/sound/soc/codecs/dmic.c +++ b/sound/soc/codecs/dmic.c @@ -69,11 +69,18 @@ static int dmic_dev_remove(struct platform_device *pdev) return 0; } -MODULE_ALIAS("platform:dmic-codec"); +#ifdef CONFIG_OF +static const struct of_device_id dmic_dt_ids[] = { + { .compatible = "linux,dmic-codec", }, + { } +}; +MODULE_DEVICE_TABLE(of, dmic_dt_ids); +#endif static struct platform_driver dmic_driver = { .driver = { .name = "dmic-codec", + .of_match_table = of_match_ptr(dmic_dt_ids), }, .probe = dmic_dev_probe, .remove = dmic_dev_remove, @@ -81,6 +88,7 @@ static struct platform_driver dmic_driver = { module_platform_driver(dmic_driver); +MODULE_ALIAS("platform:dmic-codec"); MODULE_DESCRIPTION("Generic DMIC driver"); MODULE_AUTHOR("Liam Girdwood "); MODULE_LICENSE("GPL");