diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2019-02-13 09:30:58 +0100 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2019-05-13 14:16:41 +0200 |
commit | db4eeea4a25740595e4760c2e55f37c625344046 (patch) | |
tree | ec630a2c2538fb46d18f21d963d68adfff4d131a /plugins/lib/bluealsa/hal-bluealsa-transports.c | |
parent | 2d4da5da14a328fa04ebddad33750c033523c383 (diff) |
bluealsa plugin: get the sampling rate from the transport
The sampling rate, for both SCO and A2DP, had been harcoded
for convenience. But this is not a constant, because it
depends on the connected handset.
This commit retrieves the sampling rate for each new transport
and uses that information as a parameter for the stream creation
in the softmixer.
Change-Id: I4d30eccba9cc63d7f4e618c571719996a136b4f5
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/lib/bluealsa/hal-bluealsa-transports.c')
-rw-r--r-- | plugins/lib/bluealsa/hal-bluealsa-transports.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/lib/bluealsa/hal-bluealsa-transports.c b/plugins/lib/bluealsa/hal-bluealsa-transports.c index 590ab5d..b528212 100644 --- a/plugins/lib/bluealsa/hal-bluealsa-transports.c +++ b/plugins/lib/bluealsa/hal-bluealsa-transports.c @@ -147,9 +147,11 @@ char * halBlueAlsaTransportAsString(char * buff, size_t len, const struct ba_msg char addr[18]; ba2str(&transport->addr, addr); - snprintf(buff, len, "%s,%s,%s", addr, + snprintf(buff, len, "%s,%s,%s sampling %d codec %d", addr, transport->type & BA_PCM_TYPE_A2DP?"a2dp":"sco", - transport->type & BA_PCM_STREAM_PLAYBACK?"playback":"capture"); + transport->type & BA_PCM_STREAM_PLAYBACK?"playback":"capture", + transport->sampling, + transport->codec); return buff; } |