From patchwork Tue Jan 1 11:32:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10745943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 790D814DE for ; Tue, 1 Jan 2019 11:32:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C5212854A for ; Tue, 1 Jan 2019 11:32:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5064328620; Tue, 1 Jan 2019 11:32:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E132854A for ; Tue, 1 Jan 2019 11:32:56 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2E031267AD2; Tue, 1 Jan 2019 12:32:55 +0100 (CET) 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 B660B267BD5; Tue, 1 Jan 2019 12:32:52 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by alsa0.perex.cz (Postfix) with ESMTP id 51987267783 for ; Tue, 1 Jan 2019 12:32:50 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52257C04D319; Tue, 1 Jan 2019 11:32:49 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-35.ams2.redhat.com [10.36.116.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5258726380; Tue, 1 Jan 2019 11:32:48 +0000 (UTC) From: Hans de Goede To: alsa-devel@alsa-project.org Date: Tue, 1 Jan 2019 12:32:46 +0100 Message-Id: <20190101113246.18595-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 01 Jan 2019 11:32:49 +0000 (UTC) Cc: Takashi Iwai , Hans de Goede , Pierre-Louis Bossart Subject: [alsa-devel] [PATCH] conf/ucm: bytcr-rt5651: Document mono speaker wiring 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 During my recent work on the bytcht-es8316 UCM profile I realized that the bytcr-rt5651 devices with a single speaker use a differential setup just like the es8316 does. The tell-tale here is the speaker going quiet when playing the exact same sound on both channels when things are configured for stereo speakers. I've run some tests and the rt5651 does have a special mono balanced out mode for its line-out but using this results in the same sound (and the same loudness / volume of the sound) as our current solution, so adding support for this to the kernel buys us nothing. This commit makes no changes, it just documents my findings in a big comment for future reference. Signed-off-by: Hans de Goede --- src/conf/ucm/codecs/rt5651/MonoSpeaker.conf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/conf/ucm/codecs/rt5651/MonoSpeaker.conf b/src/conf/ucm/codecs/rt5651/MonoSpeaker.conf index 0c3492fb..f4181d10 100644 --- a/src/conf/ucm/codecs/rt5651/MonoSpeaker.conf +++ b/src/conf/ucm/codecs/rt5651/MonoSpeaker.conf @@ -9,7 +9,21 @@ SectionDevice."MonoSpeaker" { EnableSequence [ cdev "hw:bytcrrt5651" - # Map left and right input on left + # On most (all?) devices with a single / mono speaker an + # amplifier with a differential input connected between LOUT + # right and left is used. We deal with this by silencing the + # right output and mixing left + right to the left output. + # + # An alternative approach for devices using the differential + # setup would be to set bit 15 of register 5 in the codec, + # which turns the stereo unbalanced line out into a mono + # balanced line out. + # + # This possibility was discovered after we already shipped the + # current solution and the current solution has the advantage + # of also working on devices which only use LOUT left in + # unbalanced mode. The net result is the same for devices using + # the differential setup, so we just stick with what we have. cset "name='Stereo DAC MIXR DAC R1 Switch' off" cset "name='Stereo DAC MIXL DAC R1 Switch' on"