Skip to contentSkip to conversation

ASoC: bt-sco: support wide band speech

PATCH Superseded Barry Song 2 participants 4 messages Nov 24, 2014

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/1 ASoC: bt-sco: support wide band speech

From: Yibo Cai <[email protected]>

HFP1.6 requires support for wide band speech(16KHz) over Bluetooth.

---
 sound/soc/codecs/bt-sco.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/bt-sco.c +2 -2
index c4cf069..fc0664b 100644
@@ -31,14 +31,14 @@ static struct snd_soc_dai_driver bt_sco_dai = {
 		.stream_name = "Playback",
 		.channels_min = 1,
 		.channels_max = 1,
-		.rates = SNDRV_PCM_RATE_8000,
+		.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,
 	},
 	.capture = {
 		 .stream_name = "Capture",
 		.channels_min = 1,
 		.channels_max = 1,
-		.rates = SNDRV_PCM_RATE_8000,
+		.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,
 	},
 };
Signature · 1 line
2.1.1
#1 lore raw
Quoted 15 lines · Barry Song

From: Yibo Cai <[email protected]>

HFP1.6 requires support for wide band speech(16KHz) over Bluetooth.

---
  sound/soc/codecs/bt-sco.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/bt-sco.c +0 -0
index c4cf069..fc0664b 100644

sound/soc/codecs/bt-sco.c static struct snd_soc_dai_driver bt_sco_dai = { · line 34

Quoted 5 lines
sound/soc/codecs/bt-sco.c +1 -1
@@ -31,14 +31,14 @@ static struct snd_soc_dai_driver bt_sco_dai = {
  		.stream_name = "Playback",
  		.channels_min = 1,
  		.channels_max = 1,
-		.rates = SNDRV_PCM_RATE_8000,
+		.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,

This will break those bluetooth modules that only work with 8k.

- Lars

author
#2 lore raw

2014-11-24 20:45 GMT+08:00 Lars-Peter Clausen <[email protected]>:

Quoted 12 lines · Barry Song
Quoted 11 lines

From: Yibo Cai <[email protected]>

HFP1.6 requires support for wide band speech(16KHz) over Bluetooth.

---
  sound/soc/codecs/bt-sco.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 13 lines

sound/soc/codecs/bt-sco.c static struct snd_soc_dai_driver bt_sco_dai = { · line 34

Quoted 10 lines
sound/soc/codecs/bt-sco.c +1 -1
index c4cf069..fc0664b 100644
@@ -31,14 +31,14 @@ static struct snd_soc_dai_driver bt_sco_dai = {
                .stream_name = "Playback",
                .channels_min = 1,
                .channels_max = 1,
-               .rates = SNDRV_PCM_RATE_8000,
+               .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,

This will break those bluetooth modules that only work with 8k.

how do you think if we use device-tree "compatible" to differentiate these two kinds of BT modules?
for non-DT platform, platform_device_id?

Quoted 2 lines

- Lars

-barry

#3 lore raw
Quoted 27 lines · Barry Song

2014-11-24 20:45 GMT+08:00 Lars-Peter Clausen <[email protected]>:

Quoted 12 lines · Barry Song
Quoted 11 lines

From: Yibo Cai <[email protected]>

HFP1.6 requires support for wide band speech(16KHz) over Bluetooth.

---
   sound/soc/codecs/bt-sco.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 13 lines

sound/soc/codecs/bt-sco.c static struct snd_soc_dai_driver bt_sco_dai = { · line 34

Quoted 10 lines
sound/soc/codecs/bt-sco.c +1 -1
index c4cf069..fc0664b 100644
@@ -31,14 +31,14 @@ static struct snd_soc_dai_driver bt_sco_dai = {
                 .stream_name = "Playback",
                 .channels_min = 1,
                 .channels_max = 1,
-               .rates = SNDRV_PCM_RATE_8000,
+               .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,

This will break those bluetooth modules that only work with 8k.

Quoted 3 lines

how do you think if we use device-tree "compatible" to differentiate these two kinds of BT modules?
for non-DT platform, platform_device_id?

Yes, I think that's what we need to do.

- Lars