From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: Regression caused by "ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLV" Date: Mon, 17 Feb 2014 14:14:40 +0100 Message-ID: <20140217141440.335d1a7b@skate> References: <20140130144807.5b102b28@skate> <20140130160554.694a8a84@skate> <20140130175658.11469081@skate> <20140130181607.6a694b8f@skate> <20140210152244.19f9d647@skate> <20140214201709.GG4451@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by alsa0.perex.cz (Postfix) with ESMTP id 2648F261B19 for ; Mon, 17 Feb 2014 14:14:43 +0100 (CET) In-Reply-To: <20140214201709.GG4451@sirena.org.uk> 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 To: Mark Brown Cc: Lior Amsalem , Brian Austin , alsa-devel@alsa-project.org, Liam Girdwood , Ezequiel Garcia , Gregory =?UTF-8?B?Q2zDqW1lbnQ=?= List-Id: alsa-devel@alsa-project.org Dear Mark Brown, On Fri, 14 Feb 2014 20:17:09 +0000, Mark Brown wrote: > On Mon, Feb 10, 2014 at 03:22:44PM +0100, Thomas Petazzoni wrote: > > On Thu, 30 Jan 2014 11:23:57 -0600, Brian Austin wrote: > > > > Once I get it figured out, I'll CC you on the submission for your review > > > and test. > > > Any news about this volume control problem on cs42l51 ? > > What does the datasheet say about these bitfields? It should be > straightforward to figure out how to fix them, it seems clear that the > original code only worked by accident. For the PCMA and PCMB registers (addresses 0x10 and 0x11), the datasheet says that bits 0 to 6 contain the volume, and bit 7 contains the mute/unmute attribute. The volume can be adjusted in 0.5 dB increments, with the following values described in the datasheet: 001 1000 +12.0 dB ........ ........ 000 0000 0 dB 111 1111 -0.5 dB 111 1110 -1.0 dB ........ ........ 001 1001 -51.5 dB Note that I haven't looked myself in details at the code of the audio codec. I simply noticed there was a volume control problem and that reverting Brian's patch made the volume control work again. I have not investigated at all to fix the codec code, as I was suspecting that Brian may have immediately an idea on what could be wrong. If he doesn't have the time to look into this, I can certainly spend a bit of time to investigate what's going on. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com