summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
Commit message (Collapse)AuthorAgeFilesLines
...
* media: pvrusb2: fix memory leak in pvr_probeDongliang Mu2022-06-201-0/+1
| | | | | | | | | | | | | | | The error handling code in pvr2_hdw_create forgets to unregister the v4l2 device. When pvr2_hdw_create returns back to pvr2_context_create, it calls pvr2_context_destroy to destroy context, but mp->hdw is NULL, which leads to that pvr2_hdw_destroy directly returns. Fix this by adding v4l2_device_unregister to decrease the refcount of usb interface. Reported-by: syzbot+77b432d57c4791183ed4@syzkaller.appspotmail.com Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: airspy: respect the DMA coherency rulesOliver Neukum2022-06-201-2/+15
| | | | | | | | | | | | | | | | If we want to avoid memory corruption on incoherent architectures, buffers for DMA must not reside - on the stack - embedded within other structures Allocate them separately. v2: fix uninitialized return value Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: stkwebcam: deprecate driver, move to stagingHans Verkuil2022-06-207-2165/+0
| | | | | | | | | | | | | | | This is a very old driver for very old hardware and it is one of the very few remaining that does not use the vb2 framework (or even the older videobuf framework), so deprecate this driver and move it to staging with the intent to removing it altogether by the end of 2022. If someone wants to keep this driver, then it has to be converted to use vb2. Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: usbtv: Add PAL-Nc standardJorge Maidana2022-06-202-2/+6
| | | | | | | | | Add PAL-Nc support to usbtv, the corresponding register value "0x00fe" comes from the Windows driver "Active Development Co., Ltd. v2.1.1.2". Signed-off-by: Jorge Maidana <jorgem.linux@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* Merge tag 'usb-5.19-rc1' of ↵Linus Torvalds2022-06-033-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the "big" set of USB and Thunderbolt driver changes for 5.18-rc1. For the most part it's been a quiet development cycle for the USB core, but there are the usual "hot spots" of development activity. Included in here are: - Thunderbolt driver updates: - fixes for devices without displayport adapters - lane bonding support and improvements - other minor changes based on device testing - dwc3 gadget driver changes. It seems this driver will never be finished given that the IP core is showing up in zillions of new devices and each implementation decides to do something different with it... - uvc gadget driver updates as more devices start to use and rely on this hardware as well - usb_maxpacket() api changes to remove an unneeded and unused parameter. - usb-serial driver device id updates and small cleanups - typec cleanups and fixes based on device testing - device tree updates for usb properties - lots of other small fixes and driver updates. All of these have been in linux-next for weeks with no reported problems" * tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits) USB: new quirk for Dell Gen 2 devices usb: dwc3: core: Add error log when core soft reset failed usb: dwc3: gadget: Move null pinter check to proper place usb: hub: Simplify error and success path in port_over_current_notify usb: cdns3: allocate TX FIFO size according to composite EP number usb: dwc3: Fix ep0 handling when getting reset while doing control transfer usb: Probe EHCI, OHCI controllers asynchronously usb: isp1760: Fix out-of-bounds array access xhci: Don't defer primary roothub registration if there is only one roothub USB: serial: option: add Quectel BG95 modem USB: serial: pl2303: fix type detection for odd device xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI xhci: Remove quirk for over 10 year old evaluation hardware xhci: prevent U2 link power state if Intel tier policy prevented U1 xhci: use generic command timer for stop endpoint commands. usb: host: xhci-plat: omit shared hcd if either root hub has no ports usb: host: xhci-plat: prepare operation w/o shared hcd usb: host: xhci-plat: create shared hcd after having added main hcd xhci: prepare for operation w/o shared hcd xhci: factor out parts of xhci_gen_setup() ...
| * media: remove third argument of usb_maxpacket()Vincent Mailhol2022-04-233-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The third argument of usb_maxpacket(): in_out has been deprecated because it could be derived from the second argument (e.g. using usb_pipeout(pipe)). N.B. function usb_maxpacket() was made variadic to accommodate the transition from the old prototype with three arguments to the new one with only two arguments (so that no renaming is needed). The variadic argument is to be removed once all users of usb_maxpacket() get migrated. CC: Sean Young <sean@mess.org> CC: Mauro Carvalho Chehab <mchehab@kernel.org> CC: Benjamin Valentin <benpicco@googlemail.com> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/r/20220317035514.6378-5-mailhol.vincent@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | media: stkwebcam: move stk_camera_read_reg() scratch buffer to struct stk_cameraTom Rix2022-05-132-9/+4
| | | | | | | | | | | | | | | | | | | | | | In stk_camera_read_reg() a single byte buffer is alloc-ed and freed on every function call. Since the size is known, move the buffer to the struct stk_camera where it will be alloc-ed and freed once. Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_initPavel Skripkin2022-05-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syzbot reported that -1 is used as array index. The problem was in missing validation check. hdw->unit_number is initialized with -1 and then if init table walk fails this value remains unchanged. Since code blindly uses this member for array indexing adding sanity check is the easiest fix for that. hdw->workpoll initialization moved upper to prevent warning in __flush_work. Reported-and-tested-by: syzbot+1a247e36149ffd709a9b@syzkaller.appspotmail.com Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: gspca: make the read-only array table static constColin Ian King2022-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | Don't populate the read-only array table on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: uvcvideo: Add UVC_GUID_FORMAT_H265James_Lin2022-05-082-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to add UVC_GUID_FORMAT_H265 High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2. They describe the same video encoding method. So for handling their behavior is the same. However, when external camera device describes this encoding method, some use hevc, some use h265. There is no uniform specification to describe this encoding method. So if an external camera device use h265 to describe this encoding method, driver will not recognize it. Therefore, this patch is to enable driver to read HEVC/H265 and convert it to V4L2_PIX_FMT_HEVC. Signed-off-by: James_Lin <Ping-lei.Lin@mediatek.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: uvcvideo: Undup use uvc_endpoint_max_bpi() codeRicardo Ribalda2022-05-083-5/+3
| | | | | | | | | | | | | | | | | | Replace manual decoding of psize in uvc_parse_streaming(), with the code from uvc_endpoint_max_bpi(). It also handles usb3 devices. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: uvcvideo: Simplify uvc_endpoint_max_bpi()Ricardo Ribalda2022-05-081-8/+1
| | | | | | | | | | | | | | | | | | | | | | The case USB_SPEED_WIRELESS and the default one were doing the same. Also, make always use of usb_endpoint_maxp_mult, as it should have a sane value, even for LOW speed and WIRELESS. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: uvcvideo: Fix memory leak if uvc_ctrl_add_mapping failsRicardo Ribalda2022-05-082-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Move all the life cycle of the name to add_mapping. This simplifies the error handling inside uvc_ioctl_ctrl_map and solves a memory leak when kemmdup fails. Also make sure that for custom controls, the user provides a valid name. Fixes: 07adedb5c606 ("media: uvcvideo: Use control names from framework") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: uvcvideo: Fix bit overflow in uvc_probe_videoHangyu Hua2022-05-081-3/+1
| | | | | | | | | | | | | | | | | | probe->dwMaxPayloadTransferSize is a 32bit value, but bandwidth is 16bit. This may lead to a bit overflow. Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: uvcvideo: Fix missing check to determine if element is found in listXiaomeng Tong2022-05-081-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The list iterator will point to a bogus position containing HEAD if the list is empty or the element is not found in list. This case should be checked before any use of the iterator, otherwise it will lead to a invalid memory access. The missing check here is before "pin = iterm->id;", just add check here to fix the security bug. In addition, the list iterator value will *always* be set and non-NULL by list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the element is not found in list, considering the (mis)use here: "if (iterm == NULL". Use a new value 'it' as the list iterator, while use the old value 'iterm' as a dedicated pointer to point to the found element, which 1. can fix this bug, due to 'iterm' is NULL only if it's not found. 2. do not need to change all the uses of 'iterm' after the loop. 3. can also limit the scope of the list iterator 'it' *only inside* the traversal loop by simply declaring 'it' inside the loop in the future, as usage of the iterator outside of the list_for_each_entry is considered harmful. https://lkml.org/lkml/2022/2/17/1032 Fixes: d5e90b7a6cd1c ("[media] uvcvideo: Move to video_ioctl2") Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: docs: media: uvcvideo: Use linux-media mailing listJonathan Neuschäfer2022-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | As discussed with other developers, the linux-uvc-devel mailing list is not very useful anymore, and it's better to send people to the general linux-media mailing list. Replace/remove the old mailing list address in uvcvideo.rst and MAINTAINERS. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: dib0700_devices: use an enum for the device numberMauro Carvalho Chehab2022-04-181-170/+258
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/028699ec71158dbc49d710a4259eb8cdb7f673cb.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: dibusb-mc: use an enum for the device numberMauro Carvalho Chehab2022-04-181-34/+54
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/f1d4fa4960b709152ae693800c830e19a4bc1f48.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: dibusb-mb: use an enum for the device numberMauro Carvalho Chehab2022-04-181-72/+93
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/a300c26ad4e9bb913e86eeaf0ec7d72b9e7d5d3e.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: vp7045: use an enum for the device numberMauro Carvalho Chehab2022-04-181-10/+18
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/0241bf842bf592dfa01b0ef4916afda396194f98.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: vp702x: use an enum for the device numberMauro Carvalho Chehab2022-04-181-8/+15
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/13bf6aab3909fae5da4c9a24c114b15e76abd146.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: umt-010: use an enum for the device numberMauro Carvalho Chehab2022-04-181-6/+12
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/5fd3c469faa115856f48037019e607edcb41d458.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: ttusb2: use an enum for the device numberMauro Carvalho Chehab2022-04-181-15/+21
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/b447d9fd3832da5eff6267e8fe742c431f1133f2.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: technisat-usb2: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-3/+8
| | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro. Link: https://lore.kernel.org/linux-media/c125c28aeb3d4344b632e1f99d81c433917f2a4c.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: pctv452e: use an enum for the device numberMauro Carvalho Chehab2022-04-181-8/+14
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/283a8c6bdf9778f832b4f6acc104c06688281668.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: opera1: use an enum for the device numberMauro Carvalho Chehab2022-04-181-5/+10
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/08861d80b6706ac1ed04a68959ebb78f27cb028d.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: nova-t-usb2: use an enum for the device numberMauro Carvalho Chehab2022-04-181-6/+12
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/58f1a356b7b75bbefef3aa07cd99896c446df32f.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: m920x: use an enum for the device numberMauro Carvalho Chehab2022-04-181-21/+30
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/c6f6bab97c39561add54f69a75980f4d453f7c17.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: gp8psk: use an enum for the device numberMauro Carvalho Chehab2022-04-181-13/+23
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/0d32148747df677f0c930605389c12b190c09bdf.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dw2102: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-45/+39
| | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro, and rename some PIDs. Link: https://lore.kernel.org/linux-media/828998ef3f0843bab4e84780e42f8f0802f57be7.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dtv5100: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-3/+8
| | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro. Link: https://lore.kernel.org/linux-media/6e7183735aacf33fff86bc709a38aafb6b858dff.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: dtt200u: use an enum for the device numberMauro Carvalho Chehab2022-04-181-21/+35
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/9fa3d1add4c58e1320dcc18578fda2d0106becda.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: digitv: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-4/+9
| | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro. Link: https://lore.kernel.org/linux-media/68de8820a361e61c25bf7402acac71b3770ff906.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: cxusb: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-65/+23
| | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro. Link: https://lore.kernel.org/linux-media/bd1e61664e234252de3dfac16aab8bfc35b7bcd7.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: cinergyT2-core: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-3/+7
| | | | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro and an enum with the USB model supported by this driver. Link: https://lore.kernel.org/linux-media/4b8212adab277a2bf84ab04480eb6fd37edda74f.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: az6027: use an enum for the device numberMauro Carvalho Chehab2022-04-181-17/+28
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/65b9775c39dcd21e5cb75a86e1e7b99b7d6eefcd.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: af9005: use the newer dvb-usb macros for USB deviceMauro Carvalho Chehab2022-04-181-11/+8
| | | | | | | | | | | | | | | | In order to make the drivers under dvb-usb more homogeneous, use the new macro. Link: https://lore.kernel.org/linux-media/9b1749763465815af92f0a4d8f210fe170c549d5.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: a800: use an enum for the device numberMauro Carvalho Chehab2022-04-181-6/+12
| | | | | | | | | | | | | | | | | | | | | | The device number is currently a value that needs to be the same on two separate tables, but the code doesn't actually enforce it, leading to errors as boards get added or removed. Fix it by using an enum. Link: https://lore.kernel.org/linux-media/dc8f9ec6cc8f2e16967a61752a292c46622c01dc.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: vp702x: reference to usb ID tableMauro Carvalho Chehab2022-04-181-2/+2
| | | | | | | | | | | | | | | | There are two commented entries that are pointing to the wrong places. Fix them. Link: https://lore.kernel.org/linux-media/fe9ee24510431e6baad5244d8a27e56ce167fc36.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* | media: dvb-usb: move USB IDs to dvb-usb-ids.hMauro Carvalho Chehab2022-04-183-21/+21
|/ | | | | | | | | Almost all drivers based on dvb-usb place their USB IDs at dvb-usb-ids.h. In order to make it more standard, place the remaining ones also there. Link: https://lore.kernel.org/linux-media/7b32d5383169d23082758a7b69edef2f099202f3.1648499509.git.mchehab@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: media/*/Kconfig: sort entriesMauro Carvalho Chehab2022-03-184-216/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the idems inside media Kconfig are out of order. Sort them using the script below: <script> use strict; use warnings; my %config; my @source; my $out; sub flush_config() { if (scalar %config) { for my $c (sort keys %config) { $out .= $config{$c} . "\n"; } %config = (); } return if (!scalar @source); $out .= "\n"; for my $s (sort @source) { $out .= $s; } $out .= "\n"; @source = (); } sub sort_kconfig($) { my $fname = shift; my $cur_config = ""; @source = (); $out = ""; %config = (); open IN, $fname or die; while (<IN>) { if (m/^config\s+(.*)/) { $cur_config = $1; $config{$cur_config} .= $_; } elsif (m/^source\s+(.*)/) { push @source, $_; } elsif (m/^\s+/) { if ($cur_config eq "") { $out .= $_; } else { $config{$cur_config} .= $_; } } else { flush_config(); $cur_config = ""; $out .= $_; } } close IN or die; flush_config(); $out =~ s/\n\n+/\n\n/g; $out =~ s/\n+$/\n/; open OUT, ">$fname"; print OUT $out; close OUT; } for my $fname(@ARGV) { sort_kconfig $fname } </script> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: Kconfig: cleanup VIDEO_DEV dependenciesMauro Carvalho Chehab2022-03-1818-71/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | media Kconfig has two entries associated to V4L API: VIDEO_DEV and VIDEO_V4L2. On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. VIDEO_DEV were meant to: 1) enable Video4Linux and make its Kconfig options to appear; 2) it makes the Kernel build the V4L core. while VIDEO_V4L2 where used to distinguish between drivers that implement the newer API and drivers that implemented the former one. With time, such meaning changed, specially after the removal of all V4L version 1 drivers. At the current implementation, VIDEO_DEV only does (1): it enables the media options related to V4L, that now has: menu "Video4Linux options" visible if VIDEO_DEV source "drivers/media/v4l2-core/Kconfig" endmenu but it doesn't affect anymore the V4L core drivers. The rationale is that the V4L2 core has a "soft" dependency at the I2C bus, and now requires to select a number of other Kconfig options: config VIDEO_V4L2 tristate depends on (I2C || I2C=n) && VIDEO_DEV select RATIONAL select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE default (I2C || I2C=n) && VIDEO_DEV In the past, merging them would be tricky, but it seems that it is now possible to merge those symbols, in order to simplify V4L dependencies. Let's keep VIDEO_DEV, as this one is used on some make *defconfig configurations. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for meson-vdec & meson-ge2d Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Acked-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: Makefiles: sort entries where it fitsMauro Carvalho Chehab2022-03-141-11/+21
| | | | | | | | | | | | | Alphabetically sort entries at the Makefiles per group, in ASCII order, e. g., using the output of: $ LC_ALL=C sort Makefile |grep obj-y ... $ LC_ALL=C sort Makefile |grep obj.*CONFIG ... Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: Makefiles: remove extra spacesMauro Carvalho Chehab2022-03-122-51/+51
| | | | | | | | | | | It is hard to keep all those options aligned as newer config changes get added, and we really don't want to have patches adding new options also touching already existing entries. So, drop the extra spaces. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* media: xc2028: rename the driver from tuner-xc2028Mauro Carvalho Chehab2022-03-127-7/+7
| | | | | | | | This is the only tuner driver that has "tuner-" on its name. Rename it, in order to match all the other tuner drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
* Merge tag 'br-v5.18l' of git://linuxtv.org/hverkuil/media_tree into media_stageMauro Carvalho Chehab2022-03-076-13/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag branch * tag 'br-v5.18l' of git://linuxtv.org/hverkuil/media_tree: (39 commits) media: imx-jpeg: Set V4L2_BUF_FLAG_LAST at eos media: meson-ir-tx: remove incorrect doc comment media: vivid: use time_is_after_jiffies() instead of open coding it media: wl128x: use time_is_before_jiffies() instead of open coding it media: tda8083: use time_is_after_jiffies() instead of open coding it media: stv0299: use time_is_before_jiffies() instead of open coding it media: si21xx: use time_is_before_jiffies() instead of open coding it media: cedrus: h264: Fix neighbour info buffer size media: cx88-mpeg: clear interrupt status register before streaming video media: cedrus: H265: Fix neighbour info buffer size media: fsl-viu: use GFP_KERNEL media: cx18: use GFP_KERNEL drivers: meson: vdec: add VP9 support to GXM stkwebcam: add new Asus laptop to upside_down table media: imx-jpeg: fix a bug of accessing array out of bounds media: sun6i-csi: fix colorspace in sun6i_video_try_fmt() media: usb: go7007: s2250-board: fix leak in probe() media: cedrus: Add watchdog for job completion pixfmt-yuv-planar.rst: fix typo: 'Cr, Cr' -> 'Cr, Cb' media: imx-jpeg: Remove unnecessary print function dev_err() ... Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
| * stkwebcam: add new Asus laptop to upside_down tableXose Vazquez Perez2022-02-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: ASUSTeK Computer Inc. Product Name: A6JC Version: 1.0 Serial Number: XXXXXXXXXXXXXXXXX UUID: XXXXXXXXXXXXXXXXX Wake-up Type: Power Switch SKU Number: To Be Filled By O.E.M. Family: To Be Filled By O.E.M. Handle 0x0002, DMI type 2, 15 bytes Base Board Information Manufacturer: ASUSTeK Computer Inc. Product Name: A6JC Version: 1.0 Serial Number: XXXXXXXXXXXXXXXXX Asset Tag: To Be Filled By O.E.M. Features: Board is a hosting board Board is replaceable Location In Chassis: To Be Filled By O.E.M. Chassis Handle: 0x0003 Type: Motherboard Contained Object Handles: 0 Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: MEDIA ML <linux-media@vger.kernel.org> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
| * media: usb: go7007: s2250-board: fix leak in probe()Dan Carpenter2022-02-221-6/+4
| | | | | | | | | | | | | | | | Call i2c_unregister_device(audio) on this error path. Fixes: d3b2ccd9e307 ("[media] s2250: convert to the control framework") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
| * media: gspca: remove redundant assignment of variable nColin Ian King2022-02-221-1/+0
| | | | | | | | | | | | | | | | | | The variable n is being assigned a value that is never read, it is being reassigned a different value a few statements later. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
| * media: go7007: Constify static struct snd_device_opsRikard Falkeborn2022-02-221-1/+1
| | | | | | | | | | | | | | | | | | The only usage of go7007_snd_device_ops is to pass its address to snd_device_new() which takes a pointer to const struct snd_device_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>