Repository navigation
Conversation
drop the n for the UAOL support. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This reverts commit d3a9b8a. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
intel_uaol.c uses LOG_MODULE_REGISTER() but got zephyr/logging/log.h only indirectly. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
platform/intel/deep-buffer.conf can only be included once per topology. It names the pipeline and the PCM it creates after the DEEP_BUFFER_* variables, and those are global to the topology, so a second include which redefines them relocates the first deep buffer on top of the second one, which then fails to build. A topology which brings the UAOL in next to a function that already has a deep buffer of its own therefore has to leave the UAOL deep buffer out. Add the UAOL_DEEP_BUFFER key for it, and keep it true in cavs-uaol, where the UAOL is the only function of the topology. No functional change, cavs-uaol.tplg is unchanged. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The UAOL PCM and the widget format tables stopped at 192 kHz, which capped an offloaded USB device below the rates it can run at. Nothing on the link itself limits it. Add 384000 to the PCM rate list in cavs-uaol.conf and to every widget format table. The tables are CombineArrays expansions, so going from 15 to 16 rates takes the S16/S24/S32 tables from 315 to 336 combinations and the 32 bit only ones from 105 to 112. Reaching the new rate additionally depends on the host side, where the UAOL backend narrows the frontend by the link FIFO budget. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add sof-hda-generic-uaol.tplg, sof-hda-generic with the USB Audio Offload Link (UAOL) function appended, to have something to test the offload with on a plain HDA machine. The UAOL cannot be part of sof-hda-generic itself. A backend declared by the topology which the machine driver did not create makes the whole topology fail to load, and the UAOL DAIs are only there on ACE2 and newer platforms, and only with a kernel built with USB audio offload support. sof-hda-generic has to stay loadable on everything from SKL up, so the UAOL gets a topology of its own, which is asked for explicitly: options snd_sof tplg_filename=sof-hda-generic-uaol.tplg The module parameter also stops the machine driver from appending the -idisp suffix, so the topology carries the iDisp backends, as sof-hda-generic does. The UAOL backend IDs are fixed at 9 and 10 by skl_hda_dsp_generic regardless of which other functions the board has, so a single topology covers every HDA machine, no per-board variants are needed. The UAOL function comes from platform/intel/uaol-generic.conf, shared with the cavs-uaol function topology of the sof_sdw card. Its deep buffer is left out, the HDA playback already has the one deep buffer PCM the topology can hold. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
A UAOL link runs two streams per direction on the current hardware, and the kernel creates a backend for each of them, named UAOL<link>-Play<n> and UAOL<link>-Cap<n> in the order Play0, Cap0, Play1, Cap1. The first pair keeps the two consecutive dai link IDs it had. Rename the backends of the UAOL function to UAOL0-Play0 and UAOL0-Cap0 and take the hw_config names from the same variables. Add the second pair of paths in platform/intel/uaol-stream1.conf, the same paths on the UAOL_*1_* variables, pulled in when UAOL_NUM_STREAMS is 2. Its deep buffer is a second instance of the deepbuffer-playback pipeline in platform/intel/uaol-deep-buffer1.conf, on the UAOL_DB1_* variables, because platform/intel/deep-buffer.conf works on the global DEEP_BUFFER_* variables and can only be pulled in once. Both the development sof-hda-generic-uaol topology and the cavs-uaol function topology of the sof_sdw card expose both pairs, UAOL0 on PCM 21 and UAOL1 on PCM 22, the PCM names carrying the same ordinal as the route kcontrols; the sof_sdw one has a deep buffer for each, on PCM 23 and 24. The sof-uaol-id variants take the IDs of all four backends. The backend names stay abbreviated: alsa-lib keeps element ids in SNDRV_CTL_ELEM_ID_NAME_MAXLEN bytes, so once the dai-copier widget name 'dai-copier.UAOL.<backend>.<direction>' reaches 38 characters the ids of its 'dai.word' and 'dai.string' tuple sections collide and one set is silently dropped from the topology. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The development sof-hda-generic-uaol topology had no deep buffer for its UAOL PCMs: the first stream's deep buffer came from platform/intel/deep-buffer.conf, which builds its pipeline and PCM from the global DEEP_BUFFER_* variables and so can only be pulled in once per topology, and the HDA jack of sof-hda-generic already has that one. Give the first stream a deep buffer instance of its own, the way the second stream already has: platform/intel/uaol-deep-buffer.conf, the deepbuffer-playback pipeline on the UAOL_DB_* variables, routed into the mixer of the stream itself. UAOL_DEEP_BUFFER now only says whether a topology wants the UAOL deep buffers at all, independent of any other deep buffer it has. The cavs-uaol function topology keeps its two on PCM 23 and 24, and sof-hda-generic-uaol gets the same pair next to the Deepbuffer HDA Analog PCM. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…-only machines sof-hda-generic-uaol carries the HDA codec paths, which the machine driver would have dropped by picking sof-hda-generic-idisp on a machine with only an iDisp codec; with the topology named through tplg_filename that selection does not happen, and a backend for a codec the machine does not have fails the whole topology. Build the same file once more without HDA_CONFIG as sof-hda-generic-idisp-uaol, the HDMI passthrough paths of sof-hda-generic-idisp plus the UAOL function, for testing the USB audio offload on such a machine. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The frontend PCMs of the UAOL topologies are named after the link they run on, "UAOL0" and "UAOL1". What the user sees in aplay -l should say what the PCM is for, not which link carries it: "UAOL" is the name of Intel's link in the specifications and in the DAI names, the function is USB audio offload. Name the PCMs "USB Offload 0" and "USB Offload 1", with the deep buffers following as "Deepbuffer USB Offload <n>" like "Deepbuffer HDA Analog" does. This also pairs them by name with the kernel's "USB Offload <n> Playback Route" / "USB Offload <n> Capture Route" controls and the "USB Offload Jack", so that PCM, route control and jack of a stream share one name and the number tells them apart. The mixer volume controls derive their names from the PCM and follow along. The DAI copiers and the backend DAI links keep their UAOL names: those are the link and are matched by the machine driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport the needed topology patches and drop the UAOL disable so it can be built by default.