On 2024-11-06 8:34 PM, Wesley Cheng wrote:
In order to allow userspace/applications know about USB offloading status, expose a sound kcontrol that fetches information about which sound card and PCM index the USB device is mapped to for supporting offloading. In the USB audio offloading framework, the ASoC BE DAI link is the entity responsible for registering to the SOC USB layer.
... R) += mixer_usb_offload.o
diff --git a/sound/usb/mixer_usb_offload.c b/sound/usb/mixer_usb_offload.c new file mode 100644 index 000000000000..e0689a3b9b86 --- /dev/null +++ b/sound/usb/mixer_usb_offload.c @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include <linux/usb.h> + +#include <sound/core.h> +#include <sound/control.h> +#include <sound/soc-usb.h>
ALSA-components should not be dependent on ASoC ones. It should be done the other way around: ALSA <- ASoC.
+ +#include "usbaudio.h" +#include "card.h" +#include "helper.h" +#include "mixer.h" + +#include "mixer_usb_offload.h"