drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
ef30832e67
commit
4b9886fa29
@ -737,6 +737,7 @@ static int null_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
|
|||||||
static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
int ret = OK;
|
||||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||||
FAR struct ap_buffer_info_s *bufinfo;
|
FAR struct ap_buffer_info_s *bufinfo;
|
||||||
#endif
|
#endif
|
||||||
@ -771,11 +772,12 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ret = -ENOTTY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
audinfo("Return OK\n");
|
audinfo("Return OK\n");
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -1449,6 +1449,7 @@ static int cs43l22_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
|
|||||||
static int cs43l22_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
static int cs43l22_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
int ret = OK;
|
||||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||||
FAR struct ap_buffer_info_s *bufinfo;
|
FAR struct ap_buffer_info_s *bufinfo;
|
||||||
#endif
|
#endif
|
||||||
@ -1486,11 +1487,12 @@ static int cs43l22_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ret = -ENOTTY;
|
||||||
audinfo("Ignored\n");
|
audinfo("Ignored\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -3307,6 +3307,7 @@ static int cxd56_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
|
|||||||
static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
|
static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
int ret = OK;
|
||||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||||
FAR struct ap_buffer_info_s *bufinfo;
|
FAR struct ap_buffer_info_s *bufinfo;
|
||||||
#endif
|
#endif
|
||||||
@ -3329,11 +3330,12 @@ static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ret = -ENOTTY;
|
||||||
audinfo("Unhandled ioctl: %d\n", cmd);
|
audinfo("Unhandled ioctl: %d\n", cmd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -1716,6 +1716,7 @@ static int vs1053_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
|
|||||||
static int vs1053_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
|
static int vs1053_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
int ret = OK;
|
||||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||||
FAR struct ap_buffer_info_s *bufinfo;
|
FAR struct ap_buffer_info_s *bufinfo;
|
||||||
#endif
|
#endif
|
||||||
@ -1744,10 +1745,11 @@ static int vs1053_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ret = -ENOTTY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -988,6 +988,7 @@ static int wm8776_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
|
|||||||
static int wm8776_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
static int wm8776_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
int ret = OK;
|
||||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||||
FAR struct ap_buffer_info_s *bufinfo;
|
FAR struct ap_buffer_info_s *bufinfo;
|
||||||
#endif
|
#endif
|
||||||
@ -1025,11 +1026,12 @@ static int wm8776_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ret = -ENOTTY;
|
||||||
audinfo("Ignored\n");
|
audinfo("Ignored\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -1832,6 +1832,7 @@ static int wm8904_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
|
|||||||
static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
|
int ret = OK;
|
||||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||||
FAR struct ap_buffer_info_s *bufinfo;
|
FAR struct ap_buffer_info_s *bufinfo;
|
||||||
#endif
|
#endif
|
||||||
@ -1869,11 +1870,12 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
ret = -ENOTTY;
|
||||||
audinfo("Ignored\n");
|
audinfo("Ignored\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user