From e2745458a09f4661ddf66824f2654ddf251a610a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 27 Oct 2017 22:21:30 +0200 Subject: [PATCH 1/3] armbox: add video/audio pid Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/f31f21be0c54c24ed562f2f301e5c16c797f8856 Author: TangoCash Date: 2017-10-27 (Fri, 27 Oct 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/playback_gst.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 3c852be..19e9588 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -974,13 +974,18 @@ uint64_t cPlayback::GetReadCount() int cPlayback::GetAPid(void) { - lt_info("%s\n", __func__); - return mAudioStream; + gint current_audio = 0; + g_object_get (m_gst_playbin, "current-audio", ¤t_audio, NULL); + lt_info("%s: %d audio\n", __FUNCTION__, current_audio); + return current_audio; } int cPlayback::GetVPid(void) { - return 0; + gint current_video = 0; + g_object_get (m_gst_playbin, "current-video", ¤t_video, NULL); + lt_info("%s: %d video\n", __FUNCTION__, current_video); + return current_video; } int cPlayback::GetSubtitlePid(void) From ca16a957b041efada953982c72b47b35e2500f4f Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 27 Oct 2017 22:35:02 +0200 Subject: [PATCH 2/3] armbox: fix audio playback Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/f9e91b6b42b3b2fa6c458c163ca9e6a0a5fc8562 Author: TangoCash Date: 2017-10-27 (Fri, 27 Oct 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/audio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libarmbox/audio.cpp b/libarmbox/audio.cpp index 36498e4..467f7ef 100644 --- a/libarmbox/audio.cpp +++ b/libarmbox/audio.cpp @@ -226,8 +226,8 @@ int cAudio::PrepareClipPlay(int ch, int srate, int bits, int little_endian) if ((!dsp_dev) || (access(dsp_dev, W_OK))) { if (dsp_dev) lt_info("%s: DSP_DEVICE is set (%s) but cannot be opened," - " fall back to /dev/dsp1\n", __func__, dsp_dev); - dsp_dev = "/dev/dsp1"; + " fall back to /dev/dsp\n", __func__, dsp_dev); + dsp_dev = "/dev/dsp"; } lt_info("%s: dsp_dev %s mix_dev %s\n", __func__, dsp_dev, mix_dev); /* NULL mix_dev is ok */ /* the tdoss dsp driver seems to work only on the second open(). really. */ From d2b6333f9b4bd8c5a6de774f0e401c33e34e6b61 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 27 Oct 2017 22:40:16 +0200 Subject: [PATCH 3/3] armbox: fix audio playback #2 Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/cf816289986714b18c220777d6cc2a4c96a9ee3c Author: TangoCash Date: 2017-10-27 (Fri, 27 Oct 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/audio.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libarmbox/audio.cpp b/libarmbox/audio.cpp index 467f7ef..7cbe499 100644 --- a/libarmbox/audio.cpp +++ b/libarmbox/audio.cpp @@ -229,6 +229,12 @@ int cAudio::PrepareClipPlay(int ch, int srate, int bits, int little_endian) " fall back to /dev/dsp\n", __func__, dsp_dev); dsp_dev = "/dev/dsp"; } + if ((!mix_dev) || (access(mix_dev, W_OK))) { + if (mix_dev) + lt_info("%s: MIX_DEVICE is set (%s) but cannot be opened," + " fall back to /dev/mixer\n", __func__, dsp_dev); + mix_dev = "/dev/mixer"; + } lt_info("%s: dsp_dev %s mix_dev %s\n", __func__, dsp_dev, mix_dev); /* NULL mix_dev is ok */ /* the tdoss dsp driver seems to work only on the second open(). really. */ clipfd = open(dsp_dev, O_WRONLY);