You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "qiaohaijiao (via GitHub)" <gi...@apache.org> on 2023/01/31 12:29:22 UTC

[GitHub] [nuttx] qiaohaijiao opened a new pull request, #8377: sim/sim_alsa.c: support streaming data when offload playback.

qiaohaijiao opened a new pull request, #8377:
URL: https://github.com/apache/nuttx/pull/8377

   Audio offload playback, change data organization from fragmented to streaming.
   
   Signed-off-by: qiaohaijiao1 <qi...@xiaomi.com>
   
   ## Summary
   Audio offload playback, change data organization from fragmented to streaming.
   ## Impact
   sim
   ## Testing
   vela
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8377: sim/sim_alsa.c: support streaming data when offload playback.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8377:
URL: https://github.com/apache/nuttx/pull/8377


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] qiaohaijiao commented on a diff in pull request #8377: sim/sim_alsa.c: support streaming data when offload playback.

Posted by "qiaohaijiao (via GitHub)" <gi...@apache.org>.
qiaohaijiao commented on code in PR #8377:
URL: https://github.com/apache/nuttx/pull/8377#discussion_r1092646304


##########
arch/sim/src/sim/posix/sim_offload.h:
##########
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * arch/sim/src/sim/posix/sim_offload.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __ARCH_SIM_SRC_POSIX_SIM_OFFLOAD_H
+#define __ARCH_SIM_SRC_POSIX_SIM_OFFLOAD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/audio/audio.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define AUDCODEC_DEC          0x01
+#define AUDCODEC_ENC          0x10
+
+/****************************************************************************
+ * Public Type Definitions
+ ****************************************************************************/
+
+typedef struct sim_codec_ops_s
+{
+  uint8_t format;
+  uint8_t flags;
+
+  /* init codec handle */
+
+  void *(*init)(struct audio_info_s *info);
+
+  /* return how much samples return from deocde.
+   * or encoder needed.
+   * */
+
+  int (*get_samples)(void *handle);
+
+  /* perform dec or enc on [in] data with [insize] bytes.
+   * [out] is pcm data with [outsize] when decode,
+   * [out] is compress data with [outsize] when encode.
+   * return: < 0 means failed. >= 0 means size of source data consumed.
+   */
+
+  int (*process)(void *handle, uint8_t *in, uint32_t insize,
+                      uint8_t **out, unsigned int *outsize);

Review Comment:
   Resolved



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8377: sim/sim_alsa.c: support streaming data when offload playback.

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8377:
URL: https://github.com/apache/nuttx/pull/8377#discussion_r1091963707


##########
arch/sim/src/sim/posix/sim_offload.h:
##########
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * arch/sim/src/sim/posix/sim_offload.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __ARCH_SIM_SRC_POSIX_SIM_OFFLOAD_H
+#define __ARCH_SIM_SRC_POSIX_SIM_OFFLOAD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/audio/audio.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define AUDCODEC_DEC          0x01
+#define AUDCODEC_ENC          0x10
+
+/****************************************************************************
+ * Public Type Definitions
+ ****************************************************************************/
+
+typedef struct sim_codec_ops_s
+{
+  uint8_t format;
+  uint8_t flags;
+
+  /* init codec handle */
+
+  void *(*init)(struct audio_info_s *info);
+
+  /* return how much samples return from deocde.
+   * or encoder needed.
+   * */
+
+  int (*get_samples)(void *handle);
+
+  /* perform dec or enc on [in] data with [insize] bytes.
+   * [out] is pcm data with [outsize] when decode,
+   * [out] is compress data with [outsize] when encode.
+   * return: < 0 means failed. >= 0 means size of source data consumed.
+   */
+
+  int (*process)(void *handle, uint8_t *in, uint32_t insize,
+                      uint8_t **out, unsigned int *outsize);

Review Comment:
   ```suggestion
     int (*process)(void *handle, uint8_t *in, uint32_t insize,
                    uint8_t **out, unsigned int *outsize);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org