Linux Media Controller development
 help / color / mirror / Atom feed
* [Question] __u32 rangehigh in struct v4l2_frequency_band to a higher frequencies value
@ 2025-09-06 12:53 Yunseong Kim
  0 siblings, 0 replies; only message in thread
From: Yunseong Kim @ 2025-09-06 12:53 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel

Hello Mauro,

I have a question regarding the data type used in struct v4l2_frequency_band,
Current definition:

struct v4l2_frequency_band {
    ...
    __u32 rangehigh;
    ...
};

According to the official HackRF One documentation, frequency ranges up to 6 GHz
are supported. However, the rangehigh field is currently defined as __u32.
This means values above present 4294967294LL cannot be represented:
 https://elixir.bootlin.com/linux/v6.17-rc4/source/drivers/media/usb/hackrf/hackrf.c#L67

For example, the HackRF hardware itself can go over 6 GHz, even though the
officially provided ANT700 antenna only supports up to 1.1 GHz:
 https://greatscottgadgets.com/ant700/

With a different antenna, it seems feasible to use HackRF at 5.8 GHz related
discussion:
 https://github.com/greatscottgadgets/hackrf/issues/1274

Would it make sense to extend struct v4l2_frequency_band to allow rangehigh
values up to at least 6000000000ULL? Or has there already been any discussion
about changing this field to a wider type for SDR devices that support
higher frequencies?

I tried searching the mailing list archives for discussions on
v4l2_frequency_band rangehigh but couldn’t find anything relevant:
 https://www.mail-archive.com/search?a=1&l=linux-media%40vger.kernel.org&haswords=v4l2_frequency_band+rangehigh&x=0&y=0&from=&subject=&datewithin=1d&date=&notwords=&o=relevance

Examples in drivers:

.rangehigh  = 4294967294LL, /* max u32, hw goes over 7GHz */

Possible adjustment:

struct v4l2_frequency_band {
    ...
    __u64 rangehigh;
    ...
};

.rangehigh  = 6000000000ULL, /* 1 Hz to 6 GHz */

I’d appreciate your advice on whether extending this field (e.g., to __u64)
would be the right direction, or if there are other considerations in
the V4L2 framework.

Thank you very much for your time.

Best regards,
Yunseong Kim

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-06 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-06 12:53 [Question] __u32 rangehigh in struct v4l2_frequency_band to a higher frequencies value Yunseong Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox