RFC ALSA: hda - acomp probe fix for i915
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ALSA: hda - keep track of HDA core bus instance in acompinclude/ sound/ | +39 | 0 replies | |
| 2/2 | ALSA: hda/i915 - fix list corruption with concurrent probesinclude/ sound/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] ALSA: hda - acomp probe fix for i915
Hi,
this simple bugfix started to feel a bit like getting stuck in quicksand, so I'm looking for some early input via this RFC series.
Basicly hdac_i915.c should not use global state to track communication with i915 driver. But how to get handle of "hdac_bus*? I considered a few options:
1) add hdac_bus as a member of drm_audio_component.h
-> seems wrong as this is really an audio side implementation)
2) embed copy of drm_audio_component to 'struct hdac_bus', so I could use container_of() on the device handle to get to the bus
-> wasted space to keep a copy at hdac_bus level
(note: snd-hda-codec-hdmi do this by embedding a copy
of ops to "struct hdmi_spec")
3) add another devres entry to store the hdac_bus directly in acomp_init and a new helper function to query it
I now implemented option 3 in this RFC series as it seemed cleanest and most local to hdac_component.c, where the problem stems from. It's still somewhat messy, and I'm wondering if I'm overlooking some obvious alternative. We could dig this deeper into i915 specific code, but OTOH, hdac_bus is an argument snd_hdac_acomp_init(), so it's common for all.
Kai Vehmanen (2):
ALSA: hda - keep track of HDA core bus instance in acomp
ALSA: hda/i915 - fix list corruption with concurrent probes
include/sound/hda_component.h | 5 +++++ include/sound/hdaudio.h | 2 ++ sound/hda/hdac_component.c | 34 ++++++++++++++++++++++++++++++++++ sound/hda/hdac_i915.c | 16 +++++++++------- 4 files changed, 50 insertions(+), 7 deletions(-)
Signature · 1 line
2.28.0