提交 01ae7286 编写于 作者: D Dmitri Belimov 提交者: Mauro Carvalho Chehab

[media] xc5000: fix incorrect debug printnk

I found very small bug in xc5000 source. When set option debug=1 and
listen a radio we see in dmesg xc5000: xc_SetTVStandard()
Standard = M/N-NTSC/PAL-BTSC at all times. However, it should be, instead
"FM Radio-INPUT1_MONO".

That happens because xc5000_set_radio_freq() gets the correct value for
VideoMode and AudioMode for radio and calls xc_SetTVStandard() where name
of standard comes from the incorrect place priv->video_standard.

This incorrect debug message makes debugging  a little difficult.
Signed-off-by: NDmitry Belimov <d.belimov@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 b3d9a15d
...@@ -422,13 +422,19 @@ static int xc_initialize(struct xc5000_priv *priv) ...@@ -422,13 +422,19 @@ static int xc_initialize(struct xc5000_priv *priv)
} }
static int xc_SetTVStandard(struct xc5000_priv *priv, static int xc_SetTVStandard(struct xc5000_priv *priv,
u16 VideoMode, u16 AudioMode) u16 VideoMode, u16 AudioMode, u8 RadioMode)
{ {
int ret; int ret;
dprintk(1, "%s(0x%04x,0x%04x)\n", __func__, VideoMode, AudioMode); dprintk(1, "%s(0x%04x,0x%04x)\n", __func__, VideoMode, AudioMode);
dprintk(1, "%s() Standard = %s\n", if (RadioMode) {
__func__, dprintk(1, "%s() Standard = %s\n",
XC5000_Standard[priv->video_standard].Name); __func__,
XC5000_Standard[RadioMode].Name);
} else {
dprintk(1, "%s() Standard = %s\n",
__func__,
XC5000_Standard[priv->video_standard].Name);
}
ret = xc_write_reg(priv, XREG_VIDEO_MODE, VideoMode); ret = xc_write_reg(priv, XREG_VIDEO_MODE, VideoMode);
if (ret == XC_RESULT_SUCCESS) if (ret == XC_RESULT_SUCCESS)
...@@ -824,7 +830,7 @@ static int xc5000_set_params(struct dvb_frontend *fe) ...@@ -824,7 +830,7 @@ static int xc5000_set_params(struct dvb_frontend *fe)
ret = xc_SetTVStandard(priv, ret = xc_SetTVStandard(priv,
XC5000_Standard[priv->video_standard].VideoMode, XC5000_Standard[priv->video_standard].VideoMode,
XC5000_Standard[priv->video_standard].AudioMode); XC5000_Standard[priv->video_standard].AudioMode, 0);
if (ret != XC_RESULT_SUCCESS) { if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR "xc5000: xc_SetTVStandard failed\n"); printk(KERN_ERR "xc5000: xc_SetTVStandard failed\n");
return -EREMOTEIO; return -EREMOTEIO;
...@@ -940,7 +946,7 @@ static int xc5000_set_tv_freq(struct dvb_frontend *fe, ...@@ -940,7 +946,7 @@ static int xc5000_set_tv_freq(struct dvb_frontend *fe,
ret = xc_SetTVStandard(priv, ret = xc_SetTVStandard(priv,
XC5000_Standard[priv->video_standard].VideoMode, XC5000_Standard[priv->video_standard].VideoMode,
XC5000_Standard[priv->video_standard].AudioMode); XC5000_Standard[priv->video_standard].AudioMode, 0);
if (ret != XC_RESULT_SUCCESS) { if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR "xc5000: xc_SetTVStandard failed\n"); printk(KERN_ERR "xc5000: xc_SetTVStandard failed\n");
return -EREMOTEIO; return -EREMOTEIO;
...@@ -1003,7 +1009,7 @@ static int xc5000_set_radio_freq(struct dvb_frontend *fe, ...@@ -1003,7 +1009,7 @@ static int xc5000_set_radio_freq(struct dvb_frontend *fe,
priv->rf_mode = XC_RF_MODE_AIR; priv->rf_mode = XC_RF_MODE_AIR;
ret = xc_SetTVStandard(priv, XC5000_Standard[radio_input].VideoMode, ret = xc_SetTVStandard(priv, XC5000_Standard[radio_input].VideoMode,
XC5000_Standard[radio_input].AudioMode); XC5000_Standard[radio_input].AudioMode, radio_input);
if (ret != XC_RESULT_SUCCESS) { if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR "xc5000: xc_SetTVStandard failed\n"); printk(KERN_ERR "xc5000: xc_SetTVStandard failed\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册