Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f2fd7ce6
Commit
f2fd7ce6
authored
Jun 08, 2014
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[media] au0828/au8522: Add PAL-M support
Signed-off-by:
Mauro Carvalho Chehab
<
m.chehab@samsung.com
>
parent
c9f5ccc2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
10 deletions
+41
-10
drivers/media/dvb-frontends/au8522_decoder.c
drivers/media/dvb-frontends/au8522_decoder.c
+34
-6
drivers/media/dvb-frontends/au8522_priv.h
drivers/media/dvb-frontends/au8522_priv.h
+1
-0
drivers/media/usb/au0828/au0828-video.c
drivers/media/usb/au0828/au0828-video.c
+6
-4
No files found.
drivers/media/dvb-frontends/au8522_decoder.c
View file @
f2fd7ce6
...
@@ -248,12 +248,23 @@ static void setup_decoder_defaults(struct au8522_state *state, bool is_svideo)
...
@@ -248,12 +248,23 @@ static void setup_decoder_defaults(struct au8522_state *state, bool is_svideo)
AU8522_TVDEC_COMB_MODE_REG015H_CVBS
);
AU8522_TVDEC_COMB_MODE_REG015H_CVBS
);
au8522_writereg
(
state
,
AU8522_TVDED_DBG_MODE_REG060H
,
au8522_writereg
(
state
,
AU8522_TVDED_DBG_MODE_REG060H
,
AU8522_TVDED_DBG_MODE_REG060H_CVBS
);
AU8522_TVDED_DBG_MODE_REG060H_CVBS
);
if
(
state
->
std
==
V4L2_STD_PAL_M
)
{
au8522_writereg
(
state
,
AU8522_TVDEC_FORMAT_CTRL1_REG061H
,
AU8522_TVDEC_FORMAT_CTRL1_REG061H_FIELD_LEN_525
|
AU8522_TVDEC_FORMAT_CTRL1_REG061H_LINE_LEN_63_492
|
AU8522_TVDEC_FORMAT_CTRL1_REG061H_SUBCARRIER_NTSC_AUTO
);
au8522_writereg
(
state
,
AU8522_TVDEC_FORMAT_CTRL2_REG062H
,
AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_PAL_M
);
}
else
{
/* NTSC */
au8522_writereg
(
state
,
AU8522_TVDEC_FORMAT_CTRL1_REG061H
,
au8522_writereg
(
state
,
AU8522_TVDEC_FORMAT_CTRL1_REG061H
,
AU8522_TVDEC_FORMAT_CTRL1_REG061H_FIELD_LEN_525
|
AU8522_TVDEC_FORMAT_CTRL1_REG061H_FIELD_LEN_525
|
AU8522_TVDEC_FORMAT_CTRL1_REG061H_LINE_LEN_63_492
|
AU8522_TVDEC_FORMAT_CTRL1_REG061H_LINE_LEN_63_492
|
AU8522_TVDEC_FORMAT_CTRL1_REG061H_SUBCARRIER_NTSC_MN
);
AU8522_TVDEC_FORMAT_CTRL1_REG061H_SUBCARRIER_NTSC_MN
);
au8522_writereg
(
state
,
AU8522_TVDEC_FORMAT_CTRL2_REG062H
,
au8522_writereg
(
state
,
AU8522_TVDEC_FORMAT_CTRL2_REG062H
,
AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_NTSC
);
AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_NTSC
);
}
au8522_writereg
(
state
,
AU8522_TVDEC_VCR_DET_LLIM_REG063H
,
au8522_writereg
(
state
,
AU8522_TVDEC_VCR_DET_LLIM_REG063H
,
AU8522_TVDEC_VCR_DET_LLIM_REG063H_CVBS
);
AU8522_TVDEC_VCR_DET_LLIM_REG063H_CVBS
);
au8522_writereg
(
state
,
AU8522_TVDEC_VCR_DET_HLIM_REG064H
,
au8522_writereg
(
state
,
AU8522_TVDEC_VCR_DET_HLIM_REG064H
,
...
@@ -624,6 +635,21 @@ static int au8522_s_video_routing(struct v4l2_subdev *sd,
...
@@ -624,6 +635,21 @@ static int au8522_s_video_routing(struct v4l2_subdev *sd,
return
0
;
return
0
;
}
}
static
int
au8522_s_std
(
struct
v4l2_subdev
*
sd
,
v4l2_std_id
std
)
{
struct
au8522_state
*
state
=
to_state
(
sd
);
if
((
std
&
(
V4L2_STD_PAL_M
|
V4L2_STD_NTSC_M
))
==
0
)
return
-
EINVAL
;
state
->
std
=
std
;
if
(
state
->
operational_mode
==
AU8522_ANALOG_MODE
)
au8522_video_set
(
state
);
return
0
;
}
static
int
au8522_s_audio_routing
(
struct
v4l2_subdev
*
sd
,
static
int
au8522_s_audio_routing
(
struct
v4l2_subdev
*
sd
,
u32
input
,
u32
output
,
u32
config
)
u32
input
,
u32
output
,
u32
config
)
{
{
...
@@ -681,6 +707,7 @@ static const struct v4l2_subdev_audio_ops au8522_audio_ops = {
...
@@ -681,6 +707,7 @@ static const struct v4l2_subdev_audio_ops au8522_audio_ops = {
static
const
struct
v4l2_subdev_video_ops
au8522_video_ops
=
{
static
const
struct
v4l2_subdev_video_ops
au8522_video_ops
=
{
.
s_routing
=
au8522_s_video_routing
,
.
s_routing
=
au8522_s_video_routing
,
.
s_stream
=
au8522_s_stream
,
.
s_stream
=
au8522_s_stream
,
.
s_std
=
au8522_s_std
,
};
};
static
const
struct
v4l2_subdev_ops
au8522_ops
=
{
static
const
struct
v4l2_subdev_ops
au8522_ops
=
{
...
@@ -763,6 +790,7 @@ static int au8522_probe(struct i2c_client *client,
...
@@ -763,6 +790,7 @@ static int au8522_probe(struct i2c_client *client,
}
}
state
->
c
=
client
;
state
->
c
=
client
;
state
->
std
=
V4L2_STD_NTSC_M
;
state
->
vid_input
=
AU8522_COMPOSITE_CH1
;
state
->
vid_input
=
AU8522_COMPOSITE_CH1
;
state
->
aud_input
=
AU8522_AUDIO_NONE
;
state
->
aud_input
=
AU8522_AUDIO_NONE
;
state
->
id
=
8522
;
state
->
id
=
8522
;
...
...
drivers/media/dvb-frontends/au8522_priv.h
View file @
f2fd7ce6
...
@@ -348,6 +348,7 @@ int au8522_led_ctrl(struct au8522_state *state, int led);
...
@@ -348,6 +348,7 @@ int au8522_led_ctrl(struct au8522_state *state, int led);
/* Format control 2 */
/* Format control 2 */
#define AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_AUTODETECT 0x00
#define AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_AUTODETECT 0x00
#define AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_NTSC 0x01
#define AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_NTSC 0x01
#define AU8522_TVDEC_FORMAT_CTRL2_REG062H_STD_PAL_M 0x02
#define AU8522_INPUT_CONTROL_REG081H_ATSC 0xC4
#define AU8522_INPUT_CONTROL_REG081H_ATSC 0xC4
...
...
drivers/media/usb/au0828/au0828-video.c
View file @
f2fd7ce6
...
@@ -1364,9 +1364,11 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
...
@@ -1364,9 +1364,11 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
i2c_gate_ctrl
(
dev
,
1
);
i2c_gate_ctrl
(
dev
,
1
);
/* FIXME: when we support something other than NTSC, we are going to
/*
have to make the au0828 bridge adjust the size of its capture
* FIXME: when we support something other than 60Hz standards,
buffer, which is currently hardcoded at 720x480 */
* we are going to have to make the au0828 bridge adjust the size
* of its capture buffer, which is currently hardcoded at 720x480
*/
v4l2_device_call_all
(
&
dev
->
v4l2_dev
,
0
,
video
,
s_std
,
norm
);
v4l2_device_call_all
(
&
dev
->
v4l2_dev
,
0
,
video
,
s_std
,
norm
);
...
@@ -1915,7 +1917,7 @@ static const struct video_device au0828_video_template = {
...
@@ -1915,7 +1917,7 @@ static const struct video_device au0828_video_template = {
.
fops
=
&
au0828_v4l_fops
,
.
fops
=
&
au0828_v4l_fops
,
.
release
=
video_device_release
,
.
release
=
video_device_release
,
.
ioctl_ops
=
&
video_ioctl_ops
,
.
ioctl_ops
=
&
video_ioctl_ops
,
.
tvnorms
=
V4L2_STD_NTSC_M
,
.
tvnorms
=
V4L2_STD_NTSC_M
|
V4L2_STD_PAL_M
,
};
};
/**************************************************************************/
/**************************************************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment