Commit 34599b9b authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] msi3101: sample is correct term for sample

Just fix wrong term name. No functional changes.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 977e444f
...@@ -405,8 +405,8 @@ struct msi3101_state { ...@@ -405,8 +405,8 @@ struct msi3101_state {
struct v4l2_ctrl *ctrl_tuner_if; struct v4l2_ctrl *ctrl_tuner_if;
struct v4l2_ctrl *ctrl_tuner_gain; struct v4l2_ctrl *ctrl_tuner_gain;
u32 symbol_received; /* for track lost packets */ u32 next_sample; /* for track lost packets */
u32 symbol; /* for symbol rate calc */ u32 sample; /* for sample rate calc */
unsigned long jiffies; unsigned long jiffies;
}; };
...@@ -476,18 +476,18 @@ static int msi3101_convert_stream(struct msi3101_state *s, u32 *dst, ...@@ -476,18 +476,18 @@ static int msi3101_convert_stream(struct msi3101_state *s, u32 *dst,
int i, j, k, l, i_max, dst_len = 0; int i, j, k, l, i_max, dst_len = 0;
u16 sample[4]; u16 sample[4];
#ifdef MSI3101_EXTENSIVE_DEBUG #ifdef MSI3101_EXTENSIVE_DEBUG
u32 symbol[3]; u32 sample_num[3];
#endif #endif
/* There could be 1-3 1024 bytes URB frames */ /* There could be 1-3 1024 bytes URB frames */
i_max = src_len / 1024; i_max = src_len / 1024;
for (i = 0; i < i_max; i++) { for (i = 0; i < i_max; i++) {
#ifdef MSI3101_EXTENSIVE_DEBUG #ifdef MSI3101_EXTENSIVE_DEBUG
symbol[i] = src[3] << 24 | src[2] << 16 | src[1] << 8 | src[0] << 0; sample_num[i] = src[3] << 24 | src[2] << 16 | src[1] << 8 | src[0] << 0;
if (i == 0 && s->symbol_received != symbol[0]) { if (i == 0 && s->next_sample != sample_num[0]) {
dev_dbg(&s->udev->dev, dev_dbg(&s->udev->dev,
"%d symbols lost, %d %08x:%08x\n", "%d samples lost, %d %08x:%08x\n",
symbol[0] - s->symbol_received, sample_num[0] - s->next_sample,
src_len, s->symbol_received, symbol[0]); src_len, s->next_sample, sample_num[0]);
} }
#endif #endif
src += 16; src += 16;
...@@ -520,21 +520,21 @@ static int msi3101_convert_stream(struct msi3101_state *s, u32 *dst, ...@@ -520,21 +520,21 @@ static int msi3101_convert_stream(struct msi3101_state *s, u32 *dst,
} }
#ifdef MSI3101_EXTENSIVE_DEBUG #ifdef MSI3101_EXTENSIVE_DEBUG
/* calculate symbol rate and output it in 10 seconds intervals */ /* calculate samping rate and output it in 10 seconds intervals */
if ((s->jiffies + msecs_to_jiffies(10000)) <= jiffies) { if ((s->jiffies + msecs_to_jiffies(10000)) <= jiffies) {
unsigned long jiffies_now = jiffies; unsigned long jiffies_now = jiffies;
unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies); unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies);
unsigned int symbols = symbol[i_max - 1] - s->symbol; unsigned int samples = sample_num[i_max - 1] - s->sample;
s->jiffies = jiffies_now; s->jiffies = jiffies_now;
s->symbol = symbol[i_max - 1]; s->sample = sample_num[i_max - 1];
dev_dbg(&s->udev->dev, dev_dbg(&s->udev->dev,
"slen=%d symbols=%u msecs=%lu symbolrate=%lu\n", "slen=%d samples=%u msecs=%lu sampling rate=%lu\n",
src_len, symbols, msecs, src_len, samples, msecs,
symbols * 1000UL / msecs); samples * 1000UL / msecs);
} }
/* last received symbol (symbol = symbol + i * 384) */ /* next sample (sample = sample + i * 384) */
s->symbol_received = symbol[i_max - 1] + 384; s->next_sample = sample_num[i_max - 1] + 384;
#endif #endif
return dst_len; return dst_len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment