Loading drivers/bluetooth/btfm_slim.c +13 −5 Original line number Diff line number Diff line Loading @@ -131,16 +131,24 @@ int btfm_slim_enable_ch(struct btfmslim *btfmslim, struct btfmslim_ch *ch, /* Define the channel with below parameters */ prop.prot = SLIM_AUTO_ISO; prop.baser = SLIM_RATE_4000HZ; prop.dataf = (rates == 48000) ? SLIM_CH_DATAF_NOT_DEFINED : SLIM_CH_DATAF_LPCM_AUDIO; prop.baser = ((rates == 44100) || (rates == 88200)) ? SLIM_RATE_11025HZ : SLIM_RATE_4000HZ; prop.dataf = ((rates == 48000) || (rates == 44100) || (rates == 88200) || (rates == 96000)) ? SLIM_CH_DATAF_NOT_DEFINED : SLIM_CH_DATAF_LPCM_AUDIO; prop.auxf = SLIM_CH_AUXF_NOT_APPLICABLE; prop.ratem = (rates/4000); prop.ratem = ((rates == 44100) || (rates == 88200)) ? (rates/11025) : (rates/4000); prop.sampleszbits = 16; ch_h[0] = ch->ch_hdl; ch_h[1] = (grp) ? (ch+1)->ch_hdl : 0; BTFMSLIM_INFO("channel define - prot:%d, dataf:%d, auxf:%d", prop.prot, prop.dataf, prop.auxf); BTFMSLIM_INFO("channel define - rates:%d, baser:%d, ratem:%d", rates, prop.baser, prop.ratem); ret = slim_define_ch(btfmslim->slim_pgd, &prop, ch_h, nchan, grp, &ch->grph); if (ret < 0) { Loading drivers/bluetooth/btfm_slim_codec.c +4 −2 Original line number Diff line number Diff line Loading @@ -385,10 +385,12 @@ static struct snd_soc_dai_driver btfmslim_dai[] = { .id = BTFM_BT_SCO_A2DP_SLIM_RX, .playback = { .stream_name = "SCO A2DP RX Playback", /* 8/16/44.1/48/88.2/96 Khz */ .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_48000, /* 8 or 16 or 48 Khz*/ | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000, .formats = SNDRV_PCM_FMTBIT_S16_LE, /* 16 bits */ .rate_max = 48000, .rate_max = 96000, .rate_min = 8000, .channels_min = 1, .channels_max = 1, Loading drivers/bluetooth/btfm_slim_wcn3990.c +15 −6 Original line number Diff line number Diff line Loading @@ -83,16 +83,25 @@ int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num, { int ret = 0; uint8_t reg_val = 0, en; uint8_t port_bit = 0; uint8_t rxport_num = 0; uint16_t reg; BTFMSLIM_DBG("port(%d) enable(%d)", port_num, enable); if (rxport) { if (enable) { /* For SCO Rx, A2DP Rx */ reg_val = 0x1; port_bit = port_num - 0x10; reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_0(port_bit); if (port_num < 24) { rxport_num = port_num - 16; reg_val = 0x01 << rxport_num; reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_0( rxport_num); } else { rxport_num = port_num - 24; reg_val = 0x01 << rxport_num; reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_1( rxport_num); } BTFMSLIM_DBG("writing reg_val (%d) to reg(%x)", reg_val, reg); ret = btfm_slim_write(btfmslim, reg, 1, ®_val, IFD); Loading Loading
drivers/bluetooth/btfm_slim.c +13 −5 Original line number Diff line number Diff line Loading @@ -131,16 +131,24 @@ int btfm_slim_enable_ch(struct btfmslim *btfmslim, struct btfmslim_ch *ch, /* Define the channel with below parameters */ prop.prot = SLIM_AUTO_ISO; prop.baser = SLIM_RATE_4000HZ; prop.dataf = (rates == 48000) ? SLIM_CH_DATAF_NOT_DEFINED : SLIM_CH_DATAF_LPCM_AUDIO; prop.baser = ((rates == 44100) || (rates == 88200)) ? SLIM_RATE_11025HZ : SLIM_RATE_4000HZ; prop.dataf = ((rates == 48000) || (rates == 44100) || (rates == 88200) || (rates == 96000)) ? SLIM_CH_DATAF_NOT_DEFINED : SLIM_CH_DATAF_LPCM_AUDIO; prop.auxf = SLIM_CH_AUXF_NOT_APPLICABLE; prop.ratem = (rates/4000); prop.ratem = ((rates == 44100) || (rates == 88200)) ? (rates/11025) : (rates/4000); prop.sampleszbits = 16; ch_h[0] = ch->ch_hdl; ch_h[1] = (grp) ? (ch+1)->ch_hdl : 0; BTFMSLIM_INFO("channel define - prot:%d, dataf:%d, auxf:%d", prop.prot, prop.dataf, prop.auxf); BTFMSLIM_INFO("channel define - rates:%d, baser:%d, ratem:%d", rates, prop.baser, prop.ratem); ret = slim_define_ch(btfmslim->slim_pgd, &prop, ch_h, nchan, grp, &ch->grph); if (ret < 0) { Loading
drivers/bluetooth/btfm_slim_codec.c +4 −2 Original line number Diff line number Diff line Loading @@ -385,10 +385,12 @@ static struct snd_soc_dai_driver btfmslim_dai[] = { .id = BTFM_BT_SCO_A2DP_SLIM_RX, .playback = { .stream_name = "SCO A2DP RX Playback", /* 8/16/44.1/48/88.2/96 Khz */ .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_48000, /* 8 or 16 or 48 Khz*/ | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000, .formats = SNDRV_PCM_FMTBIT_S16_LE, /* 16 bits */ .rate_max = 48000, .rate_max = 96000, .rate_min = 8000, .channels_min = 1, .channels_max = 1, Loading
drivers/bluetooth/btfm_slim_wcn3990.c +15 −6 Original line number Diff line number Diff line Loading @@ -83,16 +83,25 @@ int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num, { int ret = 0; uint8_t reg_val = 0, en; uint8_t port_bit = 0; uint8_t rxport_num = 0; uint16_t reg; BTFMSLIM_DBG("port(%d) enable(%d)", port_num, enable); if (rxport) { if (enable) { /* For SCO Rx, A2DP Rx */ reg_val = 0x1; port_bit = port_num - 0x10; reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_0(port_bit); if (port_num < 24) { rxport_num = port_num - 16; reg_val = 0x01 << rxport_num; reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_0( rxport_num); } else { rxport_num = port_num - 24; reg_val = 0x01 << rxport_num; reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_1( rxport_num); } BTFMSLIM_DBG("writing reg_val (%d) to reg(%x)", reg_val, reg); ret = btfm_slim_write(btfmslim, reg, 1, ®_val, IFD); Loading