Received: by 10.213.65.68 with SMTP id h4csp78129imn; Wed, 21 Mar 2018 12:50:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELvI560W9YXiDeL3g81PVOegaHTkHuzOQQyRuIbhrd14QCbt14zo8wK1TUVbgxXJ7xl4gvSW X-Received: by 2002:a17:902:8c83:: with SMTP id t3-v6mr12274721plo.391.1521661814682; Wed, 21 Mar 2018 12:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521661814; cv=none; d=google.com; s=arc-20160816; b=OMyw3P0bkqQb4cHzzcx/MkoAdlEbTfHU/97YnOqflMLO90wR6zLUQGboegRbi4SjBX a0vbm4TXpotR7tUTilWMRiLtRYVsbaij1vz0TSpmPP8vClAtKYXmh3vl6w2dV+FqZSon 2q1KgIIWsST1bndhnMFr0fnr8z0JDBev7ffuDNrTu4GGOol2NkSey0iB/CT67Farp8A5 lyArpfQnZcMz17LLfCQGFRfcZxwki1el0LuEmoHA89nJLJkeOKMeGSKh9Tr6z/pF9dCZ tuoDcbkFBFOzds14G8yYUoaM4BfdXKYeT9Z3iREn+jz4utmklnwepcHbNJbpoL2dkzwO PJOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=t/3DEdNwIhmeL1B8jcRHwn0phvlGMfXaIKv9TsQYs1A=; b=r7d1CBevkzncKM9O4GkQ948ISpsrr5X+ry168oYmCVXOR6biPyjkRl8S+UJJU5EPdI EPXNahyztrd4w4r2p8HoK/1x+rbyqRWRJjI57648kKSxCYiEfC9pVkHzkEtMyd0GPov5 sPicz9jAEbV/cJI1V5nfW0X1yXaUiufSOQRgPINb5v/MeAxzgW5plSOkLqfNZJUerEYh rqfLU9mIu6yaO0FDVOzhPIJ0fI77kugdzt20KQwJ57il2zRzDYnVsYX9FaVHPQ6l85GO XiUdW6aFB/fq+p59lpIk9wgAWE/3d7Sd3wPAS9z2Vf0xeUs/JWihBcnAltnWN0rPYKqn FHuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=hNGWL5sn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf1-v6si4425553plb.477.2018.03.21.12.49.59; Wed, 21 Mar 2018 12:50:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=hNGWL5sn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753265AbeCUTsJ (ORCPT + 99 others); Wed, 21 Mar 2018 15:48:09 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:41208 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117AbeCUTsH (ORCPT ); Wed, 21 Mar 2018 15:48:07 -0400 Received: by mail-qk0-f196.google.com with SMTP id s78so6756053qkl.8 for ; Wed, 21 Mar 2018 12:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=t/3DEdNwIhmeL1B8jcRHwn0phvlGMfXaIKv9TsQYs1A=; b=hNGWL5sn9xi3i67rk3pRg0uIcKZMk2apr3Su9R1bC0K2r7VMiILLqjB8YA/iMZ5Cub 5DtqhylKsaLH0is84nHUeUsXlF2Ij6A13XMUmDmXKWe/9QdNiDOahEURV+SDDtxcuSy1 Y7GoT6XPRU2aZFsNY+ChKqlh8LuFmFWju5nAtWeVduYqPc4SepmKC6p9PZYfKyQnRoWR eZ/avBsHn3Nt7yA9ZDxK8Gwznde5UQ44BuZTyEaZN1m9kXeCv2pmLst42+EsMj6mR5mQ oZZ4Ybc9KeNvZ4H51LIolMiZlt6sjCKQrBxxu3VM3Q2vavEGePb6ta2Kqib2TVb3d8P2 BUrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=t/3DEdNwIhmeL1B8jcRHwn0phvlGMfXaIKv9TsQYs1A=; b=IvDnYqySGGcOaqlu1mKVlnrPUzPfsA9p1ZBY3gHSsmjv+xbThLSQLStErAMEo48WJ5 EuesLAlBd1bgclpyADWJpqvI+sEbaJ9waREyYuQioiutZ2i4i+ZH5JaWSVfJN6gAPnKv 6NQGfg4dRASoTKigRuQW+zx/LLATHkjgNIU2ddZ9o2pQDlvH5mNxSipP9rdIGhyXj5jF wjqJCka7pycYncn3325ioD/RnukazGgLux43ERldhT0GGSCNzWUCfTwRat63siJjaIFI 0Qk+Z6Tox9JmUHM7/olquWml+xLpQx3T8fft63NdCDZs4w+s4HhL6YNBqkCUn1Gve86r jnoA== X-Gm-Message-State: AElRT7HI5Q7b8qjmZmMD6BTs9qtB3H0Ia7KXKZQAl23MkieAmfpQAmh5 +7rnTDBaRIAeKb9yMqmhUI7bzkZ2z8U= X-Received: by 10.55.215.217 with SMTP id t86mr30743425qkt.199.1521661686258; Wed, 21 Mar 2018 12:48:06 -0700 (PDT) Received: from skullcanyon (cable-192.222.221.38.electronicbox.net. [192.222.221.38]) by smtp.gmail.com with ESMTPSA id j1sm3755906qkk.39.2018.03.21.12.48.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Mar 2018 12:48:05 -0700 (PDT) Message-ID: <1521661684.1190.8.camel@ndufresne.ca> Subject: Re: uvcvideo: Unknown video format,00000032-0002-0010-8000-00aa00389b71 From: Nicolas Dufresne To: Laurent Pinchart Cc: Paul Menzel , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, it+linux-media@molgen.mpg.de Date: Wed, 21 Mar 2018 15:48:04 -0400 In-Reply-To: <8273225.C6Qc70SQRM@avalon> References: <8f7d4aef-84f7-ae22-8adc-cba4fa881675@molgen.mpg.de> <15529671.DGPDy3yHsE@avalon> <1521603539.27691.5.camel@ndufresne.ca> <8273225.C6Qc70SQRM@avalon> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mercredi 21 mars 2018 à 10:55 +0200, Laurent Pinchart a écrit : > Hi Nicolas, > > On Wednesday, 21 March 2018 05:38:59 EET Nicolas Dufresne wrote: > > Le mardi 20 mars 2018 à 20:04 +0200, Laurent Pinchart a écrit : > > > On Tuesday, 20 March 2018 19:45:51 EET Nicolas Dufresne wrote: > > > > Le mardi 20 mars 2018 à 13:20 +0100, Paul Menzel a écrit : > > > > > Dear Linux folks, > > > > > > > > > > > > > > > On the Dell XPS 13 9370, Linux 4.16-rc6 outputs the messages below. > > > > > > > > > > ``` > > > > > [ 2.338094] calling uvc_init+0x0/0x1000 [uvcvideo] @ 295 > > > > > [ 2.338569] calling iTCO_wdt_init_module+0x0/0x1000 [iTCO_wdt] @ > > > > > 280 > > > > > [ 2.338570] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11 > > > > > [ 2.338713] iTCO_wdt: Found a Intel PCH TCO device (Version=4, > > > > > TCOBASE=0x0400) > > > > > [ 2.338755] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD > > > > > (0bda:58f4) > > > > > [ 2.338827] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0) > > > > > [ 2.338851] initcall iTCO_wdt_init_module+0x0/0x1000 [iTCO_wdt] > > > > > returned 0 after 271 usecs > > > > > [ 2.340669] uvcvideo 1-5:1.0: Entity type for entity Extension 4 > > > > > was > > > > > not initialized! > > > > > [ 2.340670] uvcvideo 1-5:1.0: Entity type for entity Extension 7 > > > > > was > > > > > not initialized! > > > > > [ 2.340672] uvcvideo 1-5:1.0: Entity type for entity Processing 2 > > > > > was > > > > > not initialized! > > > > > [ 2.340673] uvcvideo 1-5:1.0: Entity type for entity Camera 1 was > > > > > not > > > > > initialized! > > > > > [ 2.340736] input: Integrated_Webcam_HD: Integrate as > > > > > /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input9 > > > > > [ 2.341447] uvcvideo: Unknown video format > > > > > 00000032-0002-0010-8000-00aa00389b71 > > > > > > > > While the 0002 is suspicious, this is pretty close to a color format. > > > > I've recently come across of similar format using D3DFORMAT instead of > > > > GUID. According to the vendor*, this camera module includes an infrared > > > > camera (340x340), so I suspect this is to specify the format it > > > > outputs. A good guess to start with would be that this is > > > > D3DFMT_X8L8V8U8 (0x32). > > > > > > Isn't 0x32 D3DFMT_L8, not D3DFMT_X8L8V8U8 ? > > > > You are right, sorry about that, I totally miss-translate. It felt > > weird. This is much more likely yes. So maybe it's the same mapping > > (but with the -00002- instead) as what I added for the HoloLense > > Camera. > > > > > > To test it, you could map this > > > > V4L2_PIX_FMT_YUV32/xRGB and see if the driver is happy with the buffer > > > > size. > > > > > > VideoStreaming Interface Descriptor: > > > bLength 30 > > > bDescriptorType 36 > > > bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) > > > bFrameIndex 1 > > > bmCapabilities 0x00 > > > > > > Still image unsupported > > > > > > wWidth 340 > > > wHeight 340 > > > dwMinBitRate 55488000 > > > dwMaxBitRate 55488000 > > > dwMaxVideoFrameBufferSize 115600 > > > dwDefaultFrameInterval 166666 > > > bFrameIntervalType 1 > > > dwFrameInterval( 0) 166666 > > > > > > 340*340 is 115600, so this should be a 8-bit format. > > > > Indeed, that matches. > > > > > > Then render it to make sure it looks some image of some sort. A > > > > new format will need to be defined as this format is in the wrong > > > > order, and is ambiguous (it may mean AYUV or xYUV). I'm not sure if we > > > > need specific formats to differentiate infrared data from YUV images, > > > > need to be discussed. > > > > > > If the format is indeed D3DFMT_L8, it should map to V4L2_PIX_FMT_GREY > > > (8-bit luminance). I suspect the camera transmits a depth map though. > > > > I wonder if we should think of a way to tell userspace this is fnfrared > > data rather then black and white ? > > I think we need such a mechanism, yes. Would you like to propose one ? :-) Ok, meanwhile I've looked over how this camera was used. It seems that's it's combined with a IR light in order to create a near field depth. As we already exposes couple of depth sensors as GREY, I think your patch is ok, and should be merged. It's not really clear in general how the driver can really figure-out what type of data is delivered. So I'm not sure where to start. > > I've found https://www.magnumdb.com/search?q=value%3A > %2200000032-0002-0010-8000-00aa00389b71%22 and https://docs.microsoft.com/en-us/windows-hardware/drivers/stream/infrared-stream-support-in-uvc that confirm > this is a 8-bit IR format. > > > > > *https://dustinweb.azureedge.net/media/338953/xps-13-9370.pdf > > > > > > > > > [ 2.341450] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD > > > > > (0bda:58f4) > > > > > [ 2.343371] uvcvideo: Unable to create debugfs 1-2 directory. > > > > > [ 2.343420] uvcvideo 1-5:1.2: Entity type for entity Extension 10 > > > > > was > > > > > not initialized! > > > > > [ 2.343422] uvcvideo 1-5:1.2: Entity type for entity Extension 12 > > > > > was > > > > > not initialized! > > > > > [ 2.343423] uvcvideo 1-5:1.2: Entity type for entity Processing 9 > > > > > was > > > > > not initialized! > > > > > [ 2.343424] uvcvideo 1-5:1.2: Entity type for entity Camera 11 was > > > > > not initialized! > > > > > [ 2.343472] input: Integrated_Webcam_HD: Integrate as > > > > > /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/input/input10 > > > > > [ 2.343496] usbcore: registered new interface driver uvcvideo > > > > > [ 2.343496] USB Video Class driver (1.1.1) > > > > > [ 2.343501] initcall uvc_init+0x0/0x1000 [uvcvideo] returned 0 > > > > > after > > > > > 5275 usecs > > > > > ``` > > > > > > > > > > Please tell me, what I can do to improve the situation. > >