From: Daniel Scheller <d.scheller.oss@gmail.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org,
mchehab@s-opensource.com
Cc: jasmin@anw.at, rjkm@metzlerbros.de
Subject: [PATCH 1/6] [media] ddbridge: fix gap handling
Date: Sun, 20 Aug 2017 12:41:09 +0200 [thread overview]
Message-ID: <20170820104114.6515-2-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20170820104114.6515-1-d.scheller.oss@gmail.com>
From: Daniel Scheller <d.scheller@gmx.net>
Force gap setting if given by attribute and enable gap for older regmaps.
Also, setting a gap value of 128 via sysfs will now disable gap.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
drivers/media/pci/ddbridge/ddbridge-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index c290d3fecc8d..98a12c644e44 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -336,6 +336,7 @@ static void calc_con(struct ddb_output *output, u32 *con, u32 *con2, u32 flags)
if (output->port->gap != 0xffffffff) {
flags |= 1;
gap = output->port->gap;
+ max_bitrate = 0;
}
if (dev->link[0].info->type == DDB_OCTOPUS_CI && output->port->nr > 1) {
*con = 0x10c;
@@ -372,6 +373,7 @@ static void calc_con(struct ddb_output *output, u32 *con, u32 *con2, u32 flags)
*con |= 0x810; /* 96 MBit/s and gap */
max_bitrate = 96000;
}
+ *con |= 0x10; /* enable gap */
}
}
if (max_bitrate > 0) {
@@ -3203,8 +3205,10 @@ static ssize_t gap_store(struct device *device, struct device_attribute *attr,
if (sscanf(buf, "%u\n", &val) != 1)
return -EINVAL;
- if (val > 20)
+ if (val > 128)
return -EINVAL;
+ if (val == 128)
+ val = 0xffffffff;
dev->port[num].gap = val;
return count;
}
--
2.13.0
next prev parent reply other threads:[~2017-08-20 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-20 10:41 [PATCH 0/6] ddbridge: updates from dddvb-0.9.31 Daniel Scheller
2017-08-20 10:41 ` Daniel Scheller [this message]
2017-08-20 10:41 ` [PATCH 2/6] [media] ddbridge: move ddb_unmap(), cleanup modparams Daniel Scheller
2017-08-20 10:41 ` [PATCH 3/6] [media] ddbridge: move device ID table to ddbridge-hw Daniel Scheller
2017-08-20 10:41 ` [PATCH 4/6] [media] ddbridge: remove ddb_info's from the global scope Daniel Scheller
2017-08-20 10:41 ` [PATCH 5/6] [media] ddbridge: const'ify all ddb_info, ddb_regmap et al Daniel Scheller
2017-08-20 10:41 ` [PATCH 6/6] [media] ddbridge: bump version string to 0.9.31intermediate-integrated Daniel Scheller
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=20170820104114.6515-2-d.scheller.oss@gmail.com \
--to=d.scheller.oss@gmail.com \
--cc=jasmin@anw.at \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mchehab@s-opensource.com \
--cc=rjkm@metzlerbros.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).