Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nhlt: Revert SSP_ANALOG device_type field #248

Closed
wants to merge 1 commit into from

Conversation

andyross
Copy link
Contributor

@andyross andyross commented Dec 7, 2023

This partially reverts commit 3a47ef2 ("topology: nhlt: intel: support more device types and directions"), which changed the default device_type in the endpoint descriptor from zero to SSP_ANALOG.

This change breaks the Linux kernel NHLT parser (which AFAICT doesn't recognize SSP_ANALOG at all), producing errors like:

[56458.583812] sof-audio-pci-intel-mtl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 2
[56458.583833] sof-audio-pci-intel-mtl 0000:00:1f.3: failed to prepare widget dai-copier.SSP.SSP0-Codec.playback
[56458.583840] sof-audio-pci-intel-mtl 0000:00:1f.3: Failed to prepare connected widgets
[56458.583847] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed widget list set up for pcm 1 dir 0
[56458.583853] sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -22

Revert for compatibility.

This partially reverts commit 3a47ef2 ("topology: nhlt: intel:
support more device types and directions"), which changed the default
device_type in the endpoint descriptor from zero to SSP_ANALOG.

This change breaks the Linux kernel NHLT parser (which AFAICT doesn't
recognize SSP_ANALOG at all), producing errors like:

  [56458.583812] sof-audio-pci-intel-mtl 0000:00:1f.3: no matching blob for sample rate: 48000 sample width: 32 channels: 2
  [56458.583833] sof-audio-pci-intel-mtl 0000:00:1f.3: failed to prepare widget dai-copier.SSP.SSP0-Codec.playback
  [56458.583840] sof-audio-pci-intel-mtl 0000:00:1f.3: Failed to prepare connected widgets
  [56458.583847] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed widget list set up for pcm 1 dir 0
  [56458.583853] sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -22

Revert for compatibility.

Signed-off-by: Andy Ross <[email protected]>
@plbossart
Copy link
Contributor

The revert isn't really needed, there's a kernel fix now.

https://lore.kernel.org/alsa-devel/[email protected]/

@kv2019i
Copy link

kv2019i commented Dec 8, 2023

FYI @andyross @plbossart @perexg thesofproject/sof#8396 for some background. In short, we should have blocked merge of this PR, but we did not and discovered this way too late (alsa-utils release was already out).

There's a still a problem if you use upstream alsa-utils to generate tplg files, and try to use them with kernel that does not have the fix. But granted, this affects a fairly small crowd.

@andyross
Copy link
Contributor Author

andyross commented Dec 8, 2023

FWIW: arch linux has actually shipped alsa-utils 1.2.10 with this regression, which is how I hit this. Other distros might too. But the workaround is trivial as long as you know about it. I'll leave this PR up until the kernel patch propagates far enough for us to cherry pick it internally.

@perexg perexg closed this in 8f3d84b Dec 8, 2023
@plbossart
Copy link
Contributor

The kernel patches are in @tiwai 's tree now, see https://lore.kernel.org/alsa-devel/[email protected]/

@perexg
Copy link
Member

perexg commented Dec 8, 2023

I applied this revert. It seems like a more safer solution. The code should be extended to set the device_type different than zero (NHLT_DEVICE_TYPE_SSP_BT_SIDEBAND).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants