From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932762AbcKKLoa (ORCPT ); Fri, 11 Nov 2016 06:44:30 -0500 Received: from mail-db5eur01on0129.outbound.protection.outlook.com ([104.47.2.129]:16087 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756094AbcKKLoZ (ORCPT ); Fri, 11 Nov 2016 06:44:25 -0500 X-Greylist: delayed 127894 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 Nov 2016 06:44:25 EST 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 v3 0/3] ASoC driver for the TSE-850 Date: Fri, 11 Nov 2016 12:29:09 +0100 Message-ID: <1478863752-10569-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: DB5PR08CA0008.eurprd08.prod.outlook.com (10.163.102.146) To AM5PR0201MB2305.eurprd02.prod.outlook.com (10.169.242.149) X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2305;2:DY+SC5aOVa5b727be5HKBEAG68BgH+FldGTS/P7lWkPhs/Fq4MLa1lmy7BoSsYzkBYYiSdwqNrqQuAXLweFUWhhLSxP+BVX5fsiXnQGdlEAHlb1o0p9ezJXd4fJ59lMd110rzKpf/MvDFVyXyS3b2IMqQCLu+VPaKN6Yl7AUIns=;3:XXhlPrwPFctMxrE/qqsFPfi0ksS6o1240dos5MQeltvPYYtH2VaPwBNcPncuHIUddNU4Z7kdApSUZpNAFJaAEmO2VN5yMguV/GVrqzelQlhFKmP7WqQY/2MyxJuzVWpm4Skd3xBNgJ+sWQpL7sZlvRiohXaqw5f6vmIfDgI7mdE= X-MS-Office365-Filtering-Correlation-Id: 1c986ab3-1401-4ee1-fe0b-08d40a260851 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM5PR0201MB2305; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2305;25:aFV197Oqd7rKoylFEZEc38Ag1e7UKUECjdVD7ua4Fw2iOLvd79teJeg38DRep2DBva2rI8L+yBQiDX6UK2mSLAcUfkFmo0ri3/2KWH5LkNE2vPB4PtsZJkcNjeDuaEjxsefC+VyO+gL/rlzgwNyXjl/hvz62F2zJDdEfj6ziRBD6MqE9tkEZvSV6ZK5C8b4iyM4ewlfMJECB3wcFKC5UFub+M3jrEOAkal3Sja618mZDjz/alyuaIYNCisR2zLvjOlTpMekOT+dXfRUpIqVS/hghVjgHmX0zyrsdoaYd3p4QH/7uEck8yIPoY9pdYN0fWGJwk1AvrMVgO2WPJkceKG0M6b18TCswbQDIELyy66Tu3TLIQgPuqxnxF66517ljAbfuJqIvQ2Y9PcO4rgg4McbFJ4nXDI4iR+P2t4IuPU3cndIjwfLoGY5WalS1oJVNALFU7dcNGi4Hs1CietVLuobx4zTL3PhbfHH43oeK8lGsA4VUYV7ppdJXz6jdkeWuuyCcvOIFPh2Eh+MUpCeM4T9X5jej72tibBMwZI6YoinyEd7hyZlJl+s6KTzTRSvKvbwYRVb6Vzw3dIfDbSBXfC6i6ZVfd+c/rku0h5lN2r7trNaIFTSVWCRW9LpSYGLMnj/uRKOXiamKa098FmceY7Bu3JfU+Bv8wfFwI3W0L7D725XC9IdD/1A6XLUTaljOcJ5aMu33+6MppmATDLHqSJvgW2HtWv3isasHRo32hDofXV1p+5wPJ5t8d/HIC/ued0+YgFEdlozw8uGlm5wjgQk/LXy2BVGDY0xFxINGbPmOsnpVSvLVqe8jR2ACAUVW X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2305;31:SWrdQl1HP8oeFbO0VBtnOqxHjQpddLYNrUHZrevQjLqJtnvPLmelRWenmlCWrA8HLkxnJX5V4Qzu6m+uQc9AaltJrfEaf830Yw9WdKncCXQt6VfRKrNKKIs1m14MWmPSuwUO5VP4iaf2czAcFLYGfUepB8RENV/VWtRltdYSCAf9R5dAyiMIuxAAO2LBZ7Tzn6sxV4kW9SLKTCwXGgd0fkzEIKSvPBLUn8oaB53haP4N7ouDa20rL2PrEo8ZAH+AGm8DzZeYCZgYna43vLn3xg==;4:BDTYmhRKuO7SlynrGxiduxzGSkDNnhp6ocAj4asT+Lzj3A+LlyaAX7lc9T1m+LumlAGPtnwBcVFssjXUpnPvKZFHf4vd7AYtH4L/04O3JuUVHddcsJJVhhoyTgBzWbthD1LPYzOT8f/gKvrbuQsj+0Y0H1to/EMuk28KGM2AXeydrG66vQHf+wK04O+yJ0sXtS5HzjFR7z8l0asgaN73XOJF7WwlbxSeC5FT40E1Fb9KN4F8hUp2S1HK8+sib/T9hOFFTKrEoYqMq5xavL6ETPkOqt8nRIV5/scvuxkuGFe8RUJw31XGj49dnrPKMO03hlBYXNp1etANdf64Zg8UltOs/mFYETM43OSL/ta3YdwNnbdNhaqncoeWHi76pL+7AvYnMR/Pz/5kcuu+7ixx0S34MbqCh/k5Qc06Bq91QjfF1Rf3KdTUmZb9DHwYeWK0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060305)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6061300)(6043046);SRVR:AM5PR0201MB2305;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0201MB2305; X-Forefront-PRVS: 012349AD1C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(52314003)(189002)(11905935001)(199003)(101416001)(7416002)(8676002)(6116002)(106356001)(36756003)(6916009)(66066001)(15395725005)(5660300001)(68736007)(47776003)(2351001)(50226002)(3846002)(50986999)(97736004)(586003)(77096005)(1720100001)(189998001)(74482002)(42186005)(2906002)(4326007)(92566002)(81166006)(81156014)(7846002)(5003940100001)(305945005)(6666003)(110136003)(50466002)(105586002)(7736002)(33646002)(86362001)(48376002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0201MB2305;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM5PR0201MB2305;23:023I15aTTZ12zJDgalFd2NYV2NbjK6tau8DG1HX?= =?us-ascii?Q?EtxPMlWZ16sRE5CMInZq/jqo6vDaScP/5CNNgxw0pBUUFJZgz+JrRyCX5q0l?= =?us-ascii?Q?ytAKnUNAmg51Be6rbgGuxgJKBL78JLTAoBazLO+jcqDAslP6ox9nooNj0G61?= =?us-ascii?Q?QMp0sPwT+K/4LU7iDmr28Avbu3tjao1OnyxjcsHPBjE5MiRUE7HhsqNia1el?= =?us-ascii?Q?VB55VDq5H5/UdJJtq83s3g4PLS1V72k8/Enzr+0IxYgqPV6I1AopfMXSjzvE?= =?us-ascii?Q?/4/gGm4cNfZo8cAWtmizveU9fKKy6+p3mdiEJtNTQ0ThlDivUU34BvfYpeCv?= =?us-ascii?Q?VavNp4XrucKPFhkpfi1+pRbX4CYC72pCLaAEwXYAWDhUmBvfSHGzXGAhFfi4?= =?us-ascii?Q?18Y4BueBD+HXXOkd+sQQSa08sjOns0p6u+QxwkJniEX6CoozNvcAj+tKP34B?= =?us-ascii?Q?l9pJIe+2jlQfmq2AEEF8MNpLPpouWsQrmYgL99W9tT75eJyM2BAhw9YP+THA?= =?us-ascii?Q?T5pvytttI+FuIXVrTMM0mRmfsponKTM4Bo+x9OsW6Hkcx6bCLM5JA6c4Qzt2?= =?us-ascii?Q?mSwvsttbh84g2cYc2XcG+XoIOYMspu4hFl9XBrTn0ItEMC6zla6JDuY0eLET?= =?us-ascii?Q?2hYp2M/VnGx9Yk1sg5wM2yEouzyImuAKyo136jIkZI5NUS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gYwDkoROVjpQ/ESSydXhvRodmRMbs/sI5LDaSz2zgeDxL93WT6KRJLkVgXjYafFnqeQVT8x5TbwHkmhn3jqbtYmjS1VaBI8IgfGCqtG2rzKrQlFjlnuGw=;24:4KplX3Ns0DqERPw1QcKXZVIA4ZJ+p245dzElTthIHF2GMoCTTPtMxjkqgMopmOC3aPAtYZrnWYUIaFWfrN/mDNCV6m4YbI5USdF4p+xA4ZE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2305;7:RZEjOl4bsFevtEINASmJOlUPXVtSUd/i9YcuCA/qZBhyRO5Ef4zWUfNQ4gOuU2PJ808oBg5z0Io9gduFaYujVzOphwArkq3FN352h2f5R5GP8TwjXcB7n3eDr/gqRPrre7E0eff4UZIRjImM3T0tvxwCkNcpMYPJB7t4DznQ5XEAGKpnTz3A+pwerZ+iXZbwZiCEvbE2XGtR6Ir4CWpC4lBQ/5fKQWzXEsfziqEmPRivnw9OVgYx/U6BAmbTihcv51MLAx8QWj0ky+UwutOlIc05FxrJH132QP0BBJqlH+3Aa1/O1SjtatWKyKz8hMvog1mv2Al3ynvBiZb5pp/elSGNEEzXRYpINl3mR4Akd9w= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2016 11:29:41.4995 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2305 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! 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 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 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