Lines Matching +full:0 +full:x77
35 #define SCO_RX_PACKET_MASK (0x3F)
61 BT_SCO_CVSD_30 = 0,
149 {0x1, 0x1 << 1, 0x1 << 2, 0x1 << 3, 0x1 << 4, 0x1 << 5},
150 {0x1, 0x1, 0x2, 0x2, 0x4, 0x4},
151 {0x1, 0x1, 0x1, 0x2, 0x2, 0x2},
152 {0x1, 0x1, 0x1, 0x1, 0x0, 0x0},
153 {0x7, 0x7 << 3, 0x7 << 6, 0x7 << 9, 0x7 << 12, 0x7 << 15},
154 {0x3, 0x3 << 1, 0x3 << 3, 0x3 << 4, 0x3 << 6, 0x3 << 7},
173 0x01, 0x38, 0xad, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00,
174 0x77, 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6d,
175 0xdd, 0xb6, 0xdb, 0x77, 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7,
176 0x76, 0xdb, 0x6d, 0xdd, 0xb6, 0xdb, 0x77, 0x6d, 0xb6, 0xdd,
177 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6d, 0xdd, 0xb6, 0xdb, 0x77,
178 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6c, 0x00,
179 0x01, 0xc8, 0xad, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00,
180 0x77, 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6d,
181 0xdd, 0xb6, 0xdb, 0x77, 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7,
182 0x76, 0xdb, 0x6d, 0xdd, 0xb6, 0xdb, 0x77, 0x6d, 0xb6, 0xdd,
183 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6d, 0xdd, 0xb6, 0xdb, 0x77,
184 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6c, 0x00,
185 0x01, 0xf8, 0xad, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00,
186 0x77, 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6d,
187 0xdd, 0xb6, 0xdb, 0x77, 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7,
188 0x76, 0xdb, 0x6d, 0xdd, 0xb6, 0xdb, 0x77, 0x6d, 0xb6, 0xdd,
189 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6d, 0xdd, 0xb6, 0xdb, 0x77,
190 0x6d, 0xb6, 0xdd, 0xdb, 0x6d, 0xb7, 0x76, 0xdb, 0x6c, 0x00
196 bt->conn_bt_cvsd_mask, 0); in mtk_btcvsd_snd_irq_enable()
227 bt->irq_disabled = 0; in mtk_btcvsd_snd_set_state()
234 memset(bt->tx, 0, sizeof(*bt->tx)); in mtk_btcvsd_snd_tx_init()
235 memset(bt->tx_packet_buf, 0, sizeof(bt->tx_packet_buf)); in mtk_btcvsd_snd_tx_init()
239 bt->tx->timeout = 0; in mtk_btcvsd_snd_tx_init()
240 bt->tx->rw_cnt = 0; in mtk_btcvsd_snd_tx_init()
242 return 0; in mtk_btcvsd_snd_tx_init()
247 memset(bt->rx, 0, sizeof(*bt->rx)); in mtk_btcvsd_snd_rx_init()
248 memset(bt->rx_packet_buf, 0, sizeof(bt->rx_packet_buf)); in mtk_btcvsd_snd_rx_init()
252 bt->rx->timeout = 0; in mtk_btcvsd_snd_rx_init()
253 bt->rx->rw_cnt = 0; in mtk_btcvsd_snd_rx_init()
255 return 0; in mtk_btcvsd_snd_rx_init()
299 for (i = 0; i < (blk_size * blk_num / 4); i++) in mtk_btcvsd_snd_data_transfer()
305 for (j = 0; j < blk_num; j++) { in mtk_btcvsd_snd_data_transfer()
306 for (i = 0; i < (blk_size / 2); i++) in mtk_btcvsd_snd_data_transfer()
339 for (i = 0; i < num_valid_addr; i++) { in btcvsd_tx_clean_buffer()
342 dev_info(bt->dev, "%s(), clean addr 0x%lx\n", __func__, in btcvsd_tx_clean_buffer()
354 return 0; in btcvsd_tx_clean_buffer()
373 (connsys_addr_rx & 0xFFFF); in mtk_btcvsd_read_from_bt()
375 if (connsys_addr_rx == 0xdeadfeed) { in mtk_btcvsd_read_from_bt()
376 /* bt return 0xdeadfeed if read register during bt sleep */ in mtk_btcvsd_read_from_bt()
377 dev_warn(bt->dev, "%s(), connsys_addr_rx == 0xdeadfeed", in mtk_btcvsd_read_from_bt()
389 for (i = 0; i < blk_size; i++) { in mtk_btcvsd_read_from_bt()
399 pv = 0; in mtk_btcvsd_read_from_bt()
407 return 0; in mtk_btcvsd_read_from_bt()
424 (connsys_addr_tx & 0xFFFF); in mtk_btcvsd_write_to_bt()
426 if (connsys_addr_tx == 0xdeadfeed) { in mtk_btcvsd_write_to_bt()
427 /* bt return 0xdeadfeed if read register during bt sleep */ in mtk_btcvsd_write_to_bt()
428 dev_warn(bt->dev, "%s(), connsys_addr_tx == 0xdeadfeed\n", in mtk_btcvsd_write_to_bt()
434 for (i = 0; i < blk_size; i++) { in mtk_btcvsd_write_to_bt()
456 for (i = 0; i < bt->tx->buffer_info.num_valid_addr; i++) { in mtk_btcvsd_write_to_bt()
470 dev_info(bt->dev, "%s(), new ap_addr_tx = 0x%lx, num_valid_addr %d\n", in mtk_btcvsd_write_to_bt()
478 return 0; in mtk_btcvsd_write_to_bt()
498 packet_type = (control >> 18) & 0x7; in mtk_btcvsd_snd_irq_handler()
500 if (((control >> 31) & 1) == 0) { in mtk_btcvsd_snd_irq_handler()
501 dev_warn(bt->dev, "%s(), ((control >> 31) & 1) == 0, control 0x%x\n", in mtk_btcvsd_snd_irq_handler()
512 packet_length = btsco_packet_info[packet_type][0]; in mtk_btcvsd_snd_irq_handler()
524 (connsys_addr_rx & 0xFFFF); in mtk_btcvsd_snd_irq_handler()
528 (connsys_addr_tx & 0xFFFF); in mtk_btcvsd_snd_irq_handler()
530 if (connsys_addr_tx == 0xdeadfeed || in mtk_btcvsd_snd_irq_handler()
531 connsys_addr_rx == 0xdeadfeed) { in mtk_btcvsd_snd_irq_handler()
532 /* bt return 0xdeadfeed if read reg during bt sleep */ in mtk_btcvsd_snd_irq_handler()
533 dev_warn(bt->dev, "%s(), connsys_addr_tx == 0xdeadfeed\n", in mtk_btcvsd_snd_irq_handler()
562 bt->rx->xrun = 0; in mtk_btcvsd_snd_irq_handler()
563 dev_warn(bt->dev, "%s(), rx->xrun 0!\n", in mtk_btcvsd_snd_irq_handler()
585 bt->tx->timeout = 0; in mtk_btcvsd_snd_irq_handler()
595 bt->tx->xrun = 0; in mtk_btcvsd_snd_irq_handler()
596 dev_warn(bt->dev, "%s(), tx->xrun 0\n", in mtk_btcvsd_snd_irq_handler()
646 bt_stream->wait_flag = 0; in wait_for_bt_irq()
670 if (ret < 0) { in wait_for_bt_irq()
681 } else if (ret == 0) { in wait_for_bt_irq()
688 if (max_timeout_trial <= 0) { in wait_for_bt_irq()
695 return 0; in wait_for_bt_irq()
702 ssize_t read_size = 0, read_count = 0, cur_read_idx, cont; in mtk_btcvsd_snd_read()
726 if (count % packet_size != 0 || in mtk_btcvsd_snd_read()
727 avail % packet_size != 0) { in mtk_btcvsd_snd_read()
816 if (count % packet_size != 0 || in mtk_btcvsd_snd_write()
817 avail % packet_size != 0) { in mtk_btcvsd_snd_write()
868 .fifo_size = 0,
903 return 0; in mtk_pcm_btcvsd_close()
913 params_buffer_bytes(hw_params) % bt->tx->packet_size != 0) { in mtk_pcm_btcvsd_hw_params()
921 return 0; in mtk_pcm_btcvsd_hw_params()
932 return 0; in mtk_pcm_btcvsd_hw_free()
944 return 0; in mtk_pcm_btcvsd_prepare()
964 bt_stream->prev_frame = 0; in mtk_pcm_btcvsd_trigger()
966 return 0; in mtk_pcm_btcvsd_trigger()
969 bt_stream->trigger_start = 0; in mtk_pcm_btcvsd_trigger()
971 return 0; in mtk_pcm_btcvsd_trigger()
983 snd_pcm_uframes_t frame = 0; in mtk_pcm_btcvsd_pointer()
984 int byte = 0; in mtk_pcm_btcvsd_pointer()
1052 ucontrol->value.integer.value[0] = bt->band; in btcvsd_band_get()
1053 return 0; in btcvsd_band_get()
1063 if (ucontrol->value.enumerated.item[0] >= e->items) in btcvsd_band_set()
1066 bt->band = ucontrol->value.integer.value[0]; in btcvsd_band_set()
1068 return 0; in btcvsd_band_set()
1078 ucontrol->value.integer.value[0] = lpbk_en; in btcvsd_loopback_get()
1079 return 0; in btcvsd_loopback_get()
1088 if (ucontrol->value.integer.value[0]) { in btcvsd_loopback_set()
1095 return 0; in btcvsd_loopback_set()
1105 ucontrol->value.integer.value[0] = 0; in btcvsd_tx_mute_get()
1106 return 0; in btcvsd_tx_mute_get()
1109 ucontrol->value.integer.value[0] = bt->tx->mute; in btcvsd_tx_mute_get()
1110 return 0; in btcvsd_tx_mute_get()
1120 return 0; in btcvsd_tx_mute_set()
1122 bt->tx->mute = ucontrol->value.integer.value[0]; in btcvsd_tx_mute_set()
1123 return 0; in btcvsd_tx_mute_set()
1133 return 0; in btcvsd_rx_irq_received_get()
1135 ucontrol->value.integer.value[0] = bt->rx->rw_cnt ? 1 : 0; in btcvsd_rx_irq_received_get()
1136 return 0; in btcvsd_rx_irq_received_get()
1146 return 0; in btcvsd_rx_timeout_get()
1148 ucontrol->value.integer.value[0] = bt->rx->timeout; in btcvsd_rx_timeout_get()
1149 bt->rx->timeout = 0; in btcvsd_rx_timeout_get()
1150 return 0; in btcvsd_rx_timeout_get()
1158 int ret = 0; in btcvsd_rx_timestamp_get()
1187 return 0; in btcvsd_tx_irq_received_get()
1189 ucontrol->value.integer.value[0] = bt->tx->rw_cnt ? 1 : 0; in btcvsd_tx_irq_received_get()
1190 return 0; in btcvsd_tx_irq_received_get()
1199 ucontrol->value.integer.value[0] = bt->tx->timeout; in btcvsd_tx_timeout_get()
1200 return 0; in btcvsd_tx_timeout_get()
1208 int ret = 0; in btcvsd_tx_timestamp_get()
1231 SOC_ENUM_EXT("BTCVSD Band", btcvsd_enum[0],
1233 SOC_SINGLE_BOOL_EXT("BTCVSD Loopback Switch", 0,
1235 SOC_SINGLE_BOOL_EXT("BTCVSD Tx Mute Switch", 0,
1237 SOC_SINGLE_BOOL_EXT("BTCVSD Tx Irq Received Switch", 0,
1239 SOC_SINGLE_BOOL_EXT("BTCVSD Tx Timeout Switch", 0,
1241 SOC_SINGLE_BOOL_EXT("BTCVSD Rx Irq Received Switch", 0,
1243 SOC_SINGLE_BOOL_EXT("BTCVSD Rx Timeout Switch", 0,
1277 u32 offset[5] = {0, 0, 0, 0, 0}; in mtk_btcvsd_snd_probe()
1307 irq_id = platform_get_irq(pdev, 0); in mtk_btcvsd_snd_probe()
1308 if (irq_id <= 0) in mtk_btcvsd_snd_probe()
1309 return irq_id < 0 ? irq_id : -ENXIO; in mtk_btcvsd_snd_probe()
1322 btcvsd->bt_pkv_base = of_iomap(dev->of_node, 0); in mtk_btcvsd_snd_probe()
1352 btcvsd->infra_misc_offset = offset[0]; in mtk_btcvsd_snd_probe()
1370 NULL, 0); in mtk_btcvsd_snd_probe()
1374 return 0; in mtk_btcvsd_snd_probe()