]> git.baikalelectronics.ru Git - kernel.git/commit
media: au0828: fix enable and disable source audio and video inconsistencies
authorShuah Khan <shuah@kernel.org>
Tue, 2 Apr 2019 00:40:23 +0000 (20:40 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Apr 2019 15:22:30 +0000 (11:22 -0400)
commit2bd74b78d98780e703454de943f7b2a29f00e1a3
tree459d315505058d8d27485728b60996529a757a0a
parent37cf4b658d4d9cd332751470c2b200e4c68d2cdf
media: au0828: fix enable and disable source audio and video inconsistencies

Enable and disable source interfaces aren't consistent in enforcing
how video and audio share the tuner resource.

Fix these issues to enforce the following rules and allow
sharing between audio and video applications.

- When DVB is streaming, audio/video/vbi/s-video/composite
  should find the resource busy. DVB holds the tuner in
  exclusive mode.
- When video/VBI is streaming, audio can share the tuner and vice versa.
- v4l2 allows multiple applications to open video device.
- Video applications call enable source multiple times during their
  run-time. Resource should stay locked until the last application
  releases it.
- A shared resource should stay in shared state and locked when it is
  in use by audio and video. More than one video application is allowed
  to use the tuner as long as video streaming protocol allows such usage.
  Resource is released when the last video/audio application releases it.
- S-Video and Composite hold the resource in exclusive mode.

Signed-off-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/au0828/au0828-core.c
drivers/media/usb/au0828/au0828.h