From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 26178C742B3 for ; Fri, 12 Jul 2019 10:05:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F0BCF208E4 for ; Fri, 12 Jul 2019 10:05:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="C2cKw5ml" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726847AbfGLKFj (ORCPT ); Fri, 12 Jul 2019 06:05:39 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38843 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfGLKFj (ORCPT ); Fri, 12 Jul 2019 06:05:39 -0400 Received: by mail-pg1-f196.google.com with SMTP id z75so4324004pgz.5 for ; Fri, 12 Jul 2019 03:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zPKXIcHbusk77dMlfPCa/1sWixdVcbelRHTA0cg2L4Q=; b=C2cKw5mlbFxaHuef/Zblshvk3SCxivxN7Cokh8Trvy8IBC0frCC7vhAVAMrGzP9wVT 2YWphmoTtgc6EoCPK14M+IpDI0uCpaDpMgOtSrZKZEcddcIln79L0hNRSdg6pK5I9OHS FZxYzonT8GmKPEb0e+jLeF4RKYC6nCV0bqp6s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zPKXIcHbusk77dMlfPCa/1sWixdVcbelRHTA0cg2L4Q=; b=IUKZLahnNMewgOXF7hEzJYxJ/sFZ3ilkP5eaDK/6Y0P5tQoYOmagqmgjfyNkrC31Nf LbEY1XjBD9/Uk+5AhI4UOu6zVwFNSvCOx7v89ENjIc02jO7tORlNa9oUjNxT5TQRLT6j EXa6UJmcI40Mf/biuuxDLWQJMtKwDumNYLYpt8vkpF6i9rvxMZXJrenU1+BimRI3etoO ANn8Eo26kPBFs4gf9HQMFBpCYmRoeAZIIjf1DcC3x2bU/FxntIZiT0BFDy1zVwVQCgWx kCYcayIQFLXz1Pf6d6WrZ/ndBYmTK2mK27AdbUSkDFMzW8QQ7wKyZgHnvqmrM5bJg0vr oFJQ== X-Gm-Message-State: APjAAAVohMy+5YoyAB4U7OgRQ4dbB4aEqXp9sVYLLNOAUoaTsB4bFQLX KKfV8ltxxainr+5VaCiEfdJKZECS9L8= X-Google-Smtp-Source: APXvYqyjMZCuuRdrj1uSqLUYcwCfp0hvoou5rl8zrRf7wxnMCSbMhZiH3x7uULLXEqA75Rd6MAfEvg== X-Received: by 2002:a17:90a:c588:: with SMTP id l8mr10572153pjt.16.1562925938350; Fri, 12 Jul 2019 03:05:38 -0700 (PDT) Received: from localhost ([2401:fa00:1:b:e688:dfd2:a1a7:2956]) by smtp.gmail.com with ESMTPSA id u23sm8647935pfn.140.2019.07.12.03.05.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2019 03:05:37 -0700 (PDT) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Cc: Hans Verkuil , Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , Russell King , Andrzej Hajda , Laurent Pinchart , David Airlie , Daniel Vetter , Heiko Stuebner , dianders@chromium.org, dgreid@chromium.org, tzungbi@chromium.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Cheng-Yi Chiang Subject: [PATCH v3 3/5] drm: dw-hdmi-i2s: Use fixed id for codec device Date: Fri, 12 Jul 2019 18:04:41 +0800 Message-Id: <20190712100443.221322-4-cychiang@chromium.org> X-Mailer: git-send-email 2.22.0.510.g264f2c817a-goog In-Reply-To: <20190712100443.221322-1-cychiang@chromium.org> References: <20190712100443.221322-1-cychiang@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The problem of using auto ID is that the device name will be like hdmi-audio-codec..auto. The number might be changed when there are other platform devices being created before hdmi-audio-codec device. Use a fixed name so machine driver can set codec name on the DAI link. Using the fixed name should be fine because there will only be one hdmi-audio-codec device. Fix the codec name in rockchip rk3288_hdmi_analog machine driver. Signed-off-by: Cheng-Yi Chiang --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2 +- sound/soc/rockchip/rk3288_hdmi_analog.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c index 7b93cf05c985..4974a32af31f 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c @@ -134,7 +134,7 @@ static int snd_dw_hdmi_probe(struct platform_device *pdev) memset(&pdevinfo, 0, sizeof(pdevinfo)); pdevinfo.parent = pdev->dev.parent; - pdevinfo.id = PLATFORM_DEVID_AUTO; + pdevinfo.id = PLATFORM_DEVID_NONE; pdevinfo.name = HDMI_CODEC_DRV_NAME; pdevinfo.data = &pdata; pdevinfo.size_data = sizeof(pdata); diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index 767700c34ee2..8286025a8747 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -142,7 +143,7 @@ static const struct snd_soc_ops rk_ops = { SND_SOC_DAILINK_DEFS(audio, DAILINK_COMP_ARRAY(COMP_EMPTY()), DAILINK_COMP_ARRAY(COMP_CODEC(NULL, NULL), - COMP_CODEC("hdmi-audio-codec.2.auto", "i2s-hifi")), + COMP_CODEC(HDMI_CODEC_DRV_NAME, "i2s-hifi")), DAILINK_COMP_ARRAY(COMP_EMPTY())); static struct snd_soc_dai_link rk_dailink = { -- 2.22.0.510.g264f2c817a-goog