You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/06/05 04:02:44 UTC
[incubator-nuttx] branch master updated (a696788 -> 4b9886f)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from a696788 sched: Change the return type of nxtask_activate to void
new ef30832 include: audio: Remove CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS from audio.h
new 4b9886f drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
drivers/audio/audio_null.c | 4 +++-
drivers/audio/cs43l22.c | 4 +++-
drivers/audio/cxd56.c | 4 +++-
drivers/audio/vs1053.c | 4 +++-
drivers/audio/wm8776.c | 4 +++-
drivers/audio/wm8904.c | 4 +++-
include/nuttx/audio/audio.h | 2 --
7 files changed, 18 insertions(+), 8 deletions(-)
[incubator-nuttx] 02/02: drivers: audio: Return -ENOTTY in
xxx_ioctl() if not handled
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4b9886fa29410bfcde576260a75a724a44da219d
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Fri Jun 5 10:34:01 2020 +0900
drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
drivers/audio/audio_null.c | 4 +++-
drivers/audio/cs43l22.c | 4 +++-
drivers/audio/cxd56.c | 4 +++-
drivers/audio/vs1053.c | 4 +++-
drivers/audio/wm8776.c | 4 +++-
drivers/audio/wm8904.c | 4 +++-
6 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/audio/audio_null.c b/drivers/audio/audio_null.c
index 53b032a..c966e73 100644
--- a/drivers/audio/audio_null.c
+++ b/drivers/audio/audio_null.c
@@ -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,
unsigned long arg)
{
+ int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@@ -771,11 +772,12 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
+ ret = -ENOTTY;
break;
}
audinfo("Return OK\n");
- return OK;
+ return ret;
}
/****************************************************************************
diff --git a/drivers/audio/cs43l22.c b/drivers/audio/cs43l22.c
index 7f19a56..5df4673 100644
--- a/drivers/audio/cs43l22.c
+++ b/drivers/audio/cs43l22.c
@@ -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,
unsigned long arg)
{
+ int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@@ -1486,11 +1487,12 @@ static int cs43l22_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
+ ret = -ENOTTY;
audinfo("Ignored\n");
break;
}
- return OK;
+ return ret;
}
/****************************************************************************
diff --git a/drivers/audio/cxd56.c b/drivers/audio/cxd56.c
index 97db024..9d5cae4 100644
--- a/drivers/audio/cxd56.c
+++ b/drivers/audio/cxd56.c
@@ -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,
unsigned long arg)
{
+ int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@@ -3329,11 +3330,12 @@ static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
#endif
default:
+ ret = -ENOTTY;
audinfo("Unhandled ioctl: %d\n", cmd);
break;
}
- return OK;
+ return ret;
}
/****************************************************************************
diff --git a/drivers/audio/vs1053.c b/drivers/audio/vs1053.c
index 7bac43c..2a5a7fe 100644
--- a/drivers/audio/vs1053.c
+++ b/drivers/audio/vs1053.c
@@ -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,
unsigned long arg)
{
+ int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@@ -1744,10 +1745,11 @@ static int vs1053_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
#endif
default:
+ ret = -ENOTTY;
break;
}
- return OK;
+ return ret;
}
/****************************************************************************
diff --git a/drivers/audio/wm8776.c b/drivers/audio/wm8776.c
index 95192ef..c644c65 100644
--- a/drivers/audio/wm8776.c
+++ b/drivers/audio/wm8776.c
@@ -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,
unsigned long arg)
{
+ int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@@ -1025,11 +1026,12 @@ static int wm8776_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
+ ret = -ENOTTY;
audinfo("Ignored\n");
break;
}
- return OK;
+ return ret;
}
/****************************************************************************
diff --git a/drivers/audio/wm8904.c b/drivers/audio/wm8904.c
index 4166d82..bd8dd83 100644
--- a/drivers/audio/wm8904.c
+++ b/drivers/audio/wm8904.c
@@ -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,
unsigned long arg)
{
+ int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@@ -1869,11 +1870,12 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
+ ret = -ENOTTY;
audinfo("Ignored\n");
break;
}
- return OK;
+ return ret;
}
/****************************************************************************
[incubator-nuttx] 01/02: include: audio: Remove
CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS from audio.h
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ef30832e67d0caa19a6dce96ee615096760f226f
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Fri Jun 5 09:58:02 2020 +0900
include: audio: Remove CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS from audio.h
NOTE: struct ap_buffer_info_s can be used without the config
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
include/nuttx/audio/audio.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/nuttx/audio/audio.h b/include/nuttx/audio/audio.h
index 82707ba..d70581e 100644
--- a/include/nuttx/audio/audio.h
+++ b/include/nuttx/audio/audio.h
@@ -408,13 +408,11 @@ struct audio_info_s
* so this info is queried from the lower-half driver.
*/
-#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
struct ap_buffer_info_s
{
apb_samp_t nbuffers; /* Preferred qty of buffers */
apb_samp_t buffer_size; /* Preferred size of the buffers */
};
-#endif
/* This structure describes an Audio Pipeline Buffer */