From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
"Mark Brown" <broonie@kernel.org>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: Intel: avs: Provide support for fallback topology
Date: Tue, 5 Sep 2023 10:10:53 -0400 [thread overview]
Message-ID: <c597816f-558a-e28a-0511-020d35a25b46@linux.intel.com> (raw)
In-Reply-To: <5a3073a6-4d82-df2a-11fb-fd9027e6f3fa@linux.intel.com>
On 9/5/23 09:58, Amadeusz Sławiński wrote:
> On 9/5/2023 2:42 PM, Pierre-Louis Bossart wrote:
>>
>>
>> On 9/5/23 05:31, Amadeusz Sławiński wrote:
>>> HDA and HDMI devices are simple enough that in case of user not having
>>> topology tailored to their device, they can use fallback topology.
>>>
>>> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
>>> ---
>>> sound/soc/intel/avs/pcm.c | 22 ++++++++++++++++++++++
>>> 1 file changed, 22 insertions(+)
>>>
>>> diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
>>> index 1fbb2c2fadb5..8565a530706d 100644
>>> --- a/sound/soc/intel/avs/pcm.c
>>> +++ b/sound/soc/intel/avs/pcm.c
>>> @@ -796,6 +796,28 @@ static int avs_component_probe(struct
>>> snd_soc_component *component)
>>> ret = avs_load_topology(component, filename);
>>> kfree(filename);
>>> + if (ret == -ENOENT && !strncmp(mach->tplg_filename, "hda-", 4)) {
>>> + unsigned int vendor_id;
>>> +
>>> + if (sscanf(mach->tplg_filename, "hda-%08x-tplg.bin",
>>> &vendor_id) != 1)
>>> + return ret;
>>> +
>>> + if (((vendor_id >> 16) & 0xFFFF) == 0x8086)
>>> + mach->tplg_filename = devm_kasprintf(adev->dev, GFP_KERNEL,
>>> + "hda-8086-generic-tplg.bin");
>>
>> it's very odd to test for 0x8086 in a driver that only supports Intel
>> devices, isn't it?
>>
>> One of these two branches is always-true or there's a missing
>> explanation on what this 0x8086 is used for?
>>
>
> Differentiating between generic codecs
> (https://github.com/thesofproject/avs-topology-xml/tree/main/hda) and
> hdmi ones
> (https://github.com/thesofproject/avs-topology-xml/tree/main/hdmi), as
> topology targets codec.
Ah yes, 0x8086 for the codec vendor. I must admit I didn't click after a
4-day week-end...
BTW your list of topologies helps with my assertion that we are missing
a 'hardware layer' in the topology framework, it makes no sense to have
a proliferation of topology files that all look the same. We really need
the ability to tell which endpoints are active or not, and which
hardware interface to use on a given platform. copy-pasting and using
macros is going to lead us into a maintenance nightmare.
next prev parent reply other threads:[~2023-09-05 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 9:31 [PATCH] ASoC: Intel: avs: Provide support for fallback topology Amadeusz Sławiński
2023-09-05 12:42 ` Pierre-Louis Bossart
2023-09-05 13:58 ` Amadeusz Sławiński
2023-09-05 14:10 ` Pierre-Louis Bossart [this message]
2023-09-05 21:11 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c597816f-558a-e28a-0511-020d35a25b46@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.