From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933656AbcKOVM0 (ORCPT ); Tue, 15 Nov 2016 16:12:26 -0500 Received: from mail-db5eur01on0101.outbound.protection.outlook.com ([104.47.2.101]:22976 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750772AbcKOVMY (ORCPT ); Tue, 15 Nov 2016 16:12:24 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; From: Peter Rosin To: CC: Peter Rosin , Liam Girdwood , "Mark Brown" , Rob Herring , Mark Rutland , Nicolas Ferre , "Jaroslav Kysela" , Takashi Iwai , , Subject: [PATCH v4 0/3] ASoC driver for the TSE-850 Date: Tue, 15 Nov 2016 19:38:12 +0100 Message-ID: <1479235095-13441-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [217.210.101.82] X-ClientProxiedBy: DB4PR01CA0059.eurprd01.prod.exchangelabs.com (10.242.152.49) To AM5PR0201MB2308.eurprd02.prod.outlook.com (10.169.243.7) X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2308;2:/niC6lWqgKiNZGiV3Cth1k08o7/MzXux91gIRecsM/VGG0Ajm7uUVvL14Mf1I34iG8pMi1+jDWX2lmk3HC67abLb0kz9Wz08sFKNdi4DyiOPMl4gE8iZRBQ2PpQulU63OZnokaeWiFr5FRjLeAsWEyTIm0RXIZn6z6F+9FHOtbI=;3:b5bROccN086u6WHq05CU6kRF+Ro986Yy/sF2fWyCgu1L8OcKV9j8U7EaglHJ2xDts0SY4QZow5pLdr7B3ulxnvCUWlul7t79H8FMklmWblzyc5P/jmVnAtcLs9OzinYLR61xyj3jYZQIWAwWyFpW6A7mrf1aQS6101a+kSC9cfY= X-MS-Office365-Filtering-Correlation-Id: eccc852a-c816-4e37-4c66-08d40d869931 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM5PR0201MB2308; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2308;25:nRPgYHAX/P87TMgsCw/7Ruo8eF6GB3hjHPhITHZcblYNex3ucvfpypUbmhzkK8YN1I3D3oH86W2Bvipr61A0MAFSPnW0K0oMI8OtxX6tBbuUmMkyGeGX82FZcLt5YU41vKF9SN7+8XpO1S4EsTFM2VapGR6xaaiwV7Qp88CaQ7raKUTpSnbzcdhhm8kyHH/ClK1HDPMAPLAAQFvY1Jv+R4f+yOIbq63z9yUlMVY/g51mIRhnLzXloVDDhbKsBpUxbi1vcppl1CT4N1i+3taJq67vrRGP3w9s5hq1HGmBw73oeAessndBDpoZAtrwhukHl8cKHZ9mzq7syGYMQvM0MpANiydbSYEdMYWObqinuY60OCwBiP0CQj/Aj9tx4MJ0aOi56jzqSxqbS9kvwd3LC26bUMmn4k5OKvqTJVAil0yepntxEHJcRaDPLQhU6mJGvjhvJj/g4ISDJJPZcw5aC/ufrO9UicGT12zHuOzPk7kJG+YBX9A2+spSuHsKsPR/Yaf+9KmqWhlfDN/0XlK4vScobu7jnwK4g27Za4fdJpzaV9pkUxV6VDgMXQxyrKp2taImjUyoWqtZAQWICp9FUztwYu6JvJEeTntuWIOAT7cUQkKRSTXuTcspsE18A7B+wOKXl6r6rKyT9KIN3yW4kQqWpwJi/Ls0fPW2ZI3hN2B6cYzLy3U4KsTo3cjbpn5KlDtbmRSdAv339zniviCyX47Gk/9u3JvWmgPpRRveDn/ZkwUb3Hyl91U4J3cMxp0ay1lkhYx0b+sWHiFaMmLb3m/Y2+jAlnpgzMB9jGOQ4NvW2H7tOcVBozbFdcF1n3rR X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2308;31:InWuvfCHyFJbWuAaFkZyD8SxNWFKodjjkAd0+wRdoPCu98jc4xWYjZgCJKF2z9L2qNfbEVQ6S7yBDRe+mO1T6IaqUpKaq7/tW2U6AiS5BLaLNWtSf47FgWJ7N+/a6De0Efw/pmMvDFwgZXt8t8qx9RBmJRKuHqzIen9ikq3tDDGAaQVavMjQMIZSbVwTjp0xcD7RTDEBMfsSjkFHkuENL5TbdYtN00KvGzMDufXsVMumaVAFWmeJxNofuAc9NIbI;4:l7eQM/c7NImgdCg1gsvWMscfHcftdVbfWScermWhe56l5Q+1Qr8A/Di1PWWmZIRDJAvMzm97A5etwgJLtI6U56GErNiJ7WL5b0vW72Dx0EejUtVLNw31tmYUW9RvApnwM0uGo1TEAS9KTzeQQAXRiHdd4q0mWtLZ/9O1dlrXtN66/jdKLetBEacnNtY3f8fR/HfgWVZwXUD6YmjfVWJgcutvilqAszRIhprKwnFi32I+nYGGUS9tAIb6fPSnIuv3w/CObCkyDKZEqYWfSVrTijf5yFQp1X5Ukj41XhBX5X6r5Gw8Zhk4XPwDQqCly0ChaZcnCVXYWRQe4srNeJ73wFGhUKoNR6yqtfZEXO+cdi7kY688PuzKPLZSLpOweufEgKx7EAeTX/oujJnLKK1Kkvh3VmqDp9IyxZRprwkifefnpZN9fZomlv64tF920Unn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6061324)(6043046);SRVR:AM5PR0201MB2308;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0201MB2308; X-Forefront-PRVS: 012792EC17 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6069001)(6009001)(7916002)(52314003)(199003)(189002)(11905935001)(81166006)(81156014)(7416002)(8676002)(15395725005)(42186005)(68736007)(2906002)(50226002)(1720100001)(305945005)(50466002)(110136003)(7846002)(47776003)(7736002)(86362001)(5660300001)(66066001)(5003940100001)(6916009)(6666003)(48376002)(33646002)(50986999)(189998001)(6116002)(101416001)(3846002)(36756003)(2351001)(106356001)(77096005)(97736004)(105586002)(4326007)(92566002)(74482002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0201MB2308;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM5PR0201MB2308;23:5AeJjwMtMs2roRE5A/CUOWl1H+NHMbkvScABgcT?= =?us-ascii?Q?UT93bhkr3wsxsVpO7wDl/IyEa78qP0U4BWIKiIDlRBFYiwhyL9TivgDZm+ch?= =?us-ascii?Q?sZibVFPuJUw8iCSZbYmSGFuZlEYogyYWNPled1voDTc+F0KNpkX/zROEMHto?= =?us-ascii?Q?nFWeZfc8efSTUAdfurMCvZl5exouXE/FSMZP98o4N/hmDb0knNjTPTheMpSA?= =?us-ascii?Q?r6WD+4vXcb+sIxeAQ1nlLT90eubsf36hzu56uWm7Vg1zNFsMZHwp5MiV5WdP?= =?us-ascii?Q?tuIME73gb/6DKw0yTBsbZOuWW2TWLOizKSeVAEJ7SdZZjadEEGk6MSMaLZy3?= =?us-ascii?Q?oihxOYDQ2taM36madf9U3VZ7eD+rRVX2lyOimoMBtZefDzkYNHLiYh5E0uDM?= =?us-ascii?Q?KWh37QvNRvsemKqLKSnRca278e2Jp/hxpofBvGc3/AI1Ah0iqff4tNAyBECZ?= =?us-ascii?Q?334pZT+a8M72BvmoG9qzT3IgYOHxyuV0cBhSD6LSJsBWBqwArlYn8bjZoraN?= =?us-ascii?Q?Ej5tGg8xGKYhmTPm+oye2Q0GAbUEJaTanh54sSj4Vowy9aDFPQsi5u1ZNGVq?= =?us-ascii?Q?0Q7/kW7Dy/bzmq43nUFb2oH2hDpy9ZMXKKqkfZgiOIo+zyklPcGVhK/2yG1k?= =?us-ascii?Q?MLJ0EBbh2HkzcCRW61INjUuFwVr3NSv/uK2Pt+lLq5ddKo9vp0bRYlpj0tmB?= =?us-ascii?Q?Cy4hMSixVdkpdmJxcSnL0HpInvNY4EXzURqE5veeZ/xkMpwQMylqntDxMZ8J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vF6NR4UIq6oNS4gCrIk2FNfTnsYDNf7k+yZhkYJmvwaamkPtK4AHUEdRoZDvP08V2Zmg+v1g/Rj+iHasp47eFKFjJeMpb5RWjpNZ55yC/k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2308;7:f0KXQ6xEkgSs6m1zOssgV4mrcVx2ikVkDWNgkDi2rS/8qPQMb087BxoXd6pR0BlqPmKWYnK/6K4eAhPU/J07EvPNVQ04OYlh1QkRdNL4xBoJUyi/vPhn8/DPzvkRC7FzGZdct/U+k8ocj0bqRvf/N8tt3XBU4Ywrj2/68g0ck5VEeg5meAc47mqKcT2HkDjNTA01kUz+63E87XGFc0ZZjW87f/0izQDBBVNcuB0YTUbpFFUlsf59nhwiNnDkQFL+QrpkanDIogoRRFxq3DlgG2Q7tXztNSPMWz1b6wXrXUqKmBpP76XJXCpuM1drLWzewUvKOX5I/hQ9rn+jSjRzALXc3qLVkd7Lx27wKDHHX6o= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2016 18:38:29.8053 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2308 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! v3 -> v4 changes: - changed heading of the devicetree bindings as requested by Rob - add ack from Rob on patch 2/3 - rebased onto v4.9-rc5 v2 -> v3 changes: - update the preparatory atmel_ssc_dai patch with error checking and fallback handling of the CMR_DIV divider in addition to the new fallback handling of TCMR_PERIOD/RCMR_PERIOD from v2. v1 -> v2 changes: - new subject for the bindings patch to make it easier to find - move the driver to the sound/soc/atmel directory - add cached values for add/loop1/loop2 to avoid gets from output gpios - use _cansleep when updating gpios - add comment on how the regulator voltage is mapped to the ana enum - drop the .hw_params hook that did set the cpu dai divider and... - ...add a preparatory patch that does this in the cpu dai driver instead - drop .init and set the dapm routes directly in the card struct instead The TSE-850 is an FM Transmitter Station Equipment, designed to generate baseband signals for FM, mainly the DARC subcarrier, but other signals are also possible. This adds a driver for the "sound" bits of the device (quoted since it is normally not used for normal sound output, but that works too of course). I have not provided a patch to add axentia as a devicetree vendor prefix, since such a patch is already pending in an IIO series [1] that is on its merry way into -next. However, there are a couple of points that I'm not 100% satisfied with for this driver. First, I do not know how to describe the relays that control if the IN1/IN2 signals are directly routed towards OUT1/OUT2 or if they are routed to the "add" switch. The dapm routing treats this as if the IN1/IN2 signals are always routed to both the "add" switch and to the muxes feeding OUT1/OUT2. This is fine with me since nothing is powered in those sections anyway, so what dapm thinks does not really matter. But it is a wart all the same. Second, there's my comment in tse850_put_mix() when the "add" switch is updated. I believe this update should really happen as a side effect of the call to snd_soc_dapm_mixer_update_power(), so that it happens at the right point compared to other stuff that is powered. But I do not know how to hook that up and instead I flip the switch before the call since it doesn't really matter. I.e., any noise resulting from this badness is negligeble in practice. Cheers, Peter [1] http://lwn.net/Articles/705931 Peter Rosin (3): ASoC: atmel_ssc_dai: if not provided, default to sensible dividers ASoC: tse850: document axentia,tse850-pcm5142 bindings ASoC: atmel: tse850: add ASoC driver for the Axentia TSE-850 .../bindings/sound/axentia,tse850-pcm5142.txt | 88 ++++ MAINTAINERS | 7 + sound/soc/atmel/Kconfig | 10 + sound/soc/atmel/Makefile | 2 + sound/soc/atmel/atmel_ssc_dai.c | 83 +++- sound/soc/atmel/atmel_ssc_dai.h | 1 + sound/soc/atmel/tse850-pcm5142.c | 472 +++++++++++++++++++++ 7 files changed, 656 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/axentia,tse850-pcm5142.txt create mode 100644 sound/soc/atmel/tse850-pcm5142.c -- 2.1.4