From patchwork Wed Aug 11 18:56:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Rodionov X-Patchwork-Id: 12431729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB14C4338F for ; Wed, 11 Aug 2021 18:59:32 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E28A56105A for ; Wed, 11 Aug 2021 18:59:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E28A56105A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 40C681779; Wed, 11 Aug 2021 20:58:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40C681779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1628708369; bh=JEVPjSYKWi6aZpm2PxHbliwR7fwc6DJh0c4wyAU6rgo=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=izKyZYHK5rw6/V7f2cWG5B2sTm6KvrKHBvmCua70QVW9dJ13KQ7iNqmU9l9TUsLln Dex48Cau5z7q5P7jMVoD/58R1IapXkM6R/lrSwKQ0j1iPUsWZ7YrubrEfvv0YQcO1S Jqx8RMLmR/VOOlfuW37VU/ZPw3FCMM3RGiFRJrzU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9CEB2F80507; Wed, 11 Aug 2021 20:57:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AF5CBF804FC; Wed, 11 Aug 2021 20:57:40 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C6C0FF8020D for ; Wed, 11 Aug 2021 20:57:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C6C0FF8020D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="ReA0dVCo" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17B9h6hH011884; Wed, 11 Aug 2021 13:57:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=9mk+IcNawFgWfDj5ophU/HQmwttfCHU7q52+p3GquR4=; b=ReA0dVCoPpTKkTJ0ktfOxJmzxNH6TJoDWFKymlYjM7kc7xXG8snY/GlvooGw3Sx1tvSO Yf+3MXT5QfOT4FxaFKZv7cV/BZxZOJcqY4FU9HYoBBNJBerdLLPBJ/ljjveLKUm0vUxz bHABVQsOtJm7Gxhsygh4q8C37UsiHjx6mdAiDZ9itYKBLWtYm6h2qDB3jaVjdNzfgz7J I5koABV5JnmR1/+7aVJkY9a2txUdiD+N8pn2ISsGU2ISqmSvA5MKtFl8G7uxE8War8qj Fpcmk4I5JE2yToOxAfF5yk+jMmR5ztIAS/rU5MsF7dmtDgwPUPXIDtCKNzI4EGy/PYPq CQ== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 3acc5ngnt3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 11 Aug 2021 13:57:26 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 11 Aug 2021 19:57:24 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.12 via Frontend Transport; Wed, 11 Aug 2021 19:57:24 +0100 Received: from vitaly-Inspiron-5415.ad.cirrus.com (unknown [198.90.238.180]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 8EF6345D; Wed, 11 Aug 2021 18:57:24 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH v4 00/27] ALSA: hda/cirrus: Split generic cirrus HDA codecs and CS8490 bridge into separate modules. Date: Wed, 11 Aug 2021 19:56:27 +0100 Message-ID: <20210811185654.6837-1-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 71bJun0WJ5zmjfCInKfazoVvScfGd5GF X-Proofpoint-GUID: 71bJun0WJ5zmjfCInKfazoVvScfGd5GF X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 phishscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108110130 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" This series of patches splits generic cirrus HDA codecs and CS8490 bridge into separate modules, adds support for multiple companion codecs connected to CS8409, and also adds support for new DELL HW platform. CS8409 part is not really a HDA codec, it is a HDA bridge where companion codecs (up to 16) can be attached. With growing number of supported configurations and platforms, patch_cirrus is getting less and less transparent and maintainable. So, the logical step is to separate generic Cirrus HDA codecs support and Cirrus HDA bridge support. Lots of improvements to existing functionality, code clean-up and refactoring, remove duplicated/redundant code, improve I2C functions etc. Add support for new DELL HW platform with 2 CS42L42 codecs for front and rear jacks. Lucas Tanure (12): ALSA: hda/cirrus: Move CS8409 HDA bridge to separate module ALSA: hda/cs8409: Move arrays of configuration to a new file ALSA: hda/cs8409: Disable unsolicited response for the first boot ALSA: hda/cs8409: Prevent I2C access during suspend time ALSA: hda/cs8409: Generalize volume controls ALSA: hda/cs8409: Dont disable I2C clock between consecutive accesses ALSA: hda/cs8409: Avoid setting the same I2C address for every access ALSA: hda/cs8409: Avoid re-setting the same page as the last access ALSA: hda/cs8409: Support i2c bulk read/write functions ALSA: hda/cs8409: Separate CS8409, CS42L42 and project functions ALSA: hda/cs8409: Move codec properties to its own struct ALSA: hda/cs8409: Add support for dolphin Stefan Binding (15): ALSA: hda/cs8409: Use enums for register names and coefficients ALSA: hda/cs8409: Mask all CS42L42 interrupts on initialization ALSA: hda/cs8409: Reduce HS pops/clicks for Cyborg ALSA: hda/cs8409: Disable unnecessary Ring Sense for Cyborg/Warlock/Bullseye ALSA: hda/cs8409: Disable unsolicited responses during suspend ALSA: hda/cs8409: Mask CS42L42 wake events ALSA: hda/cs8409: Simplify CS42L42 jack detect. ALSA: hda/cs8409: Support multiple sub_codecs for Suspend/Resume/Unsol events ALSA: hda/cs8409: Add Support to disable jack type detection for CS42L42 ALSA: hda/cs8409: Enable Full Scale Volume for Line Out Codec on Dolphin ALSA: hda/cs8409: Set fixed sample rate of 48kHz for CS42L42 ALSA: hda/cs8409: Use timeout rather than retries for I2C transaction waits ALSA: hda/cs8409: Remove unnecessary delays ALSA: hda/cs8409: Follow correct CS42L42 power down sequence for suspend ALSA: hda/cs8409: Unmute/Mute codec when stream starts/stops sound/pci/hda/Kconfig | 10 + sound/pci/hda/Makefile | 2 + sound/pci/hda/patch_cirrus.c | 1074 ---------------------- sound/pci/hda/patch_cs8409-tables.c | 560 ++++++++++++ sound/pci/hda/patch_cs8409.c | 1273 +++++++++++++++++++++++++++ sound/pci/hda/patch_cs8409.h | 369 ++++++++ 6 files changed, 2214 insertions(+), 1074 deletions(-) create mode 100644 sound/pci/hda/patch_cs8409-tables.c create mode 100644 sound/pci/hda/patch_cs8409.c create mode 100644 sound/pci/hda/patch_cs8409.h