Message ID | 20230721132120.5523-1-rf@opensource.cirrus.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp217413vqg; Fri, 21 Jul 2023 06:48:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHZ4Zqp0X42nUNFakzhS8P5MU42U8+i47AsfcrDccNrXngsTGhS/nSeYergLHd2zm4QMw5 X-Received: by 2002:a17:906:59:b0:99b:4525:e06c with SMTP id 25-20020a170906005900b0099b4525e06cmr1973704ejg.55.1689947310157; Fri, 21 Jul 2023 06:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689947310; cv=none; d=google.com; s=arc-20160816; b=Ds67rqr+Yv+lASZDC8550YG+qweMc8VZdRcrKlYseeIBtPBBAfaDAQcJmHiBmmobk+ aq5S7FTdUKg/kEdOOrDs9PdHlP8Gt1gcV3amrjhrhH8mKe8jcuUizrHx5gDBaEQOQ/ZR uRAEbTqUz4o9dd60X6kZI9rRtd0RW68vQsiGegaLQs/1A4bez5//9gr/2tJcPym2nnyJ c1nHLPgRLsb8/chmbA2woL3M7GoqtXDaGfl1QxYB/QZ1Ter/GuSyt+6/p15nqDSZM+ns TNubm2f8+Ls78koffrdtgkNodoX3gCQe3ZToPLy0onMOT9qfljOjlARL7iVdudlCd5rp Ug9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Sras6w/5Pr5D4kJH/bAiUrfrDmtF07M5UZBHB6Cobro=; fh=JdM9SjXbj9GrwbVBI7uOIUyHIcEwChGvbNHjgE/+TkQ=; b=pQfoddALDZaRUVyWzvM4b2Ae2y/F5eolswV094BCM4d5gF9d8kqao6hgMbp94g+fGm d/rHdr1Y6V4fSplg86sY7Lj25Sk2qKm0I2hnRTd9fy45oLejCpqDzaAqo6u0F44T2vIr e4RJxOxpz8NQ21n9iJeabz/HNdutShO9Evn0NXRkhzTkN2ZwqGCFRiiR8pJfJWkDp3rK GEMkNszB5vDOksnlIoZTei+rCFb974PE0QEhFoITwel7P4tyioTQ+Td2S67y2XSngXwD b6WVRyAWikHoWZgEivvAozm5+L+8E9fdtaj5shAETQBCQujv1x32ZhTRu/ratUkAHM17 /Mag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=TCui+azW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb24-20020a170906b89800b009935121ecd6si2229361ejb.644.2023.07.21.06.48.04; Fri, 21 Jul 2023 06:48:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=TCui+azW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbjGUNWb (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Fri, 21 Jul 2023 09:22:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbjGUNWR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Jul 2023 09:22:17 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD2E83A87 for <linux-kernel@vger.kernel.org>; Fri, 21 Jul 2023 06:21:42 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36L5i7DV017256; Fri, 21 Jul 2023 08:21:25 -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=S ras6w/5Pr5D4kJH/bAiUrfrDmtF07M5UZBHB6Cobro=; b=TCui+azW+AqYraJY4 j6d1ZwkdaM7PMgxz4NsPuXxg7KQfmgSk71q4MC3cU3bo9SefvZxCL0b+mBfNmOb7 Ff9O4Wy0qiIXTxiB9WflHEK7Q97YehrL/0BItUl3bPKx6GmPZpLX+HUrzErHEyxH vK3pVogaSuw3PvJGy8IGh6p0mRz3YBIe16r7WK21MT9oWz/GdP39oET6YhBTzonS kXE2rXoWc9Bqs9yiYl+5VcQMD0OTmTwRpLYMulk9onLr602wNm3Tb4ZjIVZwJeMm xKBBAcs2XCMkr9Kkx9mB2IZTWWp6ZIztHGhdE9W+XcemGduYsXJSdKNUOhti9ye8 cWNPA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3rus6gyj2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 08:21:24 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Fri, 21 Jul 2023 14:21:23 +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.2.1118.30 via Frontend Transport; Fri, 21 Jul 2023 14:21:23 +0100 Received: from work-debian.ad.cirrus.com (unknown [198.61.64.172]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 0CF2146B; Fri, 21 Jul 2023 13:21:23 +0000 (UTC) From: Richard Fitzgerald <rf@opensource.cirrus.com> To: <broonie@kernel.org>, <tiwai@suse.com> CC: <perex@perex.cz>, <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com> Subject: [PATCH v5 00/11] ALSA: hda: Adding support for CS35L56 on HDA systems Date: Fri, 21 Jul 2023 14:21:09 +0100 Message-ID: <20230721132120.5523-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: HXrFS9q7grFIGNA6t1h9R1RCJh0569vT X-Proofpoint-GUID: HXrFS9q7grFIGNA6t1h9R1RCJh0569vT X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772038190938234385 X-GMAIL-MSGID: 1772038190938234385 |
Series |
ALSA: hda: Adding support for CS35L56 on HDA systems
|
|
Message
Richard Fitzgerald
July 21, 2023, 1:21 p.m. UTC
This set of patches adds support for using the CS35L56 boosted smart amplifier on HDA systems. In these systems the CS35L56 audio is routed through a HDA-to-I2S bridge codec. This doesn't include the changes to the Realtek driver to actually hook up the CS35L56 driver, because we don't yet have the QUIRK IDs to associate it with. But we want to publish the driver now so that it is available for bringing up hardware with the CS35L56. The first 9 patches are moving code out of the ASoC driver and into the shared library so that it can be shared with the HDA driver. Patch #10 fixes missing #includes in the HDA headers so that the CS35L56 driver doesn't have to #include headers that it doesn't use. CHANGES SINCE V5 The series has been rebased onto commit df4167d658d4 ("ASoC: cs35l56: Patch soft registers to defaults"), which removes cs35l56_reread_firmware_registers() and adds cs35l56_set_patch(). Changes are trivial so I have carried forward Mark's and Takashi's acks. Patch 01: - Also changes cs35l56_set_patch() argument to new struct cs35l56_base. Patch 11: - Remove call to cs35l56_reread_firmware_registers() - Add call to cs35l56_set_patch() in cs35l56_hda_common_probe() - Do not add mute_hook to struct hda_component. This was for use with CS8409 as an HDA bridge, but production systems will use Realtek, which has its own mute control. - Use strscpy() instead of strcpy() in cs35l56_hda_mixer_info() - Fix missing word in Kconfig option title Richard Fitzgerald (4): ASoC: cs35l56: Move runtime suspend/resume to shared library ASoC: cs35l56: Move cs_dsp init into shared library ASoC: cs35l56: Move part of cs35l56_init() to shared library ALSA: hda: Fix missing header dependencies Simon Trimmer (7): ASoC: cs35l56: Move shared data into a common data structure ASoC: cs35l56: Make cs35l56_system_reset() code more generic ASoC: cs35l56: Convert utility functions to use common data structure ASoC: cs35l56: Move utility functions to shared file ASoC: cs35l56: Make common function for control port wait ASoC: cs35l56: Make a common function to shutdown the DSP ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier include/sound/cs35l56.h | 29 +- sound/pci/hda/Kconfig | 31 + sound/pci/hda/Makefile | 6 + sound/pci/hda/cs35l56_hda.c | 995 ++++++++++++++++++++++++++++++ sound/pci/hda/cs35l56_hda.h | 48 ++ sound/pci/hda/cs35l56_hda_i2c.c | 69 +++ sound/pci/hda/cs35l56_hda_spi.c | 68 ++ sound/pci/hda/hda_auto_parser.h | 2 + sound/pci/hda/hda_generic.h | 3 + sound/soc/codecs/cs35l56-i2c.c | 14 +- sound/soc/codecs/cs35l56-sdw.c | 72 +-- sound/soc/codecs/cs35l56-shared.c | 458 +++++++++++++- sound/soc/codecs/cs35l56-spi.c | 10 +- sound/soc/codecs/cs35l56.c | 648 ++++--------------- sound/soc/codecs/cs35l56.h | 15 +- 15 files changed, 1877 insertions(+), 591 deletions(-) create mode 100644 sound/pci/hda/cs35l56_hda.c create mode 100644 sound/pci/hda/cs35l56_hda.h create mode 100644 sound/pci/hda/cs35l56_hda_i2c.c create mode 100644 sound/pci/hda/cs35l56_hda_spi.c
Comments
On Fri, 21 Jul 2023 15:21:09 +0200, Richard Fitzgerald wrote: > > This set of patches adds support for using the CS35L56 boosted smart > amplifier on HDA systems. In these systems the CS35L56 audio is > routed through a HDA-to-I2S bridge codec. > > This doesn't include the changes to the Realtek driver to actually hook > up the CS35L56 driver, because we don't yet have the QUIRK IDs to > associate it with. But we want to publish the driver now so that it is > available for bringing up hardware with the CS35L56. > > The first 9 patches are moving code out of the ASoC driver and into the > shared library so that it can be shared with the HDA driver. > > Patch #10 fixes missing #includes in the HDA headers so that the CS35L56 > driver doesn't have to #include headers that it doesn't use. > > CHANGES SINCE V5 > The series has been rebased onto commit df4167d658d4 > ("ASoC: cs35l56: Patch soft registers to defaults"), which removes > cs35l56_reread_firmware_registers() and adds cs35l56_set_patch(). > > Changes are trivial so I have carried forward Mark's and Takashi's acks. Mark, I suppose it's fine to take all of those to my sound.git tree? Takashi
On Fri, Jul 21, 2023 at 04:50:35PM +0200, Takashi Iwai wrote: > Richard Fitzgerald wrote: > > Changes are trivial so I have carried forward Mark's and Takashi's acks. > Mark, I suppose it's fine to take all of those to my sound.git tree? Should be. Might be handy to have a branch to pull from in case of conflicts I guess but probably not essential?
On Fri, 21 Jul 2023 16:52:52 +0200, Mark Brown wrote: > > On Fri, Jul 21, 2023 at 04:50:35PM +0200, Takashi Iwai wrote: > > Richard Fitzgerald wrote: > > > > Changes are trivial so I have carried forward Mark's and Takashi's acks. > > > Mark, I suppose it's fine to take all of those to my sound.git tree? > > Should be. Might be handy to have a branch to pull from in case of > conflicts I guess but probably not essential? That's fine, I'll put a signed tag. thanks, Takashi
On Fri, 21 Jul 2023 17:04:33 +0200, Takashi Iwai wrote: > > On Fri, 21 Jul 2023 16:52:52 +0200, > Mark Brown wrote: > > > > On Fri, Jul 21, 2023 at 04:50:35PM +0200, Takashi Iwai wrote: > > > Richard Fitzgerald wrote: > > > > > > Changes are trivial so I have carried forward Mark's and Takashi's acks. > > > > > Mark, I suppose it's fine to take all of those to my sound.git tree? > > > > Should be. Might be handy to have a branch to pull from in case of > > conflicts I guess but probably not essential? > > That's fine, I'll put a signed tag. ... and it turned out that it's not cleanly applicable, presumably it's based on some more stuff of the latest asoc. So, Mark, feel free to apply through yours. Takashi
On Fri, 21 Jul 2023 14:21:09 +0100, Richard Fitzgerald wrote: > This set of patches adds support for using the CS35L56 boosted smart > amplifier on HDA systems. In these systems the CS35L56 audio is > routed through a HDA-to-I2S bridge codec. > > This doesn't include the changes to the Realtek driver to actually hook > up the CS35L56 driver, because we don't yet have the QUIRK IDs to > associate it with. But we want to publish the driver now so that it is > available for bringing up hardware with the CS35L56. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [01/11] ASoC: cs35l56: Move shared data into a common data structure commit: 898673b905b9318489430663083f629bc38c7461 [02/11] ASoC: cs35l56: Make cs35l56_system_reset() code more generic commit: cf6e7486de80b680fe178a6517dd7c4166a12dbc [03/11] ASoC: cs35l56: Convert utility functions to use common data structure commit: 0a2e49230f7f1796aa79c532426d56e8739ee4b1 [04/11] ASoC: cs35l56: Move utility functions to shared file commit: 8a731fd37f8b33026e545f5ee5cdd7b9a837cbeb [05/11] ASoC: cs35l56: Move runtime suspend/resume to shared library commit: 9974d5b57697770cba2a99c6fe925d01152cd544 [06/11] ASoC: cs35l56: Move cs_dsp init into shared library commit: 22e51dbb257a218e43de42764b5bdc5302f27cd1 [07/11] ASoC: cs35l56: Move part of cs35l56_init() to shared library commit: 84851aa055c890f2ea731a128e8feb64520c2c8e [08/11] ASoC: cs35l56: Make common function for control port wait commit: f32a2bcbc092d60ba8a1b00a22607b220d53a25e [09/11] ASoC: cs35l56: Make a common function to shutdown the DSP commit: 444dfa0912639fb2431553e8e54d2b35fdf590c2 [10/11] ALSA: hda: Fix missing header dependencies commit: 64e05321506261b737abdbfc7a82144f30d0a925 [11/11] ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier commit: 73cfbfa9caea8eda54b4c6e49a9555533660aa1e All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
On Mon, 24 Jul 2023 20:28:08 +0200, Mark Brown wrote: > > On Fri, 21 Jul 2023 14:21:09 +0100, Richard Fitzgerald wrote: > > This set of patches adds support for using the CS35L56 boosted smart > > amplifier on HDA systems. In these systems the CS35L56 audio is > > routed through a HDA-to-I2S bridge codec. > > > > This doesn't include the changes to the Realtek driver to actually hook > > up the CS35L56 driver, because we don't yet have the QUIRK IDs to > > associate it with. But we want to publish the driver now so that it is > > available for bringing up hardware with the CS35L56. > > > > [...] > > Applied to > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Mark, could you send an earlier PR including this? Otherwise we'll be in a messy situation when applying further conflicting patches like TAS HD-audio codec patches. thanks, Takashi