afe 136 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 142 drivers/iio/health/afe4403.c ret = regmap_field_read(afe->fields[afe440x_attr->field], ®_val); afe 160 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 175 drivers/iio/health/afe4403.c ret = regmap_field_write(afe->fields[afe440x_attr->field], val); afe 212 drivers/iio/health/afe4403.c static int afe4403_read(struct afe4403_data *afe, unsigned int reg, u32 *val) afe 219 drivers/iio/health/afe4403.c ret = spi_write_then_read(afe->spi, tx, 4, NULL, 0); afe 223 drivers/iio/health/afe4403.c ret = spi_write_then_read(afe->spi, ®, 1, rx, 3); afe 233 drivers/iio/health/afe4403.c ret = spi_write_then_read(afe->spi, tx, 4, NULL, 0); afe 244 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 253 drivers/iio/health/afe4403.c ret = afe4403_read(afe, reg, val); afe 262 drivers/iio/health/afe4403.c ret = regmap_field_read(afe->fields[field], val); afe 283 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 290 drivers/iio/health/afe4403.c return regmap_field_write(afe->fields[field], val); afe 310 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 317 drivers/iio/health/afe4403.c ret = spi_write_then_read(afe->spi, tx, 4, NULL, 0); afe 323 drivers/iio/health/afe4403.c ret = spi_write_then_read(afe->spi, afe 336 drivers/iio/health/afe4403.c ret = spi_write_then_read(afe->spi, tx, 4, NULL, 0); afe 416 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 419 drivers/iio/health/afe4403.c ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, afe 425 drivers/iio/health/afe4403.c ret = regulator_disable(afe->regulator); afe 437 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 440 drivers/iio/health/afe4403.c ret = regulator_enable(afe->regulator); afe 446 drivers/iio/health/afe4403.c ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, afe 459 drivers/iio/health/afe4403.c struct afe4403_data *afe; afe 462 drivers/iio/health/afe4403.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*afe)); afe 466 drivers/iio/health/afe4403.c afe = iio_priv(indio_dev); afe 469 drivers/iio/health/afe4403.c afe->dev = &spi->dev; afe 470 drivers/iio/health/afe4403.c afe->spi = spi; afe 471 drivers/iio/health/afe4403.c afe->irq = spi->irq; afe 473 drivers/iio/health/afe4403.c afe->regmap = devm_regmap_init_spi(spi, &afe4403_regmap_config); afe 474 drivers/iio/health/afe4403.c if (IS_ERR(afe->regmap)) { afe 475 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to allocate register map\n"); afe 476 drivers/iio/health/afe4403.c return PTR_ERR(afe->regmap); afe 480 drivers/iio/health/afe4403.c afe->fields[i] = devm_regmap_field_alloc(afe->dev, afe->regmap, afe 482 drivers/iio/health/afe4403.c if (IS_ERR(afe->fields[i])) { afe 483 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to allocate regmap fields\n"); afe 484 drivers/iio/health/afe4403.c return PTR_ERR(afe->fields[i]); afe 488 drivers/iio/health/afe4403.c afe->regulator = devm_regulator_get(afe->dev, "tx_sup"); afe 489 drivers/iio/health/afe4403.c if (IS_ERR(afe->regulator)) { afe 490 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to get regulator\n"); afe 491 drivers/iio/health/afe4403.c return PTR_ERR(afe->regulator); afe 493 drivers/iio/health/afe4403.c ret = regulator_enable(afe->regulator); afe 495 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to enable regulator\n"); afe 499 drivers/iio/health/afe4403.c ret = regmap_write(afe->regmap, AFE440X_CONTROL0, afe 502 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to reset device\n"); afe 506 drivers/iio/health/afe4403.c ret = regmap_multi_reg_write(afe->regmap, afe4403_reg_sequences, afe 509 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to set register defaults\n"); afe 514 drivers/iio/health/afe4403.c indio_dev->dev.parent = afe->dev; afe 520 drivers/iio/health/afe4403.c if (afe->irq > 0) { afe 521 drivers/iio/health/afe4403.c afe->trig = devm_iio_trigger_alloc(afe->dev, afe 525 drivers/iio/health/afe4403.c if (!afe->trig) { afe 526 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to allocate IIO trigger\n"); afe 531 drivers/iio/health/afe4403.c iio_trigger_set_drvdata(afe->trig, indio_dev); afe 533 drivers/iio/health/afe4403.c afe->trig->ops = &afe4403_trigger_ops; afe 534 drivers/iio/health/afe4403.c afe->trig->dev.parent = afe->dev; afe 536 drivers/iio/health/afe4403.c ret = iio_trigger_register(afe->trig); afe 538 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to register IIO trigger\n"); afe 542 drivers/iio/health/afe4403.c ret = devm_request_threaded_irq(afe->dev, afe->irq, afe 546 drivers/iio/health/afe4403.c afe->trig); afe 548 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to request IRQ\n"); afe 556 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to setup buffer\n"); afe 562 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to register IIO device\n"); afe 571 drivers/iio/health/afe4403.c if (afe->irq > 0) afe 572 drivers/iio/health/afe4403.c iio_trigger_unregister(afe->trig); afe 574 drivers/iio/health/afe4403.c regulator_disable(afe->regulator); afe 582 drivers/iio/health/afe4403.c struct afe4403_data *afe = iio_priv(indio_dev); afe 589 drivers/iio/health/afe4403.c if (afe->irq > 0) afe 590 drivers/iio/health/afe4403.c iio_trigger_unregister(afe->trig); afe 592 drivers/iio/health/afe4403.c ret = regulator_disable(afe->regulator); afe 594 drivers/iio/health/afe4403.c dev_err(afe->dev, "Unable to disable regulator\n"); afe 170 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 176 drivers/iio/health/afe4404.c ret = regmap_field_read(afe->fields[afe440x_attr->field], ®_val); afe 194 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 209 drivers/iio/health/afe4404.c ret = regmap_field_write(afe->fields[afe440x_attr->field], val); afe 250 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 260 drivers/iio/health/afe4404.c ret = regmap_read(afe->regmap, value_reg, val); afe 265 drivers/iio/health/afe4404.c ret = regmap_field_read(afe->fields[offdac_field], val); afe 274 drivers/iio/health/afe4404.c ret = regmap_field_read(afe->fields[led_field], val); afe 295 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 303 drivers/iio/health/afe4404.c return regmap_field_write(afe->fields[offdac_field], val); afe 309 drivers/iio/health/afe4404.c return regmap_field_write(afe->fields[led_field], val); afe 329 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 335 drivers/iio/health/afe4404.c ret = regmap_read(afe->regmap, afe4404_channel_values[bit], afe 422 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 425 drivers/iio/health/afe4404.c ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, afe 431 drivers/iio/health/afe4404.c ret = regulator_disable(afe->regulator); afe 443 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 446 drivers/iio/health/afe4404.c ret = regulator_enable(afe->regulator); afe 452 drivers/iio/health/afe4404.c ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, afe 466 drivers/iio/health/afe4404.c struct afe4404_data *afe; afe 469 drivers/iio/health/afe4404.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*afe)); afe 473 drivers/iio/health/afe4404.c afe = iio_priv(indio_dev); afe 476 drivers/iio/health/afe4404.c afe->dev = &client->dev; afe 477 drivers/iio/health/afe4404.c afe->irq = client->irq; afe 479 drivers/iio/health/afe4404.c afe->regmap = devm_regmap_init_i2c(client, &afe4404_regmap_config); afe 480 drivers/iio/health/afe4404.c if (IS_ERR(afe->regmap)) { afe 481 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to allocate register map\n"); afe 482 drivers/iio/health/afe4404.c return PTR_ERR(afe->regmap); afe 486 drivers/iio/health/afe4404.c afe->fields[i] = devm_regmap_field_alloc(afe->dev, afe->regmap, afe 488 drivers/iio/health/afe4404.c if (IS_ERR(afe->fields[i])) { afe 489 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to allocate regmap fields\n"); afe 490 drivers/iio/health/afe4404.c return PTR_ERR(afe->fields[i]); afe 494 drivers/iio/health/afe4404.c afe->regulator = devm_regulator_get(afe->dev, "tx_sup"); afe 495 drivers/iio/health/afe4404.c if (IS_ERR(afe->regulator)) { afe 496 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to get regulator\n"); afe 497 drivers/iio/health/afe4404.c return PTR_ERR(afe->regulator); afe 499 drivers/iio/health/afe4404.c ret = regulator_enable(afe->regulator); afe 501 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to enable regulator\n"); afe 505 drivers/iio/health/afe4404.c ret = regmap_write(afe->regmap, AFE440X_CONTROL0, afe 508 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to reset device\n"); afe 512 drivers/iio/health/afe4404.c ret = regmap_multi_reg_write(afe->regmap, afe4404_reg_sequences, afe 515 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to set register defaults\n"); afe 520 drivers/iio/health/afe4404.c indio_dev->dev.parent = afe->dev; afe 526 drivers/iio/health/afe4404.c if (afe->irq > 0) { afe 527 drivers/iio/health/afe4404.c afe->trig = devm_iio_trigger_alloc(afe->dev, afe 531 drivers/iio/health/afe4404.c if (!afe->trig) { afe 532 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to allocate IIO trigger\n"); afe 537 drivers/iio/health/afe4404.c iio_trigger_set_drvdata(afe->trig, indio_dev); afe 539 drivers/iio/health/afe4404.c afe->trig->ops = &afe4404_trigger_ops; afe 540 drivers/iio/health/afe4404.c afe->trig->dev.parent = afe->dev; afe 542 drivers/iio/health/afe4404.c ret = iio_trigger_register(afe->trig); afe 544 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to register IIO trigger\n"); afe 548 drivers/iio/health/afe4404.c ret = devm_request_threaded_irq(afe->dev, afe->irq, afe 552 drivers/iio/health/afe4404.c afe->trig); afe 554 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to request IRQ\n"); afe 562 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to setup buffer\n"); afe 568 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to register IIO device\n"); afe 577 drivers/iio/health/afe4404.c if (afe->irq > 0) afe 578 drivers/iio/health/afe4404.c iio_trigger_unregister(afe->trig); afe 580 drivers/iio/health/afe4404.c regulator_disable(afe->regulator); afe 588 drivers/iio/health/afe4404.c struct afe4404_data *afe = iio_priv(indio_dev); afe 595 drivers/iio/health/afe4404.c if (afe->irq > 0) afe 596 drivers/iio/health/afe4404.c iio_trigger_unregister(afe->trig); afe 598 drivers/iio/health/afe4404.c ret = regulator_disable(afe->regulator); afe 600 drivers/iio/health/afe4404.c dev_err(afe->dev, "Unable to disable regulator\n"); afe 55 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_status(struct adv748x_afe *afe, u32 *signal, afe 58 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 112 drivers/media/i2c/adv748x/adv748x-afe.c static void adv748x_afe_fill_format(struct adv748x_afe *afe, afe 122 drivers/media/i2c/adv748x/adv748x-afe.c fmt->height = afe->curr_norm & V4L2_STD_525_60 ? 480 : 576; afe 157 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_s_input(struct adv748x_afe *afe, unsigned int input) afe 159 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 167 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 169 drivers/media/i2c/adv748x/adv748x-afe.c if (afe->curr_norm & V4L2_STD_525_60) { afe 186 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 188 drivers/media/i2c/adv748x/adv748x-afe.c *norm = afe->curr_norm; afe 195 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 196 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 205 drivers/media/i2c/adv748x/adv748x-afe.c afe->curr_norm = std; afe 214 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 215 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 221 drivers/media/i2c/adv748x/adv748x-afe.c if (afe->streaming) { afe 233 drivers/media/i2c/adv748x/adv748x-afe.c ret = adv748x_afe_status(afe, NULL, std); afe 235 drivers/media/i2c/adv748x/adv748x-afe.c afe_std = adv748x_afe_std(afe->curr_norm); afe 257 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 258 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 263 drivers/media/i2c/adv748x/adv748x-afe.c ret = adv748x_afe_status(afe, status, NULL); afe 272 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 273 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 280 drivers/media/i2c/adv748x/adv748x-afe.c ret = adv748x_afe_s_input(afe, afe->input); afe 285 drivers/media/i2c/adv748x/adv748x-afe.c ret = adv748x_tx_power(afe->tx, enable); afe 289 drivers/media/i2c/adv748x/adv748x-afe.c afe->streaming = enable; afe 291 drivers/media/i2c/adv748x/adv748x-afe.c adv748x_afe_status(afe, &signal, NULL); afe 317 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_propagate_pixelrate(struct adv748x_afe *afe) afe 321 drivers/media/i2c/adv748x/adv748x-afe.c tx = adv748x_get_remote_sd(&afe->pads[ADV748X_AFE_SOURCE]); afe 349 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_sd_to_afe(sd); afe 360 drivers/media/i2c/adv748x/adv748x-afe.c adv748x_afe_fill_format(afe, &sdformat->format); afe 361 drivers/media/i2c/adv748x/adv748x-afe.c adv748x_afe_propagate_pixelrate(afe); afe 417 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_afe *afe = adv748x_ctrl_to_afe(ctrl); afe 418 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 465 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_init_controls(struct adv748x_afe *afe) afe 467 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 469 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_handler_init(&afe->ctrl_hdl, 5); afe 472 drivers/media/i2c/adv748x/adv748x-afe.c afe->ctrl_hdl.lock = &state->mutex; afe 474 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_new_std(&afe->ctrl_hdl, &adv748x_afe_ctrl_ops, afe 477 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_new_std(&afe->ctrl_hdl, &adv748x_afe_ctrl_ops, afe 480 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_new_std(&afe->ctrl_hdl, &adv748x_afe_ctrl_ops, afe 483 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_new_std(&afe->ctrl_hdl, &adv748x_afe_ctrl_ops, afe 487 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_new_std_menu_items(&afe->ctrl_hdl, &adv748x_afe_ctrl_ops, afe 492 drivers/media/i2c/adv748x/adv748x-afe.c afe->sd.ctrl_handler = &afe->ctrl_hdl; afe 493 drivers/media/i2c/adv748x/adv748x-afe.c if (afe->ctrl_hdl.error) { afe 494 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_handler_free(&afe->ctrl_hdl); afe 495 drivers/media/i2c/adv748x/adv748x-afe.c return afe->ctrl_hdl.error; afe 498 drivers/media/i2c/adv748x/adv748x-afe.c return v4l2_ctrl_handler_setup(&afe->ctrl_hdl); afe 501 drivers/media/i2c/adv748x/adv748x-afe.c int adv748x_afe_init(struct adv748x_afe *afe) afe 503 drivers/media/i2c/adv748x/adv748x-afe.c struct adv748x_state *state = adv748x_afe_to_state(afe); afe 507 drivers/media/i2c/adv748x/adv748x-afe.c afe->input = 0; afe 508 drivers/media/i2c/adv748x/adv748x-afe.c afe->streaming = false; afe 509 drivers/media/i2c/adv748x/adv748x-afe.c afe->curr_norm = V4L2_STD_NTSC_M; afe 511 drivers/media/i2c/adv748x/adv748x-afe.c adv748x_subdev_init(&afe->sd, state, &adv748x_afe_ops, afe 518 drivers/media/i2c/adv748x/adv748x-afe.c afe->input = i; afe 523 drivers/media/i2c/adv748x/adv748x-afe.c adv748x_afe_s_input(afe, afe->input); afe 525 drivers/media/i2c/adv748x/adv748x-afe.c adv_dbg(state, "AFE Default input set to %d\n", afe->input); afe 529 drivers/media/i2c/adv748x/adv748x-afe.c afe->pads[i].flags = MEDIA_PAD_FL_SINK; afe 531 drivers/media/i2c/adv748x/adv748x-afe.c afe->pads[ADV748X_AFE_SOURCE].flags = MEDIA_PAD_FL_SOURCE; afe 533 drivers/media/i2c/adv748x/adv748x-afe.c ret = media_entity_pads_init(&afe->sd.entity, ADV748X_AFE_NR_PADS, afe 534 drivers/media/i2c/adv748x/adv748x-afe.c afe->pads); afe 538 drivers/media/i2c/adv748x/adv748x-afe.c ret = adv748x_afe_init_controls(afe); afe 545 drivers/media/i2c/adv748x/adv748x-afe.c media_entity_cleanup(&afe->sd.entity); afe 550 drivers/media/i2c/adv748x/adv748x-afe.c void adv748x_afe_cleanup(struct adv748x_afe *afe) afe 552 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_device_unregister_subdev(&afe->sd); afe 553 drivers/media/i2c/adv748x/adv748x-afe.c media_entity_cleanup(&afe->sd.entity); afe 554 drivers/media/i2c/adv748x/adv748x-afe.c v4l2_ctrl_handler_free(&afe->ctrl_hdl); afe 350 drivers/media/i2c/adv748x/adv748x-core.c if (rsd == &state->afe.sd) afe 351 drivers/media/i2c/adv748x/adv748x-core.c state->afe.tx = enable ? tx : NULL; afe 357 drivers/media/i2c/adv748x/adv748x-core.c if (state->afe.tx) { afe 744 drivers/media/i2c/adv748x/adv748x-core.c ret = adv748x_afe_init(&state->afe); afe 769 drivers/media/i2c/adv748x/adv748x-core.c adv748x_afe_cleanup(&state->afe); afe 786 drivers/media/i2c/adv748x/adv748x-core.c adv748x_afe_cleanup(&state->afe); afe 86 drivers/media/i2c/adv748x/adv748x-csi2.c &state->afe.sd, afe 94 drivers/media/i2c/adv748x/adv748x-csi2.c state->afe.tx = tx; afe 195 drivers/media/i2c/adv748x/adv748x.h struct adv748x_afe afe; afe 201 drivers/media/i2c/adv748x/adv748x.h #define adv748x_afe_to_state(a) container_of(a, struct adv748x_state, afe) afe 435 drivers/media/i2c/adv748x/adv748x.h int adv748x_afe_init(struct adv748x_afe *afe); afe 436 drivers/media/i2c/adv748x/adv748x.h void adv748x_afe_cleanup(struct adv748x_afe *afe); afe 1925 drivers/scsi/isci/host.c struct scu_afe_registers __iomem *afe = &ihost->scu_registers->afe; afe 1933 drivers/scsi/isci/host.c writel(0x0081000f, &afe->afe_dfx_master_control0); afe 1940 drivers/scsi/isci/host.c writel(0x0007FFFF, &afe->afe_pmsn_master_control2); afe 1946 drivers/scsi/isci/host.c writel(0x00005A00, &afe->afe_bias_control); afe 1948 drivers/scsi/isci/host.c writel(0x00005F00, &afe->afe_bias_control); afe 1950 drivers/scsi/isci/host.c writel(0x00005500, &afe->afe_bias_control); afe 1956 drivers/scsi/isci/host.c writel(0x80040908, &afe->afe_pll_control0); afe 1958 drivers/scsi/isci/host.c writel(0x80040A08, &afe->afe_pll_control0); afe 1960 drivers/scsi/isci/host.c writel(0x80000B08, &afe->afe_pll_control0); afe 1962 drivers/scsi/isci/host.c writel(0x00000B08, &afe->afe_pll_control0); afe 1964 drivers/scsi/isci/host.c writel(0x80000B08, &afe->afe_pll_control0); afe 1971 drivers/scsi/isci/host.c afe_status = readl(&afe->afe_common_block_status); afe 1979 drivers/scsi/isci/host.c writel(0x7bcc96ad, &afe->afe_pmsn_master_control0); afe 1984 drivers/scsi/isci/host.c struct scu_afe_transceiver __iomem *xcvr = &afe->scu_afe_xcvr[phy_id]; afe 2120 drivers/scsi/isci/host.c writel(0x00010f00, &afe->afe_dfx_master_control0); afe 171 drivers/scsi/isci/phy.c struct scu_afe_registers __iomem *afe = &ihost->scu_registers->afe; afe 172 drivers/scsi/isci/phy.c struct scu_afe_transceiver __iomem *xcvr = &afe->scu_afe_xcvr[phy_idx]; afe 1854 drivers/scsi/isci/registers.h struct scu_afe_registers afe; afe 39 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 42 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe_memif *memif = &afe->memif[memif_num]; afe 43 sound/soc/mediatek/common/mtk-afe-fe-dai.c const struct snd_pcm_hardware *mtk_afe_hardware = afe->mtk_afe_hardware; afe 51 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->agent_disable_reg, afe 69 sound/soc/mediatek/common/mtk-afe-fe-dai.c dev_err(afe->dev, "hw_constraint_minmax failed\n"); afe 77 sound/soc/mediatek/common/mtk-afe-fe-dai.c dev_err(afe->dev, "snd_pcm_hw_constraint_integer failed\n"); afe 81 sound/soc/mediatek/common/mtk-afe-fe-dai.c int irq_id = mtk_dynamic_irq_acquire(afe); afe 83 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (irq_id != afe->irqs_size) { afe 87 sound/soc/mediatek/common/mtk-afe-fe-dai.c dev_err(afe->dev, "%s() error: no more asys irq\n", afe 100 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 101 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; afe 106 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->agent_disable_reg, afe 110 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_dynamic_irq_release(afe, irq_id); afe 122 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 123 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; afe 136 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_write(afe->regmap, memif->data->reg_ofs_base, afe 139 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_write(afe->regmap, afe 144 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->msb_reg, afe 151 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->mono_reg, afe 159 sound/soc/mediatek/common/mtk-afe-fe-dai.c fs = afe->memif_fs(substream, params_rate(params)); afe 164 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->fs_reg, afe 184 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 185 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; afe 186 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe_irq *irqs = &afe->irqs[memif->irq_usage]; afe 191 sound/soc/mediatek/common/mtk-afe-fe-dai.c dev_dbg(afe->dev, "%s %s cmd=%d\n", __func__, memif->data->name, cmd); afe 196 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, afe 201 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, irq_data->irq_cnt_reg, afe 206 sound/soc/mediatek/common/mtk-afe-fe-dai.c fs = afe->irq_fs(substream, runtime->rate); afe 211 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, irq_data->irq_fs_reg, afe 216 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, irq_data->irq_en_reg, afe 222 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->enable_reg, afe 225 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, irq_data->irq_en_reg, afe 228 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_write(afe->regmap, irq_data->irq_clr_reg, afe 241 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 242 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; afe 259 sound/soc/mediatek/common/mtk-afe-fe-dai.c dev_err(afe->dev, "%s() error: unsupported format %d\n", afe 264 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->hd_reg, afe 267 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_update_bits(afe->regmap, memif->data->hd_align_reg, afe 285 sound/soc/mediatek/common/mtk-afe-fe-dai.c int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe) afe 289 sound/soc/mediatek/common/mtk-afe-fe-dai.c mutex_lock(&afe->irq_alloc_lock); afe 290 sound/soc/mediatek/common/mtk-afe-fe-dai.c for (i = 0; i < afe->irqs_size; ++i) { afe 291 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (afe->irqs[i].irq_occupyed == 0) { afe 292 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->irqs[i].irq_occupyed = 1; afe 293 sound/soc/mediatek/common/mtk-afe-fe-dai.c mutex_unlock(&afe->irq_alloc_lock); afe 297 sound/soc/mediatek/common/mtk-afe-fe-dai.c mutex_unlock(&afe->irq_alloc_lock); afe 298 sound/soc/mediatek/common/mtk-afe-fe-dai.c return afe->irqs_size; afe 302 sound/soc/mediatek/common/mtk-afe-fe-dai.c int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id) afe 304 sound/soc/mediatek/common/mtk-afe-fe-dai.c mutex_lock(&afe->irq_alloc_lock); afe 305 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (irq_id >= 0 && irq_id < afe->irqs_size) { afe 306 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->irqs[irq_id].irq_occupyed = 0; afe 307 sound/soc/mediatek/common/mtk-afe-fe-dai.c mutex_unlock(&afe->irq_alloc_lock); afe 310 sound/soc/mediatek/common/mtk-afe-fe-dai.c mutex_unlock(&afe->irq_alloc_lock); afe 317 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 318 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct device *dev = afe->dev; afe 319 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct regmap *regmap = afe->regmap; afe 322 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (pm_runtime_status_suspended(dev) || afe->suspended) afe 325 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (!afe->reg_back_up) afe 326 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->reg_back_up = afe 327 sound/soc/mediatek/common/mtk-afe-fe-dai.c devm_kcalloc(dev, afe->reg_back_up_list_num, afe 330 sound/soc/mediatek/common/mtk-afe-fe-dai.c for (i = 0; i < afe->reg_back_up_list_num; i++) afe 331 sound/soc/mediatek/common/mtk-afe-fe-dai.c regmap_read(regmap, afe->reg_back_up_list[i], afe 332 sound/soc/mediatek/common/mtk-afe-fe-dai.c &afe->reg_back_up[i]); afe 334 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->suspended = true; afe 335 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->runtime_suspend(dev); afe 342 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 343 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct device *dev = afe->dev; afe 344 sound/soc/mediatek/common/mtk-afe-fe-dai.c struct regmap *regmap = afe->regmap; afe 347 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (pm_runtime_status_suspended(dev) || !afe->suspended) afe 350 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->runtime_resume(dev); afe 352 sound/soc/mediatek/common/mtk-afe-fe-dai.c if (!afe->reg_back_up) afe 355 sound/soc/mediatek/common/mtk-afe-fe-dai.c for (i = 0; i < afe->reg_back_up_list_num; i++) afe 356 sound/soc/mediatek/common/mtk-afe-fe-dai.c mtk_regmap_write(regmap, afe->reg_back_up_list[i], afe 357 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->reg_back_up[i]); afe 359 sound/soc/mediatek/common/mtk-afe-fe-dai.c afe->suspended = false; afe 32 sound/soc/mediatek/common/mtk-afe-fe-dai.h int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe); afe 33 sound/soc/mediatek/common/mtk-afe-fe-dai.h int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id); afe 16 sound/soc/mediatek/common/mtk-afe-platform-driver.c int mtk_afe_combine_sub_dai(struct mtk_base_afe *afe) afe 22 sound/soc/mediatek/common/mtk-afe-platform-driver.c list_for_each_entry(dai, &afe->sub_dais, list) { afe 26 sound/soc/mediatek/common/mtk-afe-platform-driver.c dev_info(afe->dev, "%s(), num of dai %zd\n", __func__, num_dai_drivers); afe 29 sound/soc/mediatek/common/mtk-afe-platform-driver.c afe->num_dai_drivers = num_dai_drivers; afe 30 sound/soc/mediatek/common/mtk-afe-platform-driver.c afe->dai_drivers = devm_kcalloc(afe->dev, afe 34 sound/soc/mediatek/common/mtk-afe-platform-driver.c if (!afe->dai_drivers) afe 37 sound/soc/mediatek/common/mtk-afe-platform-driver.c list_for_each_entry(dai, &afe->sub_dais, list) { afe 39 sound/soc/mediatek/common/mtk-afe-platform-driver.c memcpy(&afe->dai_drivers[dai_idx], afe 51 sound/soc/mediatek/common/mtk-afe-platform-driver.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 54 sound/soc/mediatek/common/mtk-afe-platform-driver.c list_for_each_entry(dai, &afe->sub_dais, list) { afe 66 sound/soc/mediatek/common/mtk-afe-platform-driver.c list_for_each_entry(dai, &afe->sub_dais, list) { afe 85 sound/soc/mediatek/common/mtk-afe-platform-driver.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 86 sound/soc/mediatek/common/mtk-afe-platform-driver.c struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; afe 88 sound/soc/mediatek/common/mtk-afe-platform-driver.c struct regmap *regmap = afe->regmap; afe 89 sound/soc/mediatek/common/mtk-afe-platform-driver.c struct device *dev = afe->dev; afe 126 sound/soc/mediatek/common/mtk-afe-platform-driver.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 128 sound/soc/mediatek/common/mtk-afe-platform-driver.c size = afe->mtk_afe_hardware->buffer_bytes_max; afe 130 sound/soc/mediatek/common/mtk-afe-platform-driver.c afe->dev, size, size); afe 25 sound/soc/mediatek/common/mtk-afe-platform-driver.h int mtk_afe_combine_sub_dai(struct mtk_base_afe *afe); afe 25 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_init_clock(struct mtk_base_afe *afe) afe 27 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 31 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c afe_priv->base_ck[i] = devm_clk_get(afe->dev, base_clks[i]); afe 33 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", base_clks[i]); afe 45 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c i2s_path->sel_ck = devm_clk_get(afe->dev, name); afe 47 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", name); afe 52 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c i2s_path->div_ck = devm_clk_get(afe->dev, name); afe 54 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", name); afe 59 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c i2s_path->mclk_ck = devm_clk_get(afe->dev, name); afe 61 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", name); afe 66 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c i2s_ck = devm_clk_get(afe->dev, name); afe 68 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", name); afe 74 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c i2s_ck = devm_clk_get(afe->dev, name); afe 76 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", name); afe 82 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c i2s_path->asrco_ck = devm_clk_get(afe->dev, name); afe 84 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to get %s\n", name); afe 90 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c afe_priv->mrgif_ck = devm_clk_get(afe->dev, "audio_mrgif_pd"); afe 101 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_afe_enable_i2s(struct mtk_base_afe *afe, afe 109 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to enable ASRC clock %d\n", ret); afe 115 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to enable I2S clock %d\n", ret); afe 127 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c void mt2701_afe_disable_i2s(struct mtk_base_afe *afe, afe 135 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_afe_enable_mclk(struct mtk_base_afe *afe, int id) afe 137 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 143 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c void mt2701_afe_disable_mclk(struct mtk_base_afe *afe, int id) afe 145 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 151 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_enable_btmrg_clk(struct mtk_base_afe *afe) afe 153 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 158 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c void mt2701_disable_btmrg_clk(struct mtk_base_afe *afe) afe 160 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 165 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe) afe 167 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 220 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c static void mt2701_afe_disable_audsys(struct mtk_base_afe *afe) afe 222 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 233 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_afe_enable_clock(struct mtk_base_afe *afe) afe 238 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c ret = mt2701_afe_enable_audsys(afe); afe 240 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to enable audio system %d\n", ret); afe 244 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c regmap_update_bits(afe->regmap, ASYS_TOP_CON, afe 247 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, afe 252 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c regmap_write(afe->regmap, PWR1_ASM_CON1, PWR1_ASM_CON1_INIT_VAL); afe 253 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c regmap_write(afe->regmap, PWR2_ASM_CON1, PWR2_ASM_CON1_INIT_VAL); afe 258 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_afe_disable_clock(struct mtk_base_afe *afe) afe 260 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c regmap_update_bits(afe->regmap, ASYS_TOP_CON, afe 262 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, afe 265 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c mt2701_afe_disable_audsys(afe); afe 270 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c int mt2701_mclk_configuration(struct mtk_base_afe *afe, int id) afe 273 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c struct mt2701_afe_private *priv = afe->platform_priv; afe 286 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to set mclk source\n"); afe 293 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c dev_err(afe->dev, "failed to set mclk divider %d\n", ret); afe 16 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_init_clock(struct mtk_base_afe *afe); afe 17 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_afe_enable_clock(struct mtk_base_afe *afe); afe 18 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_afe_disable_clock(struct mtk_base_afe *afe); afe 20 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_afe_enable_i2s(struct mtk_base_afe *afe, afe 23 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h void mt2701_afe_disable_i2s(struct mtk_base_afe *afe, afe 26 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_afe_enable_mclk(struct mtk_base_afe *afe, int id); afe 27 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h void mt2701_afe_disable_mclk(struct mtk_base_afe *afe, int id); afe 29 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_enable_btmrg_clk(struct mtk_base_afe *afe); afe 30 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h void mt2701_disable_btmrg_clk(struct mtk_base_afe *afe); afe 32 sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h int mt2701_mclk_configuration(struct mtk_base_afe *afe, int id); afe 84 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c static int mt2701_dai_num_to_i2s(struct mtk_base_afe *afe, int num) afe 86 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 90 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c dev_err(afe->dev, "%s, num not available, num %d, val %d\n", afe 111 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 112 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 113 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); afe 119 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c return mt2701_afe_enable_mclk(afe, mode ? 1 : i2s_num); afe 122 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c static int mt2701_afe_i2s_path_disable(struct mtk_base_afe *afe, afe 135 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, afe 138 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_afe_disable_i2s(afe, i2s_path, stream_dir); afe 146 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 147 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 148 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); afe 162 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_afe_i2s_path_disable(afe, i2s_path, substream->stream); afe 166 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_afe_i2s_path_disable(afe, i2s_path, !substream->stream); afe 170 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_afe_disable_mclk(afe, mode ? 1 : i2s_num); afe 173 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c static int mt2701_i2s_path_enable(struct mtk_base_afe *afe, afe 178 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 209 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, mask, val); afe 211 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, reg, afe 217 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_afe_enable_i2s(afe, i2s_path, stream_dir); afe 220 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, afe 223 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, afe 226 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, afe 234 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 235 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 236 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c int ret, i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); afe 248 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c ret = mt2701_mclk_configuration(afe, mode ? 1 : i2s_num); afe 256 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_i2s_path_enable(afe, i2s_path, !substream->stream, afe 259 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_i2s_path_enable(afe, i2s_path, substream->stream, afe 268 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 269 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 270 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); afe 290 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 291 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 294 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c ret = mt2701_enable_btmrg_clk(afe); afe 307 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 314 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c dev_err(afe->dev, "unsupported rate %d\n", stream_fs); afe 318 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MRGIF_CON, afe 331 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAIBT_CON0, msk, val); afe 333 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAIBT_CON0, afe 336 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MRGIF_CON, afe 339 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MRGIF_CON, afe 348 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 349 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mt2701_afe_private *afe_priv = afe->platform_priv; afe 353 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAIBT_CON0, afe 355 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MRGIF_CON, afe 357 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MRGIF_CON, afe 359 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mt2701_disable_btmrg_clk(afe); afe 368 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 374 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c memif_tmp = &afe->memif[MT2701_MEMIF_DLM]; afe 376 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c dev_warn(afe->dev, "memif is not available"); afe 388 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 393 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, afe 404 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 410 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c memif_tmp = &afe->memif[i]; afe 417 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c memif_data = afe->memif[i].data; afe 418 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, afe 430 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 435 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c memif_data = afe->memif[i].data; afe 436 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, afe 449 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 452 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, afe 456 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, afe 460 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, afe 471 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 472 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe_memif *memif_tmp = &afe->memif[MT2701_MEMIF_DL1]; afe 477 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, memif_tmp->data->enable_reg, afe 485 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_update_bits(afe->regmap, memif_tmp->data->enable_reg, afe 971 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 973 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c snd_soc_component_init_regmap(component, afe->regmap); afe 1289 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = dev; afe 1294 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_read(afe->regmap, ASYS_IRQ_STATUS, &status); afe 1295 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c regmap_write(afe->regmap, ASYS_IRQ_CLR, status); afe 1298 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c memif = &afe->memif[id]; afe 1302 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c irq = &afe->irqs[memif->irq_usage]; afe 1312 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 1314 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c return mt2701_afe_disable_clock(afe); afe 1319 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 1321 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c return mt2701_afe_enable_clock(afe); afe 1326 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c struct mtk_base_afe *afe; afe 1331 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); afe 1332 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c if (!afe) afe 1335 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv), afe 1337 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c if (!afe->platform_priv) afe 1340 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe_priv = afe->platform_priv; afe 1342 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->dev = &pdev->dev; afe 1343 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c dev = afe->dev; afe 1357 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); afe 1363 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->regmap = syscon_node_to_regmap(dev->parent->of_node); afe 1364 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c if (IS_ERR(afe->regmap)) { afe 1366 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c return PTR_ERR(afe->regmap); afe 1369 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c mutex_init(&afe->irq_alloc_lock); afe 1372 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->memif_size = MT2701_MEMIF_NUM; afe 1373 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif), afe 1375 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c if (!afe->memif) afe 1378 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c for (i = 0; i < afe->memif_size; i++) { afe 1379 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->memif[i].data = &memif_data[i]; afe 1380 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->memif[i].irq_usage = -1; afe 1384 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->irqs_size = MT2701_IRQ_ASYS_END; afe 1385 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs), afe 1387 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c if (!afe->irqs) afe 1390 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c for (i = 0; i < afe->irqs_size; i++) afe 1391 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->irqs[i].irq_data = &irq_data[i]; afe 1401 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->mtk_afe_hardware = &mt2701_afe_hardware; afe 1402 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->memif_fs = mt2701_memif_fs; afe 1403 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->irq_fs = mt2701_irq_fs; afe 1404 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->reg_back_up_list = mt2701_afe_backup_list; afe 1405 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->reg_back_up_list_num = ARRAY_SIZE(mt2701_afe_backup_list); afe 1406 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->runtime_resume = mt2701_afe_runtime_resume; afe 1407 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c afe->runtime_suspend = mt2701_afe_runtime_suspend; afe 1410 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c ret = mt2701_init_clock(afe); afe 1416 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c platform_set_drvdata(pdev, afe); afe 34 sound/soc/mediatek/mt6797/mt6797-afe-clk.c int mt6797_init_clock(struct mtk_base_afe *afe) afe 36 sound/soc/mediatek/mt6797/mt6797-afe-clk.c struct mt6797_afe_private *afe_priv = afe->platform_priv; afe 39 sound/soc/mediatek/mt6797/mt6797-afe-clk.c afe_priv->clk = devm_kcalloc(afe->dev, CLK_NUM, sizeof(*afe_priv->clk), afe 45 sound/soc/mediatek/mt6797/mt6797-afe-clk.c afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]); afe 47 sound/soc/mediatek/mt6797/mt6797-afe-clk.c dev_err(afe->dev, "%s(), devm_clk_get %s fail, ret %ld\n", afe 57 sound/soc/mediatek/mt6797/mt6797-afe-clk.c int mt6797_afe_enable_clock(struct mtk_base_afe *afe) afe 59 sound/soc/mediatek/mt6797/mt6797-afe-clk.c struct mt6797_afe_private *afe_priv = afe->platform_priv; afe 64 sound/soc/mediatek/mt6797/mt6797-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 71 sound/soc/mediatek/mt6797/mt6797-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 78 sound/soc/mediatek/mt6797/mt6797-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 86 sound/soc/mediatek/mt6797/mt6797-afe-clk.c dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n", afe 94 sound/soc/mediatek/mt6797/mt6797-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 113 sound/soc/mediatek/mt6797/mt6797-afe-clk.c int mt6797_afe_disable_clock(struct mtk_base_afe *afe) afe 115 sound/soc/mediatek/mt6797/mt6797-afe-clk.c struct mt6797_afe_private *afe_priv = afe->platform_priv; afe 14 sound/soc/mediatek/mt6797/mt6797-afe-clk.h int mt6797_init_clock(struct mtk_base_afe *afe); afe 15 sound/soc/mediatek/mt6797/mt6797-afe-clk.h int mt6797_afe_enable_clock(struct mtk_base_afe *afe); afe 16 sound/soc/mediatek/mt6797/mt6797-afe-clk.h int mt6797_afe_disable_clock(struct mtk_base_afe *afe); afe 56 sound/soc/mediatek/mt6797/mt6797-afe-common.h int mt6797_dai_adda_register(struct mtk_base_afe *afe); afe 57 sound/soc/mediatek/mt6797/mt6797-afe-common.h int mt6797_dai_pcm_register(struct mtk_base_afe *afe); afe 58 sound/soc/mediatek/mt6797/mt6797-afe-common.h int mt6797_dai_hostless_register(struct mtk_base_afe *afe); afe 145 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 148 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c return mt6797_rate_transform(afe->dev, rate, id); afe 156 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 158 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c return mt6797_general_rate_transform(afe->dev, rate); afe 604 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe *afe = dev; afe 613 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_read(afe->regmap, AFE_IRQ_MCU_EN, &mcu_en); afe 615 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c ret = regmap_read(afe->regmap, AFE_IRQ_MCU_STATUS, &status); afe 617 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x, mcu_en 0x%x\n", afe 628 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe_memif *memif = &afe->memif[i]; afe 633 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c irq = &afe->irqs[memif->irq_usage]; afe 641 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_write(afe->regmap, afe 650 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 655 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, AFE_ON_MASK_SFT, 0x0); afe 657 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_read(afe->regmap, AFE_DAC_CON0, &afe_on_retm); afe 665 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c dev_warn(afe->dev, "%s(), retry %d\n", __func__, retry); afe 668 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_IRQ_MCU_CLR, 0xffff, 0xffff); afe 670 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c return mt6797_afe_disable_clock(afe); afe 675 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 678 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c ret = mt6797_afe_enable_clock(afe); afe 683 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_write(afe->regmap, AFE_IRQ_MCU_EN, AFE_IRQ_MCU_EN_MASK_SFT); afe 686 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MEMIF_HDALIGN, afe 689 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MEMIF_MSB, afe 692 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MEMIF_MSB, afe 696 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_CONN_24BIT, afe 700 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, afe 720 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c static int mt6797_dai_memif_register(struct mtk_base_afe *afe) afe 724 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 728 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c list_add(&dai->list, &afe->sub_dais); afe 750 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c struct mtk_base_afe *afe; afe 755 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); afe 756 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c if (!afe) afe 759 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv), afe 761 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c if (!afe->platform_priv) afe 764 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe_priv = afe->platform_priv; afe 765 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->dev = &pdev->dev; afe 766 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c dev = afe->dev; afe 769 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c ret = mt6797_init_clock(afe); afe 776 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->base_addr = devm_platform_ioremap_resource(pdev, 0); afe 777 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c if (IS_ERR(afe->base_addr)) afe 778 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c return PTR_ERR(afe->base_addr); afe 780 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->regmap = devm_regmap_init_mmio(&pdev->dev, afe->base_addr, afe 782 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c if (IS_ERR(afe->regmap)) afe 783 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c return PTR_ERR(afe->regmap); afe 786 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->memif_size = MT6797_MEMIF_NUM; afe 787 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif), afe 789 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c if (!afe->memif) afe 792 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c for (i = 0; i < afe->memif_size; i++) { afe 793 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->memif[i].data = &memif_data[i]; afe 794 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->memif[i].irq_usage = -1; afe 797 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c mutex_init(&afe->irq_alloc_lock); afe 800 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->irqs_size = MT6797_IRQ_NUM; afe 801 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs), afe 803 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c if (!afe->irqs) afe 806 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c for (i = 0; i < afe->irqs_size; i++) afe 807 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->irqs[i].irq_data = &irq_data[i]; afe 816 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); afe 823 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c INIT_LIST_HEAD(&afe->sub_dais); afe 826 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c ret = dai_register_cbs[i](afe); afe 828 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c dev_warn(afe->dev, "dai register i %d fail, ret %d\n", afe 835 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c ret = mtk_afe_combine_sub_dai(afe); afe 837 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n", afe 842 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->mtk_afe_hardware = &mt6797_afe_hardware; afe 843 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->memif_fs = mt6797_memif_fs; afe 844 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->irq_fs = mt6797_irq_fs; afe 846 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->runtime_resume = mt6797_afe_runtime_resume; afe 847 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->runtime_suspend = mt6797_afe_runtime_suspend; afe 849 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c platform_set_drvdata(pdev, afe); afe 864 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c ret = devm_snd_soc_register_component(afe->dev, afe 866 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->dai_drivers, afe 867 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c afe->num_dai_drivers); afe 38 sound/soc/mediatek/mt6797/mt6797-dai-adda.c static unsigned int adda_dl_rate_transform(struct mtk_base_afe *afe, afe 65 sound/soc/mediatek/mt6797/mt6797-dai-adda.c dev_warn(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n", afe 71 sound/soc/mediatek/mt6797/mt6797-dai-adda.c static unsigned int adda_ul_rate_transform(struct mtk_base_afe *afe, afe 88 sound/soc/mediatek/mt6797/mt6797-dai-adda.c dev_warn(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n", afe 135 sound/soc/mediatek/mt6797/mt6797-dai-adda.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 137 sound/soc/mediatek/mt6797/mt6797-dai-adda.c dev_dbg(afe->dev, "%s(), name %s, event 0x%x\n", afe 234 sound/soc/mediatek/mt6797/mt6797-dai-adda.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 237 sound/soc/mediatek/mt6797/mt6797-dai-adda.c dev_dbg(afe->dev, "%s(), id %d, stream %d, rate %d\n", afe 245 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_PREDIS_CON0, 0); afe 246 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_PREDIS_CON1, 0); afe 249 sound/soc/mediatek/mt6797/mt6797-dai-adda.c dl_src2_con0 = adda_dl_rate_transform(afe, rate) << 28; afe 287 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_DL_SRC2_CON0, dl_src2_con0); afe 288 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_DL_SRC2_CON1, dl_src2_con1); afe 294 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_update_bits(afe->regmap, afe 299 sound/soc/mediatek/mt6797/mt6797-dai-adda.c voice_mode = adda_ul_rate_transform(afe, rate); afe 304 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_NEWIF_CFG0, 0x03F87201); afe 308 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_update_bits(afe->regmap, afe 313 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_update_bits(afe->regmap, afe 319 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_update_bits(afe->regmap, afe 328 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_update_bits(afe->regmap, afe 333 sound/soc/mediatek/mt6797/mt6797-dai-adda.c regmap_update_bits(afe->regmap, afe 384 sound/soc/mediatek/mt6797/mt6797-dai-adda.c int mt6797_dai_adda_register(struct mtk_base_afe *afe) afe 388 sound/soc/mediatek/mt6797/mt6797-dai-adda.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 392 sound/soc/mediatek/mt6797/mt6797-dai-adda.c list_add(&dai->list, &afe->sub_dais); afe 40 sound/soc/mediatek/mt6797/mt6797-dai-hostless.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 42 sound/soc/mediatek/mt6797/mt6797-dai-hostless.c return snd_soc_set_runtime_hwparams(substream, afe->mtk_afe_hardware); afe 101 sound/soc/mediatek/mt6797/mt6797-dai-hostless.c int mt6797_dai_hostless_register(struct mtk_base_afe *afe) afe 105 sound/soc/mediatek/mt6797/mt6797-dai-hostless.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 109 sound/soc/mediatek/mt6797/mt6797-dai-hostless.c list_add(&dai->list, &afe->sub_dais); afe 185 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 187 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c unsigned int rate_reg = mt6797_rate_transform(afe->dev, rate, dai->id); afe 190 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c dev_dbg(afe->dev, "%s(), id %d, stream %d, rate %d, rate_reg %d, widget active p %d, c %d\n", afe 216 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c regmap_update_bits(afe->regmap, PCM_INTF_CON1, afe 228 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c regmap_update_bits(afe->regmap, PCM2_INTF_CON, afe 232 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c dev_warn(afe->dev, "%s(), id %d not support\n", afe 299 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c int mt6797_dai_pcm_register(struct mtk_base_afe *afe) afe 303 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 307 sound/soc/mediatek/mt6797/mt6797-dai-pcm.c list_add(&dai->list, &afe->sub_dais); afe 196 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c static int mt8173_afe_set_i2s(struct mtk_base_afe *afe, unsigned int rate) afe 205 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_ADDA_TOP_CON0, 0x1, 0x1); afe 206 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_ADDA2_TOP_CON0, 0x1, 0x1); afe 213 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_I2S_CON2, ~AFE_I2S_CON2_EN, val); afe 220 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_I2S_CON1, ~AFE_I2S_CON1_EN, val); afe 224 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c static void mt8173_afe_set_i2s_enable(struct mtk_base_afe *afe, bool enable) afe 228 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_read(afe->regmap, AFE_I2S_CON2, &val); afe 233 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_I2S_CON2, 0x1, enable); afe 236 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_I2S_CON1, 0x1, enable); afe 239 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c static int mt8173_afe_dais_enable_clks(struct mtk_base_afe *afe, afe 247 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "Failed to enable m_ck\n"); afe 255 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "Failed to enable b_ck\n"); afe 262 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c static int mt8173_afe_dais_set_clks(struct mtk_base_afe *afe, afe 271 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "Failed to set m_ck rate\n"); afe 279 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "Failed to set b_ck rate\n"); afe 286 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c static void mt8173_afe_dais_disable_clks(struct mtk_base_afe *afe, afe 298 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 303 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, afe 311 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 316 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_set_i2s_enable(afe, false); afe 317 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, afe 326 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 327 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 330 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_dais_set_clks(afe, afe_priv->clocks[MT8173_CLK_I2S1_M], afe 332 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_dais_set_clks(afe, afe_priv->clocks[MT8173_CLK_I2S2_M], afe 335 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c ret = mt8173_afe_set_i2s(afe, substream->runtime->rate); afe 339 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_set_i2s_enable(afe, true); afe 347 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 348 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 353 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_dais_enable_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M], afe 361 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 362 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 367 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_dais_disable_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M], afe 375 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 376 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 380 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c mt8173_afe_dais_set_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M], afe 392 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_TDM_CON1, ~AFE_TDM_CON1_EN, val); afe 427 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_TDM_CON2, 0x0000ffff, val); afe 429 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, afe 437 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 439 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_info(afe->dev, "%s cmd=%d %s\n", __func__, cmd, dai->name); afe 444 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, afe 448 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_write(afe->regmap, AFE_HDMI_CONN0, afe 459 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, 0x1, 0x1); afe 462 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_TDM_CON1, 0x1, 0x1); afe 468 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_TDM_CON1, 0x1, 0); afe 471 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, 0x1, 0); afe 473 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, afe 487 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 488 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; afe 918 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = dev_id; afe 922 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c ret = regmap_read(afe->regmap, AFE_IRQ_STATUS, ®_value); afe 924 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "%s irq status err\n", __func__); afe 930 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe_memif *memif = &afe->memif[i]; afe 936 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c irq = &afe->irqs[memif->irq_usage]; afe 946 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_write(afe->regmap, AFE_IRQ_CLR, afe 954 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 955 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 958 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0); afe 961 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, afe 976 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 977 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 1007 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, AUD_TCON0_PDN_AFE, 0); afe 1010 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_CONN_24BIT, afe 1014 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_IRQ_MCU_EN, 0xff, 0xff); afe 1017 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x1); afe 1035 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c static int mt8173_afe_init_audio_clk(struct mtk_base_afe *afe) afe 1038 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mt8173_afe_private *afe_priv = afe->platform_priv; afe 1041 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]); afe 1043 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "%s devm_clk_get %s fail\n", afe 1057 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c struct mtk_base_afe *afe; afe 1064 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); afe 1065 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c if (!afe) afe 1068 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv), afe 1070 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe_priv = afe->platform_priv; afe 1074 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->dev = &pdev->dev; afe 1079 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler, afe 1080 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c 0, "Afe_ISR_Handle", (void *)afe); afe 1082 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "could not request_irq\n"); afe 1086 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->base_addr = devm_platform_ioremap_resource(pdev, 0); afe 1087 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c if (IS_ERR(afe->base_addr)) afe 1088 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c return PTR_ERR(afe->base_addr); afe 1090 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->regmap = devm_regmap_init_mmio(&pdev->dev, afe->base_addr, afe 1092 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c if (IS_ERR(afe->regmap)) afe 1093 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c return PTR_ERR(afe->regmap); afe 1096 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c ret = mt8173_afe_init_audio_clk(afe); afe 1098 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c dev_err(afe->dev, "mt8173_afe_init_audio_clk fail\n"); afe 1103 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->memif_size = MT8173_AFE_MEMIF_NUM; afe 1104 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->memif = devm_kcalloc(afe->dev, afe->memif_size, afe 1105 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c sizeof(*afe->memif), GFP_KERNEL); afe 1106 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c if (!afe->memif) afe 1109 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->irqs_size = MT8173_AFE_IRQ_NUM; afe 1110 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->irqs = devm_kcalloc(afe->dev, afe->irqs_size, afe 1111 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c sizeof(*afe->irqs), GFP_KERNEL); afe 1112 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c if (!afe->irqs) afe 1115 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c for (i = 0; i < afe->irqs_size; i++) { afe 1116 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->memif[i].data = &memif_data[i]; afe 1117 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->irqs[i].irq_data = &irq_data[i]; afe 1118 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->irqs[i].irq_occupyed = true; afe 1119 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->memif[i].irq_usage = i; afe 1120 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->memif[i].const_irq = 1; afe 1123 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->mtk_afe_hardware = &mt8173_afe_hardware; afe 1124 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->memif_fs = mt8173_memif_fs; afe 1125 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->irq_fs = mt8173_irq_fs; afe 1127 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c platform_set_drvdata(pdev, afe); afe 1136 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->reg_back_up_list = mt8173_afe_backup_list; afe 1137 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->reg_back_up_list_num = ARRAY_SIZE(mt8173_afe_backup_list); afe 1138 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->runtime_resume = mt8173_afe_runtime_resume; afe 1139 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c afe->runtime_suspend = mt8173_afe_runtime_suspend; afe 92 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_init_clock(struct mtk_base_afe *afe) afe 94 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 97 sound/soc/mediatek/mt8183/mt8183-afe-clk.c afe_priv->clk = devm_kcalloc(afe->dev, CLK_NUM, sizeof(*afe_priv->clk), afe 103 sound/soc/mediatek/mt8183/mt8183-afe-clk.c afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]); afe 105 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), devm_clk_get %s fail, ret %ld\n", afe 115 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_afe_enable_clock(struct mtk_base_afe *afe) afe 117 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 122 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 129 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 137 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n", afe 145 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 153 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n", afe 161 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 168 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 175 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 182 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 189 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 214 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_afe_disable_clock(struct mtk_base_afe *afe) afe 216 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 231 sound/soc/mediatek/mt8183/mt8183-afe-clk.c static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable) afe 233 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 239 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 246 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 255 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 262 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 271 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 281 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 305 sound/soc/mediatek/mt8183/mt8183-afe-clk.c static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable) afe 307 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 313 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 320 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 329 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 336 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 345 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 355 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", afe 379 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_apll1_enable(struct mtk_base_afe *afe) afe 381 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 385 sound/soc/mediatek/mt8183/mt8183-afe-clk.c apll1_mux_setting(afe, true); afe 389 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 396 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 401 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_APLL1_TUNER_CFG, afe 403 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_APLL1_TUNER_CFG, 0x1, 0x1); afe 405 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_HD_ENGEN_ENABLE, afe 417 sound/soc/mediatek/mt8183/mt8183-afe-clk.c void mt8183_apll1_disable(struct mtk_base_afe *afe) afe 419 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 421 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_HD_ENGEN_ENABLE, afe 425 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_APLL1_TUNER_CFG, 0x1, 0x0); afe 430 sound/soc/mediatek/mt8183/mt8183-afe-clk.c apll1_mux_setting(afe, false); afe 433 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_apll2_enable(struct mtk_base_afe *afe) afe 435 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 439 sound/soc/mediatek/mt8183/mt8183-afe-clk.c apll2_mux_setting(afe, true); afe 443 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 450 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", afe 455 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_APLL2_TUNER_CFG, afe 457 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_APLL2_TUNER_CFG, 0x1, 0x1); afe 459 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_HD_ENGEN_ENABLE, afe 471 sound/soc/mediatek/mt8183/mt8183-afe-clk.c void mt8183_apll2_disable(struct mtk_base_afe *afe) afe 473 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 475 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_HD_ENGEN_ENABLE, afe 479 sound/soc/mediatek/mt8183/mt8183-afe-clk.c regmap_update_bits(afe->regmap, AFE_APLL2_TUNER_CFG, 0x1, 0x0); afe 484 sound/soc/mediatek/mt8183/mt8183-afe-clk.c apll2_mux_setting(afe, false); afe 487 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_get_apll_rate(struct mtk_base_afe *afe, int apll) afe 492 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_get_apll_by_rate(struct mtk_base_afe *afe, int rate) afe 497 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_get_apll_by_name(struct mtk_base_afe *afe, const char *name) afe 542 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int mt8183_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate) afe 544 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 545 sound/soc/mediatek/mt8183/mt8183-afe-clk.c int apll = mt8183_get_apll_by_rate(afe, rate); afe 560 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 567 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n", afe 577 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n", afe 583 sound/soc/mediatek/mt8183/mt8183-afe-clk.c dev_err(afe->dev, "%s(), clk_set_rate %s, rate %d, fail %d\n", afe 602 sound/soc/mediatek/mt8183/mt8183-afe-clk.c void mt8183_mck_disable(struct mtk_base_afe *afe, int mck_id) afe 604 sound/soc/mediatek/mt8183/mt8183-afe-clk.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 22 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_init_clock(struct mtk_base_afe *afe); afe 23 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_afe_enable_clock(struct mtk_base_afe *afe); afe 24 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_afe_disable_clock(struct mtk_base_afe *afe); afe 26 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_apll1_enable(struct mtk_base_afe *afe); afe 27 sound/soc/mediatek/mt8183/mt8183-afe-clk.h void mt8183_apll1_disable(struct mtk_base_afe *afe); afe 29 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_apll2_enable(struct mtk_base_afe *afe); afe 30 sound/soc/mediatek/mt8183/mt8183-afe-clk.h void mt8183_apll2_disable(struct mtk_base_afe *afe); afe 32 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_get_apll_rate(struct mtk_base_afe *afe, int apll); afe 33 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_get_apll_by_rate(struct mtk_base_afe *afe, int rate); afe 34 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_get_apll_by_name(struct mtk_base_afe *afe, const char *name); afe 36 sound/soc/mediatek/mt8183/mt8183-afe-clk.h int mt8183_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate); afe 37 sound/soc/mediatek/mt8183/mt8183-afe-clk.h void mt8183_mck_disable(struct mtk_base_afe *afe, int mck_id); afe 103 sound/soc/mediatek/mt8183/mt8183-afe-common.h int mt8183_dai_adda_register(struct mtk_base_afe *afe); afe 104 sound/soc/mediatek/mt8183/mt8183-afe-common.h int mt8183_dai_pcm_register(struct mtk_base_afe *afe); afe 105 sound/soc/mediatek/mt8183/mt8183-afe-common.h int mt8183_dai_i2s_register(struct mtk_base_afe *afe); afe 106 sound/soc/mediatek/mt8183/mt8183-afe-common.h int mt8183_dai_tdm_register(struct mtk_base_afe *afe); afe 107 sound/soc/mediatek/mt8183/mt8183-afe-common.h int mt8183_dai_hostless_register(struct mtk_base_afe *afe); afe 147 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 150 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c return mt8183_rate_transform(afe->dev, rate, id); afe 158 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); afe 160 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c return mt8183_general_rate_transform(afe->dev, rate); afe 928 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe *afe = dev; afe 938 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_read(afe->regmap, AFE_IRQ_MCU_EN, &mcu_en); afe 940 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = regmap_read(afe->regmap, AFE_IRQ_MCU_STATUS, &status); afe 945 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c dev_err(afe->dev, "%s(), irq status err, ret %d, status 0x%x, mcu_en 0x%x\n", afe 953 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe_memif *memif = &afe->memif[i]; afe 961 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c irq = &afe->irqs[memif->irq_usage]; afe 969 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_write(afe->regmap, afe 978 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 979 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 983 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl) afe 987 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, AFE_ON_MASK_SFT, 0x0); afe 989 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = regmap_read_poll_timeout(afe->regmap, afe 996 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c dev_warn(afe->dev, "%s(), ret %d\n", __func__, ret); afe 999 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_update_bits(afe->regmap, AFE_IRQ_MCU_CLR, 0xffff, 0xffff); afe 1000 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_update_bits(afe->regmap, AFE_IRQ_MCU_CLR, 0xffff, 0xffff); afe 1003 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regcache_cache_only(afe->regmap, true); afe 1004 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regcache_mark_dirty(afe->regmap); afe 1007 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c return mt8183_afe_disable_clock(afe); afe 1012 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe *afe = dev_get_drvdata(dev); afe 1013 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 1016 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = mt8183_afe_enable_clock(afe); afe 1020 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl) afe 1023 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regcache_cache_only(afe->regmap, false); afe 1024 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regcache_sync(afe->regmap); afe 1027 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON0, 0x1 << 29, 0x1 << 29); afe 1030 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_update_bits(afe->regmap, AFE_MEMIF_MSB, afe 1034 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_write(afe->regmap, AFE_CONN_24BIT, 0xffffffff); afe 1035 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_write(afe->regmap, AFE_CONN_24BIT_1, 0xffffffff); afe 1038 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x1); afe 1057 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c static int mt8183_dai_memif_register(struct mtk_base_afe *afe) afe 1061 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 1065 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c list_add(&dai->list, &afe->sub_dais); afe 1089 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c struct mtk_base_afe *afe; afe 1094 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); afe 1095 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (!afe) afe 1097 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c platform_set_drvdata(pdev, afe); afe 1099 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv), afe 1101 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (!afe->platform_priv) afe 1104 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe_priv = afe->platform_priv; afe 1105 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->dev = &pdev->dev; afe 1106 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c dev = afe->dev; afe 1109 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = mt8183_init_clock(afe); afe 1118 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->regmap = syscon_node_to_regmap(dev->parent->of_node); afe 1119 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (IS_ERR(afe->regmap)) { afe 1121 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c return PTR_ERR(afe->regmap); afe 1123 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = regmap_attach_dev(dev, afe->regmap, &mt8183_afe_regmap_config); afe 1133 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = regmap_reinit_cache(afe->regmap, &mt8183_afe_regmap_config); afe 1142 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regcache_cache_only(afe->regmap, true); afe 1143 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c regcache_mark_dirty(afe->regmap); afe 1146 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif_size = MT8183_MEMIF_NUM; afe 1147 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif), afe 1149 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (!afe->memif) afe 1152 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c for (i = 0; i < afe->memif_size; i++) { afe 1153 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif[i].data = &memif_data[i]; afe 1154 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif[i].irq_usage = -1; afe 1157 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif[MT8183_MEMIF_HDMI].irq_usage = MT8183_IRQ_8; afe 1158 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif[MT8183_MEMIF_HDMI].const_irq = 1; afe 1160 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c mutex_init(&afe->irq_alloc_lock); afe 1164 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->irqs_size = MT8183_IRQ_NUM; afe 1165 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs), afe 1167 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c if (!afe->irqs) afe 1170 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c for (i = 0; i < afe->irqs_size; i++) afe 1171 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->irqs[i].irq_data = &irq_data[i]; afe 1180 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); afe 1187 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c INIT_LIST_HEAD(&afe->sub_dais); afe 1190 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = dai_register_cbs[i](afe); afe 1192 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c dev_warn(afe->dev, "dai register i %d fail, ret %d\n", afe 1199 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = mtk_afe_combine_sub_dai(afe); afe 1201 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c dev_warn(afe->dev, "mtk_afe_combine_sub_dai fail, ret %d\n", afe 1206 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->mtk_afe_hardware = &mt8183_afe_hardware; afe 1207 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->memif_fs = mt8183_memif_fs; afe 1208 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->irq_fs = mt8183_irq_fs; afe 1210 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->runtime_resume = mt8183_afe_runtime_resume; afe 1211 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->runtime_suspend = mt8183_afe_runtime_suspend; afe 1222 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c ret = devm_snd_soc_register_component(afe->dev, afe 1224 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->dai_drivers, afe 1225 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c afe->num_dai_drivers); afe 50 sound/soc/mediatek/mt8183/mt8183-dai-adda.c static unsigned int adda_dl_rate_transform(struct mtk_base_afe *afe, afe 77 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dev_warn(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n", afe 83 sound/soc/mediatek/mt8183/mt8183-dai-adda.c static unsigned int adda_ul_rate_transform(struct mtk_base_afe *afe, afe 100 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dev_warn(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n", afe 147 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 148 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 150 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dev_dbg(afe->dev, "%s(), name %s, event 0x%x\n", afe 158 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, AFE_ADDA_MTKAIF_RX_CFG0, afe 162 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, AFE_ADDA_MTKAIF_RX_CFG0, afe 164 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, afe 166 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, afe 170 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, afe 172 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, afe 201 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 202 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 213 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 214 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 222 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dev_info(afe->dev, "%s(), kcontrol name %s, mtkaif_dmic %d\n", afe 301 sound/soc/mediatek/mt8183/mt8183-dai-adda.c static int set_mtkaif_rx(struct mtk_base_afe *afe) afe 303 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 309 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x38); afe 310 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x39); afe 312 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_MTKAIF_CFG0, afe 326 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, afe 331 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, afe 337 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31); afe 338 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_MTKAIF_CFG0, afe 342 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31); afe 343 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_MTKAIF_CFG0, 0x0); afe 356 sound/soc/mediatek/mt8183/mt8183-dai-adda.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 359 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dev_dbg(afe->dev, "%s(), id %d, stream %d, rate %d\n", afe 367 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_PREDIS_CON0, 0); afe 368 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_PREDIS_CON1, 0); afe 371 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dl_src2_con0 = adda_dl_rate_transform(afe, rate) << 28; afe 401 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_DL_SRC2_CON0, dl_src2_con0); afe 402 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_DL_SRC2_CON1, dl_src2_con1); afe 405 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, afe 414 sound/soc/mediatek/mt8183/mt8183-dai-adda.c set_mtkaif_rx(afe); afe 417 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, afe 422 sound/soc/mediatek/mt8183/mt8183-dai-adda.c voice_mode = adda_ul_rate_transform(afe, rate); afe 431 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_02_01, 0x00000000); afe 432 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_04_03, 0x00003FB8); afe 433 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_06_05, 0x3FB80000); afe 434 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_08_07, 0x3FB80000); afe 435 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_10_09, 0x0000C048); afe 437 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_write(afe->regmap, AFE_ADDA_UL_SRC_CON0, ul_src_con0); afe 440 sound/soc/mediatek/mt8183/mt8183-dai-adda.c regmap_update_bits(afe->regmap, afe 489 sound/soc/mediatek/mt8183/mt8183-dai-adda.c int mt8183_dai_adda_register(struct mtk_base_afe *afe) afe 493 sound/soc/mediatek/mt8183/mt8183-dai-adda.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 497 sound/soc/mediatek/mt8183/mt8183-dai-adda.c list_add(&dai->list, &afe->sub_dais); afe 40 sound/soc/mediatek/mt8183/mt8183-dai-hostless.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 42 sound/soc/mediatek/mt8183/mt8183-dai-hostless.c return snd_soc_set_runtime_hwparams(substream, afe->mtk_afe_hardware); afe 101 sound/soc/mediatek/mt8183/mt8183-dai-hostless.c int mt8183_dai_hostless_register(struct mtk_base_afe *afe) afe 105 sound/soc/mediatek/mt8183/mt8183-dai-hostless.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 109 sound/soc/mediatek/mt8183/mt8183-dai-hostless.c list_add(&dai->list, &afe->sub_dais); afe 78 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c static int get_i2s_id_by_name(struct mtk_base_afe *afe, afe 95 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c static struct mtk_afe_i2s_priv *get_i2s_priv_by_name(struct mtk_base_afe *afe, afe 98 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 99 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c int dai_id = get_i2s_id_by_name(afe, name); afe 121 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 124 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name); afe 127 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 140 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 150 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_info(afe->dev, "%s(), kcontrol name %s, hd_en %d\n", afe 153 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name); afe 156 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 276 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 284 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c mt8183_apll1_enable(afe); afe 286 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c mt8183_apll2_enable(afe); afe 290 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c mt8183_apll1_disable(afe); afe 292 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c mt8183_apll2_disable(afe); afe 306 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 312 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, w->name); afe 315 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 321 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c mt8183_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate); afe 325 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c mt8183_mck_disable(afe, i2s_priv->mclk_id); afe 427 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 430 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, sink->name); afe 433 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 440 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c return i2s_priv->share_i2s_id == get_i2s_id_by_name(afe, source->name); afe 448 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 451 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, sink->name); afe 454 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 458 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c if (get_i2s_id_by_name(afe, sink->name) == afe 459 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c get_i2s_id_by_name(afe, source->name)) afe 466 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c if (i2s_priv->share_i2s_id == get_i2s_id_by_name(afe, source->name)) afe 477 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 482 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, w->name); afe 485 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 490 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c cur_apll = mt8183_get_apll_by_name(afe, source->name); afe 493 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_need_apll = mt8183_get_apll_by_rate(afe, i2s_priv->rate); afe 503 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 506 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, sink->name); afe 509 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 513 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c if (get_i2s_id_by_name(afe, sink->name) == afe 514 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c get_i2s_id_by_name(afe, source->name)) afe 521 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c if (i2s_priv->share_i2s_id == get_i2s_id_by_name(afe, source->name)) afe 532 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 536 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = get_i2s_priv_by_name(afe, w->name); afe 539 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 544 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c cur_apll = mt8183_get_apll_by_name(afe, source->name); afe 703 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c static int mtk_dai_i2s_config(struct mtk_base_afe *afe, afe 707 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 711 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c unsigned int rate_reg = mt8183_rate_transform(afe->dev, afe 717 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_info(afe->dev, "%s(), id %d, rate %d, format %d\n", afe 725 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 729 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c regmap_update_bits(afe->regmap, AFE_DAC_CON1, afe 734 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c regmap_update_bits(afe->regmap, AFE_I2S_CON, afe 742 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c regmap_update_bits(afe->regmap, AFE_I2S_CON1, afe 750 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c regmap_update_bits(afe->regmap, AFE_I2S_CON2, afe 757 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c regmap_update_bits(afe->regmap, AFE_I2S_CON3, afe 764 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c regmap_update_bits(afe->regmap, AFE_I2S_CON4, afe 768 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), id %d not support\n", afe 775 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c ret = mtk_dai_i2s_config(afe, params, i2s_priv->share_i2s_id); afe 784 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 786 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c return mtk_dai_i2s_config(afe, params, dai->id); afe 792 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mtk_base_afe *afe = dev_get_drvdata(dai->dev); afe 793 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 799 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__); afe 804 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), dir != SND_SOC_CLOCK_OUT", __func__); afe 808 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_info(afe->dev, "%s(), freq %d\n", __func__, freq); afe 810 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c apll = mt8183_get_apll_by_rate(afe, freq); afe 811 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c apll_rate = mt8183_get_apll_rate(afe, apll); afe 814 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), freq > apll rate", __func__); afe 819 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), APLL cannot generate freq Hz", afe 832 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dev_warn(afe->dev, "%s(), share_i2s_priv == NULL", afe 966 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c static int mt8183_dai_i2s_get_share(struct mtk_base_afe *afe) afe 968 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 969 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c const struct device_node *of_node = afe->dev->of_node; afe 980 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv->share_i2s_id = get_i2s_id_by_name(afe, of_str); afe 986 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c static int mt8183_dai_i2s_set_priv(struct mtk_base_afe *afe) afe 988 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 993 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c i2s_priv = devm_kzalloc(afe->dev, afe 1008 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c int mt8183_dai_i2s_register(struct mtk_base_afe *afe) afe 1013 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 1017 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c list_add(&dai->list, &afe->sub_dais); afe 1030 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c ret = mt8183_dai_i2s_set_priv(afe); afe 1035 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c ret = mt8183_dai_i2s_get_share(afe); afe 185 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 187 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c unsigned int rate_reg = mt8183_rate_transform(afe->dev, rate, dai->id); afe 190 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c dev_dbg(afe->dev, "%s(), id %d, stream %d, rate %d, rate_reg %d, widget active p %d, c %d\n", afe 216 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c regmap_update_bits(afe->regmap, PCM_INTF_CON1, afe 228 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c regmap_update_bits(afe->regmap, PCM2_INTF_CON, afe 232 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c dev_warn(afe->dev, "%s(), id %d not support\n", afe 299 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c int mt8183_dai_pcm_register(struct mtk_base_afe *afe) afe 303 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 307 sound/soc/mediatek/mt8183/mt8183-dai-pcm.c list_add(&dai->list, &afe->sub_dais); afe 251 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 252 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 260 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c mt8183_mck_enable(afe, tdm_priv->bck_id, tdm_priv->bck_rate); afe 263 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c mt8183_mck_disable(afe, tdm_priv->bck_id); afe 277 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 278 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 286 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c mt8183_mck_enable(afe, tdm_priv->mclk_id, tdm_priv->mclk_rate); afe 290 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c mt8183_mck_disable(afe, tdm_priv->mclk_id); afe 335 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); afe 336 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 341 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c cur_apll = mt8183_get_apll_by_name(afe, source->name); afe 436 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c static int mtk_dai_tdm_cal_mclk(struct mtk_base_afe *afe, afe 443 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c apll = mt8183_get_apll_by_rate(afe, freq); afe 444 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c apll_rate = mt8183_get_apll_rate(afe, apll); afe 447 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, afe 453 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, afe 468 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 469 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 483 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c mtk_dai_tdm_cal_mclk(afe, afe 494 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, "%s(), bck_rate > mclk_rate rate", __func__); afe 497 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, "%s(), bck cannot generate", __func__); afe 499 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_info(afe->dev, "%s(), id %d, rate %d, channels %d, format %d, mclk_rate %d, bck_rate %d\n", afe 503 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_info(afe->dev, "%s(), out_channels_per_sdata = %d\n", afe 508 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AUDIO_TOP_CON3, afe 527 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_write(afe->regmap, AFE_TDM_CON1, tdm_con); afe 569 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_write(afe->regmap, AFE_TDM_CON2, tdm_con); afe 571 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, afe 575 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, afe 585 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); afe 591 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, afe 595 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AFE_TDM_CON1, afe 601 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AFE_TDM_CON1, afe 604 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c regmap_update_bits(afe->regmap, AFE_HDMI_OUT_CON0, afe 618 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = dev_get_drvdata(dai->dev); afe 619 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 623 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, "%s(), tdm_priv == NULL", __func__); afe 628 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, "%s(), dir != SND_SOC_CLOCK_OUT", __func__); afe 632 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_info(afe->dev, "%s(), freq %d\n", __func__, freq); afe 634 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c return mtk_dai_tdm_cal_mclk(afe, tdm_priv, freq); afe 639 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mtk_base_afe *afe = dev_get_drvdata(dai->dev); afe 640 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 644 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dev_warn(afe->dev, "%s(), tdm_priv == NULL", __func__); afe 717 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c int mt8183_dai_tdm_register(struct mtk_base_afe *afe) afe 719 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c struct mt8183_afe_private *afe_priv = afe->platform_priv; afe 723 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); afe 727 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c list_add(&dai->list, &afe->sub_dais); afe 737 sound/soc/mediatek/mt8183/mt8183-dai-tdm.c tdm_priv = devm_kzalloc(afe->dev, sizeof(struct mtk_afe_tdm_priv), afe 484 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe; afe 715 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe; afe 719 sound/soc/qcom/qdsp6/q6afe.c afe = port->afe; afe 720 sound/soc/qcom/qdsp6/q6afe.c spin_lock_irqsave(&afe->port_list_lock, flags); afe 722 sound/soc/qcom/qdsp6/q6afe.c spin_unlock_irqrestore(&afe->port_list_lock, flags); afe 727 sound/soc/qcom/qdsp6/q6afe.c static struct q6afe_port *q6afe_find_port(struct q6afe *afe, int token) afe 733 sound/soc/qcom/qdsp6/q6afe.c spin_lock_irqsave(&afe->port_list_lock, flags); afe 734 sound/soc/qcom/qdsp6/q6afe.c list_for_each_entry(p, &afe->port_list, node) afe 741 sound/soc/qcom/qdsp6/q6afe.c spin_unlock_irqrestore(&afe->port_list_lock, flags); afe 747 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe = dev_get_drvdata(&adev->dev); afe 759 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "cmd = 0x%x returned error = 0x%x\n", afe 767 sound/soc/qcom/qdsp6/q6afe.c port = q6afe_find_port(afe, hdr->token); afe 775 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "Unknown cmd 0x%x\n", res->opcode); afe 803 sound/soc/qcom/qdsp6/q6afe.c static int afe_apr_send_pkt(struct q6afe *afe, struct apr_pkt *pkt, afe 810 sound/soc/qcom/qdsp6/q6afe.c mutex_lock(&afe->lock); afe 814 sound/soc/qcom/qdsp6/q6afe.c ret = apr_send_pkt(afe->apr, pkt); afe 816 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "packet not transmitted (%d)\n", ret); afe 826 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "DSP returned error[%x]\n", afe 834 sound/soc/qcom/qdsp6/q6afe.c mutex_unlock(&afe->lock); afe 844 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe = port->afe; afe 878 sound/soc/qcom/qdsp6/q6afe.c ret = afe_apr_send_pkt(afe, pkt, port); afe 880 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE enable for port 0x%x failed %d\n", afe 892 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe = port->afe; afe 927 sound/soc/qcom/qdsp6/q6afe.c ret = afe_apr_send_pkt(afe, pkt, port); afe 929 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE enable for port 0x%x failed %d\n", afe 1024 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe = port->afe; afe 1034 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE port index[%d] invalid!\n", index); afe 1057 sound/soc/qcom/qdsp6/q6afe.c ret = afe_apr_send_pkt(afe, pkt, port); afe 1059 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE close failed %d\n", ret); afe 1158 sound/soc/qcom/qdsp6/q6afe.c struct device *dev = port->afe->dev; afe 1301 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe = port->afe; afe 1312 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE enable for port 0x%x failed %d\n", afe 1322 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE enable for port 0x%x failed %d\n", afe 1347 sound/soc/qcom/qdsp6/q6afe.c ret = afe_apr_send_pkt(afe, pkt, port); afe 1349 sound/soc/qcom/qdsp6/q6afe.c dev_err(afe->dev, "AFE enable for port 0x%x failed %d\n", afe 1369 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe = dev_get_drvdata(dev->parent); afe 1380 sound/soc/qcom/qdsp6/q6afe.c port = q6afe_find_port(afe, id); afe 1437 sound/soc/qcom/qdsp6/q6afe.c port->afe = afe; afe 1441 sound/soc/qcom/qdsp6/q6afe.c spin_lock_irqsave(&afe->port_list_lock, flags); afe 1442 sound/soc/qcom/qdsp6/q6afe.c list_add_tail(&port->node, &afe->port_list); afe 1443 sound/soc/qcom/qdsp6/q6afe.c spin_unlock_irqrestore(&afe->port_list_lock, flags); afe 1463 sound/soc/qcom/qdsp6/q6afe.c struct q6afe *afe; afe 1466 sound/soc/qcom/qdsp6/q6afe.c afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL); afe 1467 sound/soc/qcom/qdsp6/q6afe.c if (!afe) afe 1470 sound/soc/qcom/qdsp6/q6afe.c q6core_get_svc_api_info(adev->svc_id, &afe->ainfo); afe 1471 sound/soc/qcom/qdsp6/q6afe.c afe->apr = adev; afe 1472 sound/soc/qcom/qdsp6/q6afe.c mutex_init(&afe->lock); afe 1473 sound/soc/qcom/qdsp6/q6afe.c afe->dev = dev; afe 1474 sound/soc/qcom/qdsp6/q6afe.c INIT_LIST_HEAD(&afe->port_list); afe 1475 sound/soc/qcom/qdsp6/q6afe.c spin_lock_init(&afe->port_list_lock); afe 1477 sound/soc/qcom/qdsp6/q6afe.c dev_set_drvdata(dev, afe);