Sharing media resources across ALSA and au0828 drivers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest31 patches 47 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/31 | uapi/media.h: Declare interface types for ALSAdrivers/ include/ | +20 | 4 replies | |
| 2/31 | media: Add ALSA Media Controller function entitiesinclude/ | +8 | 1 reply | |
| 3/31 | media: Media Controller register/unregister entity_notify APIdrivers/ include/ | +86 | 2 replies | |
| 4/31 | media: Media Controller enable/disable source handler APIinclude/ | +19 | 4 replies | |
| 5/31 | media: Media Controller fix to not let stream_count go negativedrivers/ | +12 | 0 replies | |
| 6/31 | media: Media Controller export non locking __media_entity_setup_link()drivers/ | +1 | 0 replies | |
| 7/31 | media: Media Controller non-locking __media_entity_pipeline_start/stop()drivers/ include/ | +36 | 0 replies | |
| 8/31 | media: v4l-core add v4l_enable/disable_media_tuner() helper functionsdrivers/ include/ | +31 | 2 replies | |
| 9/31 | media: v4l2-core add v4l_vb2q_enable_media_tuner() helperdrivers/ include/ | +22 | 3 replies | |
| 10/31 | media: Move au8522_media_pads enum to au8522.h from au8522_priv.hdrivers/ drivers/ | +7 | 0 replies | |
| 11/31 | media: au8522 change to create MC pad for ALSA Audio Outdrivers/ drivers/ | +2 | 0 replies | |
| 12/31 | media: au0828 Use au8522_media_pads enum for pad definesdrivers/ | +5 | 0 replies | |
| 13/31 | media: au0828 fix au0828_create_media_graph() entity checksdrivers/ | +17 | 2 replies | |
| 14/31 | media: Change v4l-core to check for tuner availabilitydrivers/ drivers/ drivers/ | +34 | 0 replies | |
| 15/31 | media: dvb-frontend invoke enable/disable_source handlersdrivers/ drivers/ | +24 | 4 replies | |
| 16/31 | media: au0828 video remove au0828_enable_analog_tuner()drivers/ | +0 | 0 replies | |
| 17/31 | media: au0828 video change to use v4l_enable_media_tuner()drivers/ | +12 | 3 replies | |
| 18/31 | media: au0828 change to use Managed Media Controller APIdrivers/ | +22 | 0 replies | |
| 19/31 | media: au0828 handle media_init and media_register windowdrivers/ | +24 | 0 replies | |
| 20/31 | media: au0828 change to register/unregister entity_notify hookdrivers/ drivers/ | +78 | 3 replies | |
| 21/31 | media: au0828 create tuner to decoder link in deactivated statedrivers/ | +2 | 0 replies | |
| 22/31 | media: dvb-core create tuner to demod pad link in disabled statedrivers/ | +2 | 2 replies | |
| 23/31 | media: au0828 implement enable_source and disable_source handlersdrivers/ drivers/ | +150 | 2 replies | |
| 24/31 | media: au0828 fix null pointer reference in au0828_create_media_graph()drivers/ | +15 | 2 replies | |
| 25/31 | media: au0828 fix to not call media_device_unregister_entity_notify()drivers/ | +0 | 2 replies | |
| 26/31 | sound/usb: Update ALSA driver to use Managed Media Controller APIsound/ sound/ sound/ +7 more | +323 | 2 replies | |
| 27/31 | sound/usb: Create media mixer function and control interface entitiessound/ sound/ sound/ +2 more | +118 | 0 replies | |
| 28/31 | media: au0828 create link between ALSA Mixer and decoderdrivers/ drivers/ | +15 | 2 replies | |
| 29/31 | media: track media device unregister in progressdrivers/ include/ | +21 | 5 replies | |
| 30/31 | sound/usb: Check media device unregister progress statesound/ sound/ sound/ +1 more | +39 | 0 replies | |
| 31/31 | media: au0828 change to check media device unregister progress statedrivers/ | +3 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/31] Sharing media resources across ALSA and au0828 drivers
This patch series updates ALSA driver, and au0828 core driver to use Managed Media controller API and Media Controller API to share tuner.
Media Controller Next Generation API has been enhanced to add two new interfaces to register and unregister entity_notify hooks to allow drivers to take appropriate actions when as new entities get added to the shared media device.
Mauro and Takashi: I am hoping you can both coordinate and decide on ALSA patches once the reviews are done and the patches look good.
Design Highlights:
1. ALSA to check for resources and hold in snd_usb_hw_params(), and release from snd_usb_hw_free(). This change fixed the lockdep warnings seen when resources were held in TRIGGER_START and released from TRIGGER_STOP which could run in IRQ context. I acknowledge Clemens Ladisch for suggesting the correct places to hold/free resources to avoid IRQ path complications.
2. The Bridge driver (au0828) owns and drives the graph creation as well as enabling and disabling tuner. It also keeps state information to avoid graph walks in enable_source and disable_source handler. I acknowledge Hans Verkuil for his suggestions and ideas for this change.
Tested exclusion between digital, analog, and audio to ensure when tuner has an active link to DVB FE, analog, and audio will detect and honor the tuner busy conditions and vice versa.
Please find the graphs generated using mc_nextgen_test tool at various points during testing at:
https://drive.google.com/folderview?id=0B0NIL0BQg-AlRndaaXViSXdPeTA&usp=sharing
This patch series is a rebase and update to the latest Media Controller Next Gen API of the Media Controller Next Generation API port.
Rebase highlights:
1. Changes to videobuf2 framework required additional v4l2 helper function to enable the tuner from vb2_core_streamon(). Patch 9 has this work.
2. Media device initialization and registration steps are now split in the latest Media Controller Next Gen API. This required changes to au0828 and ALSA to coordinate initialization and registration of the Managed Media Device they share. Patch 19 shows au0828 changes. ALSA changes for this are folded into the main ALSA patch 26.
3. Media device unregistration does more cleanup now. As a result, au0828 and ALSA need to coordinate so media device is done only once. These changes are in patches: 29, 30, and 31.
4. In addition, media device resources cleanup gets done before snd_card_disconnect(). This work is in patch 30.
Media Controller Next Generation API port from Media Controller API:
The patch series below was a port of the Patch v3 - Media Controller API to Next Gen API and Mixer patch update to address comments and bug fixes:
https://www.mail-archive.com/[email protected]/msg93086.html
https://www.mail-archive.com/[email protected]/msg93417.html
Patch v3 - Media Controller API:
https://www.mail-archive.com/[email protected]/msg92572.html
Mauro Carvalho Chehab (1):
uapi/media.h: Declare interface types for ALSA
Shuah Khan (30):
media: Add ALSA Media Controller function entities
media: Media Controller register/unregister entity_notify API
media: Media Controller enable/disable source handler API
media: Media Controller fix to not let stream_count go negative
media: Media Controller export non locking __media_entity_setup_link()
media: Media Controller non-locking
__media_entity_pipeline_start/stop()
media: v4l-core add v4l_enable/disable_media_tuner() helper functions
media: v4l2-core add v4l_vb2q_enable_media_tuner() helper
media: Move au8522_media_pads enum to au8522.h from au8522_priv.h
media: au8522 change to create MC pad for ALSA Audio Out
media: au0828 Use au8522_media_pads enum for pad defines
media: au0828 fix au0828_create_media_graph() entity checks
media: Change v4l-core to check for tuner availability
media: dvb-frontend invoke enable/disable_source handlers
media: au0828 video remove au0828_enable_analog_tuner()
media: au0828 video change to use v4l_enable_media_tuner()
media: au0828 change to use Managed Media Controller API
media: au0828 handle media_init and media_register window
media: au0828 change to register/unregister entity_notify hook
media: au0828 create tuner to decoder link in deactivated state
media: dvb-core create tuner to demod pad link in disabled state
media: au0828 implement enable_source and disable_source handlers
media: au0828 fix null pointer reference in
au0828_create_media_graph()
media: au0828 fix to not call media_device_unregister_entity_notify() sound/usb: Update ALSA driver to use Managed Media Controller API sound/usb: Create media mixer function and control interface entities
media: au0828 create link between ALSA Mixer and decoder
media: track media device unregister in progress sound/usb: Check media device unregister progress state
media: au0828 change to check media device unregister progress state
drivers/media/dvb-core/dvb_frontend.c | 139 ++--------- drivers/media/dvb-core/dvb_frontend.h | 3 + drivers/media/dvb-core/dvbdev.c | 3 +- drivers/media/dvb-frontends/au8522.h | 8 + drivers/media/dvb-frontends/au8522_decoder.c | 1 + drivers/media/dvb-frontends/au8522_priv.h | 8 - drivers/media/media-device.c | 66 ++++- drivers/media/media-entity.c | 65 +++-- drivers/media/usb/au0828/au0828-core.c | 355 ++++++++++++++++++++++----- drivers/media/usb/au0828/au0828-video.c | 75 +----- drivers/media/usb/au0828/au0828.h | 9 + drivers/media/v4l2-core/v4l2-dev.c | 48 ++++ drivers/media/v4l2-core/v4l2-fh.c | 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 29 +++ drivers/media/v4l2-core/videobuf2-core.c | 4 + include/media/media-device.h | 61 +++++ include/media/media-entity.h | 12 + include/media/v4l2-dev.h | 5 + include/uapi/linux/media.h | 17 +- sound/usb/Makefile | 15 +- sound/usb/card.c | 16 ++ sound/usb/card.h | 1 + sound/usb/media.c | 325 ++++++++++++++++++++++++ sound/usb/media.h | 75 ++++++ sound/usb/mixer.h | 1 + sound/usb/pcm.c | 26 +- sound/usb/quirks-table.h | 1 + sound/usb/quirks.c | 9 +- sound/usb/stream.c | 1 + sound/usb/usbaudio.h | 2 + 30 files changed, 1111 insertions(+), 270 deletions(-) create mode 100644 sound/usb/media.c create mode 100644 sound/usb/media.h
Signature · 1 line
2.5.0