aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-streams.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/alsa/alsa-api-streams.c')
-rw-r--r--plugins/alsa/alsa-api-streams.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index d9d9667..c4bbbc3 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -200,8 +200,8 @@ STATIC int CreateOneStream(SoftMixerT *mixer, const char * uid, AlsaStreamAudioT
int volNumid = 0;
AFB_ApiDebug(mixer->api,
- "%s, stream %s %s, source %s, sink %s, mute %d",
- __func__,uid, stream->uid, stream->source, stream->sink, stream->mute);
+ "NEW STREAM stream %s %s, source %s, sink %s, mute %d",
+ uid, stream->uid, stream->source, stream->sink, stream->mute);
loopDev = ApiLoopFindSubdev(mixer, stream->uid, stream->source, &loop);
if (loopDev) {
@@ -248,10 +248,20 @@ STATIC int CreateOneStream(SoftMixerT *mixer, const char * uid, AlsaStreamAudioT
goto OnErrorExit;
}
+ if (captureCard->params) {
+ if (stream->params) {
+
+ AFB_ApiInfo(mixer->api,"%s: Stream %s inherits from capture %s parameters !",
+ __func__, stream->uid, captureCard->cid.cardid);
+
+ memcpy(stream->params, captureCard->params, sizeof(AlsaPcmHwInfoT));
+ }
+ }
+
capturePcm->closeAtDeletion = true;
capturePcm->mute = stream->mute;
- AFB_ApiDebug(mixer->api,"%s: PCM opened !", __func__);
+ AFB_ApiDebug(mixer->api,"%s: Capture PCM opened !", __func__);
// Registry capturePcm PCM for active/pause event
if (loopDev && loopDev->numid) {
@@ -310,11 +320,6 @@ STATIC int CreateOneStream(SoftMixerT *mixer, const char * uid, AlsaStreamAudioT
}
-
- // retrieve channel count from route and push it to stream
-
- stream->params->channels = zone->ccount;
-
// create mute control and Registry it as pause/resume ctl)
if (asprintf(&runName, "pause-%s", stream->uid) == -1) {
SOFTMIXER_NOMEM(mixer->api);
@@ -371,14 +376,16 @@ STATIC int CreateOneStream(SoftMixerT *mixer, const char * uid, AlsaStreamAudioT
if ((zone->params->rate != stream->params->rate) ||
(zone->params->format != stream->params->format)) {
AFB_ApiNotice(mixer->api,
- "%s: Instanciate a RATE CONVERTER (stream [%d,%s(%d)], zone [%d,%s(%d)])",
+ "%s: Instanciate a RATE CONVERTER (stream [%d,%s(%d),%d channels], zone [%d,%s(%d), %d channels])",
__func__,
stream->params->rate,
stream->params->formatS,
stream->params->format,
+ stream->params->channels,
zone->params->rate,
zone->params->formatS,
- zone->params->format);
+ zone->params->format,
+ zone->params->channels);
char *rateName;
if (asprintf(&rateName, "rate-%s", stream->uid) == -1) {