From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754161AbcKIWla (ORCPT ); Wed, 9 Nov 2016 17:41:30 -0500 Received: from mail-db5eur01on0114.outbound.protection.outlook.com ([104.47.2.114]:45132 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753153AbcKIWl2 (ORCPT ); Wed, 9 Nov 2016 17:41:28 -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 v2 0/3] ASoC driver for the TSE-850 Date: Wed, 9 Nov 2016 23:40:55 +0100 Message-ID: <1478731258-26084-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: DB4PR01CA0034.eurprd01.prod.exchangelabs.com (10.242.152.24) To VI1PR0201MB2319.eurprd02.prod.outlook.com (10.168.63.21) X-MS-Office365-Filtering-Correlation-Id: da8d3168-8d2d-4e5f-aa43-08d408f188a9 X-Microsoft-Exchange-Diagnostics: 1;VI1PR0201MB2319;2:7ku814ZLDLAWIn07tP4MEqnido13Wk3TQLcrX8JFZ/vDTXPZQPMcBwJYW4dSnxZ++KUW9gtiw8nDaka+rWOG+H/hD1rhjsb139lj7AEsmAJYLl4NHUJmGS6JNTMMGhn6S0D2tvaRQxTJdx3b4vJQelsXbYDhf3204C/xzTwvQrxWR7bHiUyp+iYDReXKasO9prmTU11zQxi5I9I5Kn5yjg==;3:wKhY07rGLFukvmXolw0B5X0lXRnjh6ZOwfJ+wA9cadVpf9wkEMmsPVfspyFeRPXQ34kCG5R9/LCrhB1IWy3m+3MGRzm/YxdtsNExFg4KJBQN9IY4qsCLg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P1ATA1kb9IJSyTPo5PXhBTvduw3YOZyf7ZQWbjPEF0sVhbx4U/1kiSKInfXVZxxYHvlMGgcKb+XKQRBuLuPqRtv4xfMYN6lI2y6MBhaW0aF88hBs+yl+af7BWrhEdXb5rHKohEzgaKICHRc0W3hQSdvOZnLGtg5TWX+Bh8ByA02AAiCRZ4m7EFus2n9E;4:9o6Vm1HOTg4pNPLA7A0I2u51X5lXwvS2GOXBrfUi4smqcSv3ziKC5MqNkt+XAbOZaFgIUsI6je9QPHRKggErWwhcGWpSvsjDGgPYsDR6vAaYlcEwRHrrES9INisc2hqeBCvqd6VM3WVjAJfD83nDG8Bmdq9gohggecvfByADDnIgajycC1mt7Lv54552/8xnxB72g7Fjq0jsQ8yfw0sdiQlEvkzkZkPXmYPoB3eadFY++08M2Fg4YvPnnYuErx7rZr+osXMMxQ4fmeXvSabFnSMbfRTwswGfsnoQUSfAfiEgETMsXU4h3hVPOhjX43smetnjNR35evoDrzNay1a+J845o6vl5I4aTwSuI4Ffr7+cnfW3RJhn6D+T4ritW8qD43GRmiBQGZKZVly5xAH37HL+nJBNjfvmiev3a/u51gYIB6LGWsHppC/dG0B8N+q9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6043046)(6042046);SRVR:VI1PR0201MB2319;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0201MB2319; X-Forefront-PRVS: 0121F24F22 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6069001)(6009001)(7916002)(52314003)(11905935001)(189002)(199003)(42186005)(50986999)(5003940100001)(2906002)(1720100001)(68736007)(47776003)(5660300001)(106356001)(305945005)(66066001)(77096005)(7846002)(7736002)(105586002)(2351001)(189998001)(74482002)(86362001)(101416001)(33646002)(97736004)(50466002)(36756003)(15395725005)(92566002)(50226002)(6666003)(8676002)(586003)(4326007)(81156014)(48376002)(81166006)(110136003)(6916009)(7416002)(3846002)(6116002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0201MB2319;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR0201MB2319;23:kJ9HeJYUbGlz7ySJAYWJKGMT9tIrYc8UUjK3AUK?= =?us-ascii?Q?tmCq6R16rFn2N7usVLkCPL8N17ok1gMiVzWhkA09RdT/wS7pNGVKESi8I0OB?= =?us-ascii?Q?1+1sOGDxustpvgYRZ15PpVkx5X60Iq5KHew/Ly4SYCs8lweUhCycsYHV3DnA?= =?us-ascii?Q?IsKOLFiEdsknpZ7DPL/44QuxDaGvzYZkPaprq0l4pyt3A/YLgjEwUg3cXAww?= =?us-ascii?Q?YGgGgFgx1cB+3bxOmhxpdbe0Z7GAnle041QAkIWo72fQUrB9cuutLpo9kYwa?= =?us-ascii?Q?RodrKvbIliag/xvH27aprtA2ZpNKdS9p/DgYLNi/+FvwFSmh77WepLgWQABg?= =?us-ascii?Q?VGjHyvO1tjf2q5MqR6AO4BzMVf3k07dKKIxhw6Na1asZJ7XzJmfB2TMFMGnq?= =?us-ascii?Q?XJt9eYeaDOopyjSoe6YAQV6r9pzEfraE3fitIVGvs6MdwhWosIs7sr9hFZsP?= =?us-ascii?Q?UQvevTZl9MnTP1Ew+MjGf6RTqCfXiSi56WCGuKpU2FA3ivyLcRZUWe/qU1k3?= =?us-ascii?Q?96jVb7551AjTm9ESHbd+SFPRcXt0opkle5Sy+njx5LVBucCZZKDg0kEmZQyf?= =?us-ascii?Q?LmWii560t8/sVKpaoxoaU99SIpM9GT5CnV94PmQMTKlJIb5EjRpojqvbFLGJ?= =?us-ascii?Q?mYuwSHPNudYBMp/haXAjN3NcV7x48JedwQffX536Oaf6gPEYjxpFdRbLicv+?= =?us-ascii?Q?iycLfJUmUihj8PRzP0xZe05zy2g1GA76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ncUKbSUfdbaJTzrjuQxxNzXhRoZ/ug==;24:yShTL+zvsC6OjCoQhkbclM6PAUmzmlDzI8Udu/Knjhxku+qI3Gk9a4QG/jF5HnpoY7/7hexN3L4UqmHyS4KjSPKzT2rk3QN0nUJ1hoyBzOA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0201MB2319;7:fTqHy1aNAzKwpFav5a31s9ynSrXegEz/u3eGgugFv8tBvcUFuGXXvBT5WNOEhQSP67gkV8VhRW8yCXt1JuVfkWpRGeXds6WzKwI5E/PkjRu1AnHiYduuTCn/J4lqWe6Iz9eafKBup6svREh6WJPsYKwD1FeXlbJu+DxaofPe5WhxoRYYwKAkPyIjZczZ3rwsLLKdX1sP4EykLhBayHM3YR6SeRN7bPbbFGv/zwgThPLTG71Gyj4Y30uVRKOOmgywb4W0/2+cOYkVespgO0p5N0QtN03p0tmVDGEcHjSOu319LfxGZ3wKxWKNlbfNvbd+ahvAVtkkuQLacSqmaPxNbSCc6cA0+aSHGMG1tRbKzrU= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2016 22:41:22.2975 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2319 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! 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 seems close to being accepted. 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 TCMR/RCMR periods 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 | 29 +- sound/soc/atmel/atmel_ssc_dai.h | 1 + sound/soc/atmel/tse850-pcm5142.c | 472 +++++++++++++++++++++ 7 files changed, 603 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/axentia,tse850-pcm5142.txt create mode 100644 sound/soc/atmel/tse850-pcm5142.c -- 2.1.4