diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-11-07 23:02:59 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-03-16 13:51:55 +0300 |
| commit | 01537c973d3aecd8f2e065e0449ef3e09495c917 (patch) | |
| tree | 71e10253f7c8233225a4f71c69b7e0817cf17b09 | |
| parent | ec6c3e3f0e61a9da2e7e4619248d18479b28b8a5 (diff) | |
| download | linux-01537c973d3aecd8f2e065e0449ef3e09495c917.tar.xz | |
media: vidtv: Rename PI definition to PI_SAMPLES
The definition of PI in the driver is not the actual value in radians,
but rather degrees. Since we are going to have a value in radians
defined in a global header, rename this definition to avoid potential
collisions. No functional changes.
Acked-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
| -rw-r--r-- | drivers/media/test-drivers/vidtv/vidtv_s302m.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/test-drivers/vidtv/vidtv_s302m.c b/drivers/media/test-drivers/vidtv/vidtv_s302m.c index 581497644940..3c08e442b2d1 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_s302m.c +++ b/drivers/media/test-drivers/vidtv/vidtv_s302m.c @@ -45,7 +45,7 @@ #define FF_S302M_DEFAULT_PTS_OFFSET 100000 /* Used by the tone generator: number of samples for PI */ -#define PI 180 +#define PI_SAMPLES 180 static const u8 reverse[256] = { /* from ffmpeg */ @@ -259,10 +259,10 @@ static u16 vidtv_s302m_get_sample(struct vidtv_encoder *e) if (!ctx->last_tone) return 0x8000; - pos = (2 * PI * ctx->note_offset * ctx->last_tone) / S302M_SAMPLING_RATE_HZ; + pos = (2 * PI_SAMPLES * ctx->note_offset * ctx->last_tone) / S302M_SAMPLING_RATE_HZ; ctx->note_offset++; - return (fixp_sin32(pos % (2 * PI)) >> 16) + 0x8000; + return (fixp_sin32(pos % (2 * PI_SAMPLES)) >> 16) + 0x8000; } /* bug somewhere */ |
