mbox series

[0/2] ALSA/ASoC/SOF: SSP dev_type support

Message ID 20231127120657.19764-1-peter.ujfalusi@linux.intel.com (mailing list archive)
Headers show
Series ALSA/ASoC/SOF: SSP dev_type support | expand

Message

Peter Ujfalusi Nov. 27, 2023, 12:06 p.m. UTC
Hi,

SOF always passed 0 as dev_type to intel_nhlt_get_endpoint_blob() when looking
up the blob from the NHLT table. This causes issues since alsa-utils commit
3a47ef2487ed ("topology: nhlt: intel: support more device types and directions")

The dev_type is no longer always 0 in the topology embedded NHLT table resulting
lookup failures for analog codecs since they will have dev_type=4.

With SOF the dev_type is not used, we always use the SSP port index for looking
up the configuration blob.

The solution for the issue is to fetch the dev_type for the SSP port and feed it
back to the intel_nhlt_get_endpoint_blob() to be able to find the configuration
regardless of the assigned dev_type.


Regards,
Peter
---
Brent Lu (2):
  ALSA: hda: intel-nhlt: add intel_nhlt_ssp_device_type() function
  ASoC: SOF: ipc4-topology: support NHLT device type

 include/sound/intel-nhlt.h    | 10 ++++++++++
 sound/hda/intel-nhlt.c        | 26 ++++++++++++++++++++++++++
 sound/soc/sof/ipc4-topology.c | 19 ++++++++++++++++---
 3 files changed, 52 insertions(+), 3 deletions(-)

Comments

Peter Ujfalusi March 22, 2024, 11:30 a.m. UTC | #1
Hi Takashi,

On 27/11/2023 14:06, Peter Ujfalusi wrote:
> Hi,
> 
> SOF always passed 0 as dev_type to intel_nhlt_get_endpoint_blob() when looking
> up the blob from the NHLT table. This causes issues since alsa-utils commit
> 3a47ef2487ed ("topology: nhlt: intel: support more device types and directions")
> 
> The dev_type is no longer always 0 in the topology embedded NHLT table resulting
> lookup failures for analog codecs since they will have dev_type=4.
> 
> With SOF the dev_type is not used, we always use the SSP port index for looking
> up the configuration blob.
> 
> The solution for the issue is to fetch the dev_type for the SSP port and feed it
> back to the intel_nhlt_get_endpoint_blob() to be able to find the configuration
> regardless of the assigned dev_type.

Can you take these patches via the ALSA tree, I have hoped that it would
land in 6.9.

Thank you,
Peter

> Regards,
> Peter
> ---
> Brent Lu (2):
>   ALSA: hda: intel-nhlt: add intel_nhlt_ssp_device_type() function
>   ASoC: SOF: ipc4-topology: support NHLT device type
> 
>  include/sound/intel-nhlt.h    | 10 ++++++++++
>  sound/hda/intel-nhlt.c        | 26 ++++++++++++++++++++++++++
>  sound/soc/sof/ipc4-topology.c | 19 ++++++++++++++++---
>  3 files changed, 52 insertions(+), 3 deletions(-)
>
Takashi Iwai March 22, 2024, 11:42 a.m. UTC | #2
On Fri, 22 Mar 2024 12:30:44 +0100,
Péter Ujfalusi wrote:
> 
> Hi Takashi,
> 
> On 27/11/2023 14:06, Peter Ujfalusi wrote:
> > Hi,
> > 
> > SOF always passed 0 as dev_type to intel_nhlt_get_endpoint_blob() when looking
> > up the blob from the NHLT table. This causes issues since alsa-utils commit
> > 3a47ef2487ed ("topology: nhlt: intel: support more device types and directions")
> > 
> > The dev_type is no longer always 0 in the topology embedded NHLT table resulting
> > lookup failures for analog codecs since they will have dev_type=4.
> > 
> > With SOF the dev_type is not used, we always use the SSP port index for looking
> > up the configuration blob.
> > 
> > The solution for the issue is to fetch the dev_type for the SSP port and feed it
> > back to the intel_nhlt_get_endpoint_blob() to be able to find the configuration
> > regardless of the assigned dev_type.
> 
> Can you take these patches via the ALSA tree, I have hoped that it would
> land in 6.9.

It seems like to be overlooked.  I applied those now to for-linus
branch.  But it missed the PR to 6.9-rc1, so at earliest for 6.9-rc2.


thanks,

Takashi
Peter Ujfalusi March 26, 2024, 6:49 a.m. UTC | #3
On 22/03/2024 13:42, Takashi Iwai wrote:
> On Fri, 22 Mar 2024 12:30:44 +0100,
>> Can you take these patches via the ALSA tree, I have hoped that it would
>> land in 6.9.
> 
> It seems like to be overlooked.  I applied those now to for-linus
> branch.  But it missed the PR to 6.9-rc1, so at earliest for 6.9-rc2.

Thank you! 6.9-rc is perfect