From patchwork Sun Oct 29 14:50:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 739311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38060C4332F for ; Sun, 29 Oct 2023 14:57:22 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3489AA4D; Sun, 29 Oct 2023 15:56:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3489AA4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698591440; bh=btxD72lpMzY3aJxfuNT5EYXr6BbJvuWnHu3lPrgdVT8=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=PahqT1OHDigmM2WohESTPFmXBijoDxYBuOSulG/HdOP2nJ5YXTAffnNGe4srGy5zK TM/Nz+XMv4ApQ+Hi9VG/B7ewxKYLk0qVgSvrCFbczJhrt0dXV8T6OUyT2i+0xKvLzz u8qBvLzHisdU4bkzt1scwADkH2Bn9YtFwLvDqukQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 90CAFF80494; Sun, 29 Oct 2023 15:55:59 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A7DFAF8020D; Sun, 29 Oct 2023 15:55:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 13A2BF8020D; Sun, 29 Oct 2023 15:51:41 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 50610F80152 for ; Sun, 29 Oct 2023 15:50:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 50610F80152 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TSsL3SGm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698591013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBc5E1xWYonXlxwl9lV0yPbwYoN0HhD73jZxdJzFetw=; b=TSsL3SGmtzv9OKUyOgCeccaX9WPzCsKGDL4XruGkFM3lEmyyPzuWJfwJcH4qGbxmSlbHYi jSFUqnm20zXqmcsbGMbnccrkf7uiGpOe8b2IQreYH49VDg0KrdMuEomJV9QmZTxj1gvRIW 7k0i2y9nsOYdsaFFkGkCdBRqRiT7D1U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-CuUMr9cQO2KV8BFkLLGP1w-1; Sun, 29 Oct 2023 10:50:10 -0400 X-MC-Unique: CuUMr9cQO2KV8BFkLLGP1w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D16B685CBE3; Sun, 29 Oct 2023 14:50:09 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id BDF33502D; Sun, 29 Oct 2023 14:50:08 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Cc: Pierre-Louis Bossart , Bard Liao , alsa-devel@alsa-project.org, Hans de Goede Subject: [PATCH alsa-ucm-conf] codecs/es8316: Fix mono speaker settings from previous boot getting applied Date: Sun, 29 Oct 2023 15:50:07 +0100 Message-ID: <20231029145007.24106-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: HCR6XRPQQ2XK75T5EVIJBI2WLYL4JRSF X-Message-ID-Hash: HCR6XRPQQ2XK75T5EVIJBI2WLYL4JRSF X-MailFrom: hdegoede@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: When codecs/es8316/MonoSpeaker.conf's EnableSeq was run last before shutdown the 'Playback Polarity' and 'DAC Mono Mix Switch' controls for Mono Speaker output get saved and restored on the next boot. These settings are undone by the MonoSpeaker DisableSeq, but that never runs when an updated kernel switches from the default "cfg-spk:1" in components to "cfg-spk:2" for devices which do actually have 2 speakers, which causes the ucm profile to use codecs/es8316/Speaker.conf instead. Set the 'Playback Polarity' and 'DAC Mono Mix Switch' controls to their defaults in codecs/es8316/EnableSeq.conf to avoid them getting stuck in Mono mix mode in this scenario. Signed-off-by: Hans de Goede --- ucm2/codecs/es8316/EnableSeq.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ucm2/codecs/es8316/EnableSeq.conf b/ucm2/codecs/es8316/EnableSeq.conf index b6c81d8..b75c4a7 100644 --- a/ucm2/codecs/es8316/EnableSeq.conf +++ b/ucm2/codecs/es8316/EnableSeq.conf @@ -22,4 +22,8 @@ EnableSequence [ # Setup muxes / switches cset "name='Left Headphone Mixer Left DAC Switch' on" cset "name='Right Headphone Mixer Right DAC Switch' on" + + # Undo MonoSpeaker settings which may have been saved on shutdown + cset "name='Playback Polarity' 0" + cset "name='DAC Mono Mix Switch' off" ]