All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: CrazyCat <crazycat69@yandex.ru>
Cc: Antti Palosaari <crope@iki.fi>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH] dvb_frontend: Multistream support
Date: Fri, 17 Aug 2012 16:01:14 -0300	[thread overview]
Message-ID: <502E94FA.6080301@redhat.com> (raw)
In-Reply-To: <839331345224097@web14d.yandex.ru>

Em 17-08-2012 14:21, CrazyCat escreveu:
> 
> 16.08.2012, 21:11, "Antti Palosaari" <crope@iki.fi>:
>>>  - /* ISDB-T specifics */
>>>  - u32 isdbs_ts_id;
>>>  -
>>>  - /* DVB-T2 specifics */
>>>  - u32                     dvbt2_plp_id;
>>>  + /* Multistream specifics */
>>>  + u32 stream_id;
>>
>> u32 == 32 bit long unsigned number. See next comment.
>>>
>>>  - c->isdbs_ts_id = 0;
>>>  - c->dvbt2_plp_id = 0;
>>>  + c->stream_id = -1;
>>
>> unsigned number cannot be -1. It can be only 0 or bigger. Due to that
>> this is wrong.
> 
> so maybe better declare in as int ? depend from standard valid stream id (for DVB is 0-255) and any another value (-1) disable stream filtering in demod.

It should be noticed that DVBv5 will pass it as u32 in any case.
So, maybe it is better to use UINT_MAX as the no-filter value:

/home/v4l/v4l/patchwork/include/linux/kernel.h:#define UINT_MAX	(~0U)


Some care is needed when doing that, to avoid 32bits/64bits compat
conflicts. Also, this define doesn't exist in userspace.

so, maybe using something like:

#define NO_STREAM_ID_FILTER	(~0U)

Would work properly, as, even on 64bits system with 32bits userspace,
this should work

or, if we want to be pedantic:

#define NO_STREAM_ID_FILTER	((u32)(~0U))


> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  parent reply	other threads:[~2012-08-17 19:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 17:46 [PATCH] dvb_frontend: Multistream support CrazyCat
2012-08-16 18:11 ` Antti Palosaari
2012-08-16 23:14   ` Mauro Carvalho Chehab
2012-08-17 17:21   ` CrazyCat
2012-08-17 18:52     ` Antti Palosaari
2012-08-17 19:01     ` Mauro Carvalho Chehab [this message]
2012-08-21  0:42       ` CrazyCat
2012-08-21 20:42         ` Georgi Chorbadzhiyski
2012-09-11 18:18         ` Mauro Carvalho Chehab
2012-08-17 17:52   ` CrazyCat
2012-08-17 18:48     ` Mauro Carvalho Chehab
2012-08-17  1:11 ` Akihiro TSUKADA
  -- strict thread matches above, loose matches on Subject: below --
2012-09-13 14:13 CrazyCat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502E94FA.6080301@redhat.com \
    --to=mchehab@redhat.com \
    --cc=crazycat69@yandex.ru \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.