Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package facetimehd for openSUSE:Factory checked in at 2026-09-02 16:58:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/facetimehd (Old) and /work/SRC/openSUSE:Factory/.facetimehd.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "facetimehd" Wed Sep 2 16:58:34 2026 rev:12 rq:1375102 version:0.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/facetimehd/facetimehd.changes 2026-06-17 16:29:13.042375109 +0200 +++ /work/SRC/openSUSE:Factory/.facetimehd.new.1265/facetimehd.changes 2026-09-02 16:58:41.230892569 +0200 @@ -1,0 +2,9 @@ +Tue Sep 1 11:41:54 UTC 2026 - Patrik Jakobsson <[email protected]> + +- Update to version 0.7.2 + * Two small cleanups: missing break and a hardcoded buffer count + * isp: assign y1 in the crop command + * v4l2: omit filling format description when >= v4.2 + * Now builds with v7.2 kernels + +------------------------------------------------------------------- Old: ---- facetimehd-0.7.0.2.tar.gz New: ---- facetimehd-0.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ facetimehd.spec ++++++ --- /var/tmp/diff_new_pack.mahQW3/_old 2026-09-02 16:58:41.949917565 +0200 +++ /var/tmp/diff_new_pack.mahQW3/_new 2026-09-02 16:58:41.951917635 +0200 @@ -17,7 +17,7 @@ Name: facetimehd -Version: 0.7.0.2 +Version: 0.7.2 Release: 0 Summary: Kernel driver for the Apple FacetimeHD webcams License: GPL-2.0-only ++++++ facetimehd-0.7.0.2.tar.gz -> facetimehd-0.7.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/facetimehd-0.7.0.2/dkms.conf new/facetimehd-0.7.2/dkms.conf --- old/facetimehd-0.7.0.2/dkms.conf 2026-06-15 10:21:34.000000000 +0200 +++ new/facetimehd-0.7.2/dkms.conf 2026-08-25 13:47:41.000000000 +0200 @@ -1,5 +1,5 @@ PACKAGE_NAME=facetimehd -PACKAGE_VERSION=0.7.0.2 +PACKAGE_VERSION=0.7.0.1 CLEAN="make clean" BUILT_MODULE_NAME[0]="facetimehd" BUILT_MODULE_LOCATION[0]="." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/facetimehd-0.7.0.2/fthd_drv.c new/facetimehd-0.7.2/fthd_drv.c --- old/facetimehd-0.7.0.2/fthd_drv.c 2026-06-15 10:21:34.000000000 +0200 +++ new/facetimehd-0.7.2/fthd_drv.c 2026-08-25 13:47:41.000000000 +0200 @@ -439,6 +439,11 @@ if (ret) return ret; + /* Query the sensor's native resolution now so fthd_v4l2_register() + * can advertise it. Non-fatal: if it fails the V4L2 layer falls back + * to a default size. */ + fthd_isp_cmd_channel_camera_config(dev_priv); + return fthd_isp_cmd_set_loadfile(dev_priv); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/facetimehd-0.7.0.2/fthd_drv.h new/facetimehd-0.7.2/fthd_drv.h --- old/facetimehd-0.7.0.2/fthd_drv.h 2026-06-15 10:21:34.000000000 +0200 +++ new/facetimehd-0.7.2/fthd_drv.h 2026-08-25 13:47:41.000000000 +0200 @@ -103,6 +103,11 @@ int sensor_count; int sensor_id0; int sensor_id1; + /* Native sensor resolution, read from the firmware's per-channel camera + * config. MacBookPro sensors report 1280x720; the 12-inch MacBook + * (MacBook8,1, sensor 1675) reports 848x588. 0 until detected. */ + unsigned int sensor_width; + unsigned int sensor_height; struct fthd_fmt fmt; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/facetimehd-0.7.0.2/fthd_isp.c new/facetimehd-0.7.2/fthd_isp.c --- old/facetimehd-0.7.0.2/fthd_isp.c 2026-06-15 10:21:34.000000000 +0200 +++ new/facetimehd-0.7.2/fthd_isp.c 2026-08-25 13:47:41.000000000 +0200 @@ -129,6 +129,16 @@ static int isp_enable_sensor(struct fthd_private *dev_priv) { + int ret; + + /* Power on sensor CMOS via SMC; some systems may not have CMPE */ + ret = isp_acpi_set_power(dev_priv, 1); + if (ret) + dev_warn(&dev_priv->pdev->dev, + "ACPI sensor power-on failed (%d), continuing\n", ret); + + mdelay(100); /* wait for sensor power rail to stabilize */ + return 0; } @@ -587,7 +597,11 @@ pr_debug("set file: addr %08lx, size %d\n", file->offset, (int)file->size); cmd.addr = file->offset; cmd.length = file->size; - return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SET_FILE_LOAD, &cmd, sizeof(cmd), NULL); + ret = fthd_isp_cmd(dev_priv, CISP_CMD_CH_SET_FILE_LOAD, &cmd, sizeof(cmd), NULL); + if (ret) + dev_warn(&dev_priv->pdev->dev, + "set file load failed (%d), continuing without calibration\n", ret); + return 0; } int fthd_isp_cmd_channel_info(struct fthd_private *dev_priv) @@ -648,6 +662,22 @@ break; snprintf(prefix, sizeof(prefix)-1, "CAMCONF%d ", i); print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, &cmd, sizeof(cmd)); + + /* The first two u16s of the config payload are the sensor's + * native width and height (e.g. 1280x720 on MacBookPro, + * 848x588 on the 12-inch MacBook). Record sensor 0's size so + * the V4L2 layer can advertise the real resolution instead of + * a hardcoded one. */ + if (i == 0) { + unsigned int w = cmd.data[0] | (cmd.data[1] << 8); + unsigned int h = cmd.data[2] | (cmd.data[3] << 8); + + if (w && h) { + dev_priv->sensor_width = w; + dev_priv->sensor_height = h; + pr_debug("sensor native resolution: %ux%u\n", w, h); + } + } } return ret; } @@ -677,7 +707,7 @@ memset(&cmd, 0, sizeof(cmd)); cmd.channel = channel; cmd.x1 = x1; - cmd.y2 = y2; + cmd.y1 = y1; cmd.x2 = x2; cmd.y2 = y2; len = sizeof(cmd); @@ -1115,16 +1145,15 @@ if (ret) return ret; - if (dev_priv->fmt.fmt.width < 1280 || - dev_priv->fmt.fmt.height < 720) { - x1 = 160; - x2 = 960; - } else { - x1 = 0; - x2 = 1280; - } + /* Crop the full sensor area. The 12-inch MacBook (MacBook8,1, sensor + * 1675) reports an 848x588 sensor via CISP_CMD_CH_CAMERA_CONFIG_GET; + * the old hardcoded 1280x720 crop exceeds that array and makes the + * sensor interface throw SIF errors. Use the negotiated format size. */ + x1 = 0; + x2 = dev_priv->fmt.fmt.width; - ret = fthd_isp_cmd_channel_crop_set(dev_priv, 0, x1, 0, x2, 720); + ret = fthd_isp_cmd_channel_crop_set(dev_priv, 0, x1, 0, x2, + dev_priv->fmt.fmt.height); if (ret) return ret; @@ -1262,9 +1291,6 @@ if (ret) return ret; - isp_acpi_set_power(dev_priv, 1); - mdelay(20); - pci_set_power_state(dev_priv->pdev, PCI_D0); mdelay(10); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/facetimehd-0.7.0.2/fthd_v4l2.c new/facetimehd-0.7.2/fthd_v4l2.c --- old/facetimehd-0.7.0.2/fthd_v4l2.c 2026-06-15 10:21:34.000000000 +0200 +++ new/facetimehd-0.7.2/fthd_v4l2.c 2026-08-25 13:47:41.000000000 +0200 @@ -25,6 +25,8 @@ #include "fthd_ringbuf.h" #include "fthd_buffer.h" +/* Fallback ceiling used only if the sensor's native size wasn't detected. + * The real per-device limit is dev_priv->sensor_width/height. */ #define FTHD_MAX_WIDTH 1280 #define FTHD_MAX_HEIGHT 720 #define FTHD_MIN_WIDTH 320 @@ -77,8 +79,8 @@ } *nbuffers = (4096 * 4096) / total_size; - if (*nbuffers > 4) - *nbuffers = 4; + if (*nbuffers > FTHD_BUFFERS) + *nbuffers = FTHD_BUFFERS; if (*nbuffers <= 1) return -ENOMEM; pr_debug("using %d buffers\n", *nbuffers); @@ -374,16 +376,22 @@ static int fthd_v4l2_ioctl_enum_fmt_vid_cap(struct file *filp, void *priv, struct v4l2_fmtdesc *fmt) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) char *desc = NULL; +#endif switch (fmt->index) { case 0: fmt->pixelformat = V4L2_PIX_FMT_YUYV; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) desc = "YUYV"; +#endif break; case 1: fmt->pixelformat = V4L2_PIX_FMT_YVYU; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) desc = "YVYU"; +#endif break; /* We don't support the mplane yet case 2: @@ -396,7 +404,9 @@ } fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) strncpy(fmt->description, desc, sizeof(fmt->description)); +#endif return 0; } @@ -405,18 +415,24 @@ struct v4l2_pix_format *pix) { + /* Upper bound is the sensor's native resolution (e.g. 1280x720 on + * MacBookPro, 848x588 on the 12-inch MacBook); fall back to the generic + * ceiling if it hasn't been detected yet. */ + unsigned int max_w = dev_priv->sensor_width ? : FTHD_MAX_WIDTH; + unsigned int max_h = dev_priv->sensor_height ? : FTHD_MAX_HEIGHT; + if (pix->pixelformat != V4L2_PIX_FMT_YUYV && pix->pixelformat != V4L2_PIX_FMT_YVYU) pix->pixelformat = V4L2_PIX_FMT_YUYV; if (pix->width < FTHD_MIN_WIDTH) pix->width = FTHD_MIN_WIDTH; - if (pix->width > FTHD_MAX_WIDTH) - pix->width = FTHD_MAX_WIDTH; + if (pix->width > max_w) + pix->width = max_w; if (pix->height < FTHD_MIN_HEIGHT) pix->height = FTHD_MIN_HEIGHT; - if (pix->height > FTHD_MAX_HEIGHT) - pix->height = FTHD_MAX_HEIGHT; + if (pix->height > max_h) + pix->height = max_h; pix->colorspace = V4L2_COLORSPACE_SRGB; pix->field = V4L2_FIELD_NONE; @@ -502,10 +518,14 @@ static int fthd_v4l2_ioctl_g_parm(struct file *filp, void *priv, struct v4l2_streamparm *parm) { - struct fthd_private *priv_dev = video_drvdata(filp); + /* Report a consistent 30 fps, matching what the sensor actually delivers + * and what enum_frameintervals advertises. The old frametime/1000 value + * (25 fps) disagreed with the real 30 fps rate, which made GStreamer's + * pipewiresrc compute negative frame durations and stall after one frame + * (e.g. GNOME Snapshot froze, while ffplay/v4l2-ctl were unaffected). */ struct v4l2_fract timeperframe = { - .numerator = priv_dev->frametime, - .denominator = 1000, + .numerator = 1, + .denominator = 30, }; if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) @@ -543,6 +563,8 @@ static int fthd_v4l2_ioctl_enum_framesizes(struct file *filp, void *priv, struct v4l2_frmsizeenum *sizes) { + struct fthd_private *dev_priv = video_drvdata(filp); + if (sizes->index) return -EINVAL; @@ -551,8 +573,8 @@ return -EINVAL; sizes->type = V4L2_FRMSIZE_TYPE_DISCRETE; - sizes->discrete.width = FTHD_MAX_WIDTH; - sizes->discrete.height = FTHD_MAX_HEIGHT; + sizes->discrete.width = dev_priv->sensor_width ? : FTHD_MAX_WIDTH; + sizes->discrete.height = dev_priv->sensor_height ? : FTHD_MAX_HEIGHT; return 0; } @@ -560,6 +582,10 @@ static int fthd_v4l2_ioctl_enum_frameintervals(struct file *filp, void *priv, struct v4l2_frmivalenum *interval) { + struct fthd_private *dev_priv = video_drvdata(filp); + unsigned int max_w = dev_priv->sensor_width ? : FTHD_MAX_WIDTH; + unsigned int max_h = dev_priv->sensor_height ? : FTHD_MAX_HEIGHT; + pr_debug("%s\n", __FUNCTION__); if (interval->index) @@ -571,8 +597,8 @@ return -EINVAL; if (interval->width & 7 - || interval->width > FTHD_MAX_WIDTH - || interval->height > FTHD_MAX_HEIGHT) + || interval->width > max_w + || interval->height > max_h) return -EINVAL; interval->type = V4L2_FRMIVAL_TYPE_DISCRETE; @@ -651,7 +677,7 @@ break; case V4L2_CID_AUTO_WHITE_BALANCE: ret = fthd_isp_cmd_channel_awb(dev_priv, 0, ctrl->val); - + break; default: break; @@ -742,10 +768,12 @@ video_device_release(vdev); goto fail_vdev; } - dev_priv->fmt.fmt.sizeimage = 1280 * 720 * 2; + /* Default to the sensor's native resolution (detected at probe), or the + * generic ceiling if detection didn't run. */ + dev_priv->fmt.fmt.width = dev_priv->sensor_width ? : FTHD_MAX_WIDTH; + dev_priv->fmt.fmt.height = dev_priv->sensor_height ? : FTHD_MAX_HEIGHT; dev_priv->fmt.fmt.pixelformat = V4L2_PIX_FMT_YUYV; - dev_priv->fmt.fmt.width = 1280; - dev_priv->fmt.fmt.height = 720; + dev_priv->fmt.fmt.sizeimage = dev_priv->fmt.fmt.width * dev_priv->fmt.fmt.height * 2; dev_priv->fmt.planes = 1; fthd_v4l2_adjust_format(dev_priv, &dev_priv->fmt.fmt);
