Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3025997pxa; Tue, 18 Aug 2020 04:50:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuT46rJOfs4wQyC3w6OsHrnzh28OQaYRrokEikUu5O81XX41BfoWy11L4M2FTTKgUhCGGG X-Received: by 2002:a17:906:fcb3:: with SMTP id qw19mr20502084ejb.271.1597751405418; Tue, 18 Aug 2020 04:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597751405; cv=none; d=google.com; s=arc-20160816; b=o/PQUOW2i6Bwqg2eelpSvCYRXujqLF+M2mXkTYegLhsPC0FUpVFy39bvZmGSpww5+E 2802n3d4QixBWaPZWckntXbMFnL/FhBKg9DZNVoGc1Ecy7tRKlxzcc5k9W592NeMkT4/ CdRbus3lDRT9gzwqnHXPQy5Wop+V7g7QUfb5H9JJPiMdDNZicYfMjGfnJj/HhEj5FwPT U3YC75Wkp08b6VvzQhHFyT2RJwaZZaYFVSrkGQQ9MUf3tUyYmC6E/Mx8Fe/dNsiYHUM3 vyMA9TH8X4jCW4osn5IMUqG2DGruqYDOaoIu5VuMRkKQvrL+f4Z/jxL+n6tketW6YT53 +TTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=5VGtyGnA1R18GwT1TpuFS9sE8IWTBZyWpWSC24r/xSc=; b=Km9kQEdjeXRBjK7+zaCAz36I1XECeRYdWj51thVeLtL4K1dtVotnfByDRWjMgxjjrT FyL8SHdgEJQwv92/p+/c5suid7C4fDo1kPlwTbwaopNQYiTApLtPjV0KZtuINTDoTQHy /jG/BwiJTfJQVtjdyJPtjnKwC2Vg41Xsz6k3hcsvn0xxJoM8aQT1hak9m4B1MM+L6bSz o8hXyVGMJtyXwHzZwInmpnPuengcYHo1CPiTT4LKVcRYn2+xf1rQ3nvhSxGcU2qaKwRk /+W89tdIdLqY2XczHb5irQewiP4QYXcjYMjFiI76ZD9782P2EnNJlFaom+UirULM2zvW oI6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co5si7501635edb.210.2020.08.18.04.49.41; Tue, 18 Aug 2020 04:50:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726715AbgHRLq3 (ORCPT + 99 others); Tue, 18 Aug 2020 07:46:29 -0400 Received: from mga02.intel.com ([134.134.136.20]:58488 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbgHRLq2 (ORCPT ); Tue, 18 Aug 2020 07:46:28 -0400 IronPort-SDR: aMCHrtT7mIGUSXnqPHP7oXl9uWwXPKBkUx0aVH2MJjz7m6ow2wbY7EwZQC4BavZaE9Ft60pdnl 8QeSJSwjMMcQ== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="142711297" X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="142711297" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 04:46:27 -0700 IronPort-SDR: j87VtALN7VSQc97EPgjRULRXw0y2yHJyT8gk7363BfV7YVOW5Fq/nlRvuUBILX0Rcgi5NKLmi0 7Hd9QSeTXagA== X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="471777754" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 04:46:25 -0700 Date: Tue, 18 Aug 2020 14:45:22 +0300 (EEST) From: Kai Vehmanen X-X-Sender: kvehmane@eliteleevi.tm.intel.com To: Brent Lu cc: alsa-devel@alsa-project.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , =?ISO-8859-2?Q?Amadeusz_S=B3awi=F1ski?= , Guennadi Liakhovetski , Kai Vehmanen , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ASoC: hdac_hdmi: support 'ELD' mixer In-Reply-To: <20200818004413.12852-1-brent.lu@intel.com> Message-ID: References: <20200814083436.19845-1-brent.lu@intel.com> <20200818004413.12852-1-brent.lu@intel.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7 02160 Espoo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, a general comment first. We are trying to move development to patch_hdmi, but given we still have platforms using hdac_hdmi, this patch seems like a useful addition. On Tue, 18 Aug 2020, Brent Lu wrote: > Add an binary mixer 'ELD' to each HDMI PCM device so user space > could read the ELD data of external HDMI display. Minor spelling fixes: "Add a binary mixer" "so user space can read" > +static int hdac_hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol, > + struct snd_ctl_elem_value *ucontrol) > +{ [...] > + list_for_each_entry(port, &pcm->port_list, head) { > + eld = &port->eld; > + [...] > + memcpy(ucontrol->value.bytes.data, eld->eld_buffer, > + eld->eld_size); > + break; > + } This is a bit iffy part. If same PCM is connected to multiple receivers, you return ELD data for the first one and ignore the rest. OTOH, this is inline with comment in hdac_hdmi_get_port_from_cvt() in that this pcm-to-many routing is not really supported by the driver now. But jack status reporting is done a port basis, not per PCM/CVTs, so this is not fully aligned. Hmm. Given the proposed patch is aligned with the user-space interface exposed by patch_hdmi.c, I'm ok to go with this. Can you add an explicit comment to explain what is happening above? Br, Kai