player 1376 sound/soc/sti/uniperif.h int uni_player_resume(struct uniperif *player); player 64 sound/soc/sti/uniperif_player.c struct uniperif *player = dev_id; player 68 sound/soc/sti/uniperif_player.c spin_lock(&player->irq_lock); player 69 sound/soc/sti/uniperif_player.c if (!player->substream) player 72 sound/soc/sti/uniperif_player.c snd_pcm_stream_lock(player->substream); player 73 sound/soc/sti/uniperif_player.c if (player->state == UNIPERIF_STATE_STOPPED) player 77 sound/soc/sti/uniperif_player.c status = GET_UNIPERIF_ITS(player); player 78 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITS_BCLR(player, status); player 81 sound/soc/sti/uniperif_player.c if (unlikely(status & UNIPERIF_ITS_FIFO_ERROR_MASK(player))) { player 82 sound/soc/sti/uniperif_player.c dev_err(player->dev, "FIFO underflow error detected\n"); player 85 sound/soc/sti/uniperif_player.c if (player->underflow_enabled) { player 87 sound/soc/sti/uniperif_player.c player->state = UNIPERIF_STATE_UNDERFLOW; player 91 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BCLR_FIFO_ERROR(player); player 94 sound/soc/sti/uniperif_player.c snd_pcm_stop_xrun(player->substream); player 101 sound/soc/sti/uniperif_player.c if (unlikely(status & UNIPERIF_ITS_DMA_ERROR_MASK(player))) { player 102 sound/soc/sti/uniperif_player.c dev_err(player->dev, "DMA error detected\n"); player 105 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BCLR_DMA_ERROR(player); player 108 sound/soc/sti/uniperif_player.c snd_pcm_stop_xrun(player->substream); player 114 sound/soc/sti/uniperif_player.c if (unlikely(status & UNIPERIF_ITM_UNDERFLOW_REC_DONE_MASK(player))) { player 115 sound/soc/sti/uniperif_player.c if (!player->underflow_enabled) { player 116 sound/soc/sti/uniperif_player.c dev_err(player->dev, player 122 sound/soc/sti/uniperif_player.c tmp = GET_UNIPERIF_STATUS_1_UNDERFLOW_DURATION(player); player 123 sound/soc/sti/uniperif_player.c dev_dbg(player->dev, "Underflow recovered (%d LR clocks max)\n", player 127 sound/soc/sti/uniperif_player.c SET_UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION(player); player 130 sound/soc/sti/uniperif_player.c player->state = UNIPERIF_STATE_STARTED; player 137 sound/soc/sti/uniperif_player.c UNIPERIF_ITM_UNDERFLOW_REC_FAILED_MASK(player))) { player 138 sound/soc/sti/uniperif_player.c dev_err(player->dev, "Underflow recovery failed\n"); player 141 sound/soc/sti/uniperif_player.c snd_pcm_stop_xrun(player->substream); player 147 sound/soc/sti/uniperif_player.c snd_pcm_stream_unlock(player->substream); player 149 sound/soc/sti/uniperif_player.c spin_unlock(&player->irq_lock); player 154 sound/soc/sti/uniperif_player.c static int uni_player_clk_set_rate(struct uniperif *player, unsigned long rate) player 157 sound/soc/sti/uniperif_player.c int adjustment = player->clk_adj; player 190 sound/soc/sti/uniperif_player.c ret = clk_set_rate(player->clk, rate_adjusted); player 194 sound/soc/sti/uniperif_player.c rate_achieved = clk_get_rate(player->clk); player 214 sound/soc/sti/uniperif_player.c player->clk_adj = adjustment; player 218 sound/soc/sti/uniperif_player.c static void uni_player_set_channel_status(struct uniperif *player, player 232 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 236 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 240 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 244 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 248 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 252 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 256 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 260 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 264 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 269 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 278 sound/soc/sti/uniperif_player.c if (player->stream_settings.iec958.status[0] & IEC958_AES0_NONAUDIO) player 279 sound/soc/sti/uniperif_player.c player->stream_settings.encoding_mode = player 282 sound/soc/sti/uniperif_player.c player->stream_settings.encoding_mode = player 285 sound/soc/sti/uniperif_player.c if (player->stream_settings.encoding_mode == player 288 sound/soc/sti/uniperif_player.c SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(player, 0); player 291 sound/soc/sti/uniperif_player.c SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(player, 1); player 296 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[0 + (n * 4)] & 0xf; player 298 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[1 + (n * 4)] << 8; player 300 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[2 + (n * 4)] << 16; player 302 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3 + (n * 4)] << 24; player 303 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CHANNEL_STA_REGN(player, n, status); player 307 sound/soc/sti/uniperif_player.c if (player->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) player 308 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_CHL_STS_UPDATE(player); player 310 sound/soc/sti/uniperif_player.c SET_UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE(player); player 313 sound/soc/sti/uniperif_player.c static int uni_player_prepare_iec958(struct uniperif *player, player 318 sound/soc/sti/uniperif_player.c clk_div = player->mclk / runtime->rate; player 322 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid clk_div %d\n", player 330 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_MEM_FMT_16_16(player); player 332 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NBIT_32(player); player 334 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_DATA_SIZE_16(player); player 338 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_MEM_FMT_16_0(player); player 340 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NBIT_32(player); player 342 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_DATA_SIZE_24(player); player 345 sound/soc/sti/uniperif_player.c dev_err(player->dev, "format not supported\n"); player 350 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_PARITY_CNTR_BY_HW(player); player 353 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR_BY_HW(player); player 356 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_USER_DAT_CNTR_BY_HW(player); player 359 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_BY_HW(player); player 362 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_SPDIF_SW_CTRL_DISABLE(player); player 364 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_ZERO_STUFF_HW(player); player 366 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 368 sound/soc/sti/uniperif_player.c uni_player_set_channel_status(player, runtime); player 369 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 372 sound/soc/sti/uniperif_player.c SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(player, 0); player 375 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_ONE_BIT_AUD_DISABLE(player); player 378 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_REPEAT_CHL_STS_ENABLE(player); player 381 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_SUBFRAME_SEL_SUBF1_SUBF0(player); player 384 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ORDER_MSB(player); player 386 sound/soc/sti/uniperif_player.c if (player->stream_settings.encoding_mode == player 388 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_ON(player); player 390 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_OFF(player); player 392 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NUM_CH(player, runtime->channels / 2); player 395 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_ROUNDING_OFF(player); player 398 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_DIVIDER(player, clk_div / 128); player 401 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_LAT_OFF(player); player 408 sound/soc/sti/uniperif_player.c if (player->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) player 409 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_FMT_OFF(player); player 411 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_FMT_ON(player); player 416 sound/soc/sti/uniperif_player.c static int uni_player_prepare_pcm(struct uniperif *player, player 422 sound/soc/sti/uniperif_player.c if ((player->daifmt & SND_SOC_DAIFMT_FORMAT_MASK) == player 430 sound/soc/sti/uniperif_player.c clk_div = player->mclk / runtime->rate; player 436 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid clk_div\n", __func__); player 441 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid clk_div\n", __func__); player 451 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NBIT_32(player); player 452 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_DATA_SIZE_32(player); player 455 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NBIT_16(player); player 456 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_DATA_SIZE_16(player); player 459 sound/soc/sti/uniperif_player.c dev_err(player->dev, "subframe format not supported\n"); player 467 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_MEM_FMT_16_16(player); player 475 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_MEM_FMT_16_0(player); player 479 sound/soc/sti/uniperif_player.c dev_err(player->dev, "format not supported\n"); player 484 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_ROUNDING_OFF(player); player 487 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_DIVIDER(player, clk_div / (2 * output_frame_size)); player 492 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid nb of channels\n", __func__); player 496 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NUM_CH(player, runtime->channels / 2); player 499 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_ONE_BIT_AUD_DISABLE(player); player 501 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ORDER_MSB(player); player 504 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_FMT_OFF(player); player 509 sound/soc/sti/uniperif_player.c static int uni_player_prepare_tdm(struct uniperif *player, player 520 sound/soc/sti/uniperif_player.c sti_uniperiph_get_unip_tdm_frame_size(player); player 525 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_MEM_FMT_16_0(player); player 526 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_DATA_SIZE_32(player); player 529 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NUM_CH(player, user_frame_size / 4 / 2); player 531 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ORDER_MSB(player); player 532 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ALIGN_LEFT(player); player 535 sound/soc/sti/uniperif_player.c SET_UNIPERIF_TDM_ENABLE_TDM_ENABLE(player); player 538 sound/soc/sti/uniperif_player.c SET_UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT(player, tdm_frame_size); player 541 sound/soc/sti/uniperif_player.c sti_uniperiph_get_tdm_word_pos(player, word_pos); player 542 sound/soc/sti/uniperif_player.c SET_UNIPERIF_TDM_WORD_POS(player, 1_2, word_pos[WORD_1_2]); player 543 sound/soc/sti/uniperif_player.c SET_UNIPERIF_TDM_WORD_POS(player, 3_4, word_pos[WORD_3_4]); player 544 sound/soc/sti/uniperif_player.c SET_UNIPERIF_TDM_WORD_POS(player, 5_6, word_pos[WORD_5_6]); player 545 sound/soc/sti/uniperif_player.c SET_UNIPERIF_TDM_WORD_POS(player, 7_8, word_pos[WORD_7_8]); player 549 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 550 sound/soc/sti/uniperif_player.c ret = uni_player_clk_set_rate(player, freq); player 552 sound/soc/sti/uniperif_player.c player->mclk = freq; player 553 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 575 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 576 sound/soc/sti/uniperif_player.c struct snd_aes_iec958 *iec958 = &player->stream_settings.iec958; player 578 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 583 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 592 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 593 sound/soc/sti/uniperif_player.c struct snd_aes_iec958 *iec958 = &player->stream_settings.iec958; player 596 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 602 sound/soc/sti/uniperif_player.c spin_lock_irqsave(&player->irq_lock, flags); player 603 sound/soc/sti/uniperif_player.c if (player->substream && player->substream->runtime) player 604 sound/soc/sti/uniperif_player.c uni_player_set_channel_status(player, player 605 sound/soc/sti/uniperif_player.c player->substream->runtime); player 607 sound/soc/sti/uniperif_player.c uni_player_set_channel_status(player, NULL); player 609 sound/soc/sti/uniperif_player.c spin_unlock_irqrestore(&player->irq_lock, flags); player 610 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 643 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 645 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 646 sound/soc/sti/uniperif_player.c ucontrol->value.integer.value[0] = player->clk_adj; player 647 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 657 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 664 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 665 sound/soc/sti/uniperif_player.c player->clk_adj = ucontrol->value.integer.value[0]; player 667 sound/soc/sti/uniperif_player.c if (player->mclk) player 668 sound/soc/sti/uniperif_player.c ret = uni_player_clk_set_rate(player, player->mclk); player 669 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 695 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 699 sound/soc/sti/uniperif_player.c spin_lock_irqsave(&player->irq_lock, flags); player 700 sound/soc/sti/uniperif_player.c player->substream = substream; player 701 sound/soc/sti/uniperif_player.c spin_unlock_irqrestore(&player->irq_lock, flags); player 703 sound/soc/sti/uniperif_player.c player->clk_adj = 0; player 705 sound/soc/sti/uniperif_player.c if (!UNIPERIF_TYPE_IS_TDM(player)) player 712 sound/soc/sti/uniperif_player.c player, SNDRV_PCM_HW_PARAM_CHANNELS, player 720 sound/soc/sti/uniperif_player.c player, SNDRV_PCM_HW_PARAM_FORMAT, player 728 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 731 sound/soc/sti/uniperif_player.c if (UNIPERIF_TYPE_IS_TDM(player) || (dir == SND_SOC_CLOCK_IN)) player 737 sound/soc/sti/uniperif_player.c mutex_lock(&player->ctrl_lock); player 738 sound/soc/sti/uniperif_player.c ret = uni_player_clk_set_rate(player, freq); player 740 sound/soc/sti/uniperif_player.c player->mclk = freq; player 741 sound/soc/sti/uniperif_player.c mutex_unlock(&player->ctrl_lock); player 750 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 756 sound/soc/sti/uniperif_player.c if (player->state != UNIPERIF_STATE_STOPPED) { player 757 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid player state %d\n", __func__, player 758 sound/soc/sti/uniperif_player.c player->state); player 763 sound/soc/sti/uniperif_player.c if (player->type == SND_ST_UNIPERIF_TYPE_TDM) { player 772 sound/soc/sti/uniperif_player.c if (player->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) { player 785 sound/soc/sti/uniperif_player.c (trigger_limit > UNIPERIF_CONFIG_DMA_TRIG_LIMIT_MASK(player))) { player 786 sound/soc/sti/uniperif_player.c dev_err(player->dev, "invalid trigger limit %d\n", player 791 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_DMA_TRIG_LIMIT(player, trigger_limit); player 794 sound/soc/sti/uniperif_player.c switch (player->type) { player 796 sound/soc/sti/uniperif_player.c ret = uni_player_prepare_iec958(player, runtime); player 799 sound/soc/sti/uniperif_player.c ret = uni_player_prepare_pcm(player, runtime); player 802 sound/soc/sti/uniperif_player.c ret = uni_player_prepare_iec958(player, runtime); player 805 sound/soc/sti/uniperif_player.c ret = uni_player_prepare_tdm(player, runtime); player 808 sound/soc/sti/uniperif_player.c dev_err(player->dev, "invalid player type\n"); player 815 sound/soc/sti/uniperif_player.c switch (player->daifmt & SND_SOC_DAIFMT_INV_MASK) { player 817 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_LR_POL_LOW(player); player 818 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_SCLK_EDGE_RISING(player); player 821 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_LR_POL_HIG(player); player 822 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_SCLK_EDGE_RISING(player); player 825 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_LR_POL_LOW(player); player 826 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_SCLK_EDGE_FALLING(player); player 829 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_LR_POL_HIG(player); player 830 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_SCLK_EDGE_FALLING(player); player 834 sound/soc/sti/uniperif_player.c switch (player->daifmt & SND_SOC_DAIFMT_FORMAT_MASK) { player 836 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ALIGN_LEFT(player); player 837 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_PADDING_I2S_MODE(player); player 840 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ALIGN_LEFT(player); player 841 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(player); player 844 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_ALIGN_RIGHT(player); player 845 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(player); player 848 sound/soc/sti/uniperif_player.c dev_err(player->dev, "format not supported\n"); player 852 sound/soc/sti/uniperif_player.c SET_UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ(player, 0); player 855 sound/soc/sti/uniperif_player.c return sti_uniperiph_reset(player); player 858 sound/soc/sti/uniperif_player.c static int uni_player_start(struct uniperif *player) player 863 sound/soc/sti/uniperif_player.c if (player->state != UNIPERIF_STATE_STOPPED) { player 864 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid player state\n", __func__); player 868 sound/soc/sti/uniperif_player.c ret = clk_prepare_enable(player->clk); player 870 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: Failed to enable clock\n", __func__); player 875 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITS_BCLR(player, GET_UNIPERIF_ITS(player)); player 878 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BSET_DMA_ERROR(player); player 879 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BSET_FIFO_ERROR(player); player 882 sound/soc/sti/uniperif_player.c if (player->underflow_enabled) { player 883 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE(player); player 884 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED(player); player 887 sound/soc/sti/uniperif_player.c ret = sti_uniperiph_reset(player); player 889 sound/soc/sti/uniperif_player.c clk_disable_unprepare(player->clk); player 900 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_OPERATION_PCM_DATA(player); player 907 sound/soc/sti/uniperif_player.c if (player->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) player 908 sound/soc/sti/uniperif_player.c if (UNIPERIF_TYPE_IS_IEC958(player)) player 909 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_FMT_ON(player); player 912 sound/soc/sti/uniperif_player.c if (player->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) player 913 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_CHL_STS_UPDATE(player); player 915 sound/soc/sti/uniperif_player.c SET_UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE(player); player 918 sound/soc/sti/uniperif_player.c player->state = UNIPERIF_STATE_STARTED; player 923 sound/soc/sti/uniperif_player.c static int uni_player_stop(struct uniperif *player) player 928 sound/soc/sti/uniperif_player.c if (player->state == UNIPERIF_STATE_STOPPED) { player 929 sound/soc/sti/uniperif_player.c dev_err(player->dev, "%s: invalid player state\n", __func__); player 934 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_OPERATION_OFF(player); player 936 sound/soc/sti/uniperif_player.c ret = sti_uniperiph_reset(player); player 941 sound/soc/sti/uniperif_player.c SET_UNIPERIF_ITM_BCLR(player, GET_UNIPERIF_ITM(player)); player 944 sound/soc/sti/uniperif_player.c clk_disable_unprepare(player->clk); player 947 sound/soc/sti/uniperif_player.c player->state = UNIPERIF_STATE_STOPPED; player 952 sound/soc/sti/uniperif_player.c int uni_player_resume(struct uniperif *player) player 957 sound/soc/sti/uniperif_player.c if (player->clk_sel) { player 958 sound/soc/sti/uniperif_player.c ret = regmap_field_write(player->clk_sel, 1); player 960 sound/soc/sti/uniperif_player.c dev_err(player->dev, player 967 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_BACK_STALL_REQ_DISABLE(player); player 968 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_ROUNDING_OFF(player); player 969 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_LAT_OFF(player); player 970 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_IDLE_MOD_DISABLE(player); player 980 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 984 sound/soc/sti/uniperif_player.c return uni_player_start(player); player 986 sound/soc/sti/uniperif_player.c return uni_player_stop(player); player 988 sound/soc/sti/uniperif_player.c return uni_player_resume(player); player 998 sound/soc/sti/uniperif_player.c struct uniperif *player = priv->dai_data.uni; player 1001 sound/soc/sti/uniperif_player.c spin_lock_irqsave(&player->irq_lock, flags); player 1002 sound/soc/sti/uniperif_player.c if (player->state != UNIPERIF_STATE_STOPPED) player 1004 sound/soc/sti/uniperif_player.c uni_player_stop(player); player 1006 sound/soc/sti/uniperif_player.c player->substream = NULL; player 1007 sound/soc/sti/uniperif_player.c spin_unlock_irqrestore(&player->irq_lock, flags); player 1011 sound/soc/sti/uniperif_player.c struct uniperif *player) player 1018 sound/soc/sti/uniperif_player.c 8 + player->id, player 1019 sound/soc/sti/uniperif_player.c 8 + player->id), player 1031 sound/soc/sti/uniperif_player.c player->clk_sel = regmap_field_alloc(regmap, regfield[0]); player 1032 sound/soc/sti/uniperif_player.c player->valid_sel = regmap_field_alloc(regmap, regfield[1]); player 1049 sound/soc/sti/uniperif_player.c struct uniperif *player) player 1053 sound/soc/sti/uniperif_player.c player->dev = &pdev->dev; player 1054 sound/soc/sti/uniperif_player.c player->state = UNIPERIF_STATE_STOPPED; player 1055 sound/soc/sti/uniperif_player.c player->dai_ops = &uni_player_dai_ops; player 1058 sound/soc/sti/uniperif_player.c ret = uni_player_parse_dt_audio_glue(pdev, player); player 1061 sound/soc/sti/uniperif_player.c dev_err(player->dev, "Failed to parse DeviceTree\n"); player 1066 sound/soc/sti/uniperif_player.c if (player->ver >= SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) player 1067 sound/soc/sti/uniperif_player.c player->underflow_enabled = 1; player 1069 sound/soc/sti/uniperif_player.c if (UNIPERIF_TYPE_IS_TDM(player)) player 1070 sound/soc/sti/uniperif_player.c player->hw = &uni_tdm_hw; player 1072 sound/soc/sti/uniperif_player.c player->hw = &uni_player_pcm_hw; player 1075 sound/soc/sti/uniperif_player.c player->clk = of_clk_get(pdev->dev.of_node, 0); player 1076 sound/soc/sti/uniperif_player.c if (IS_ERR(player->clk)) { player 1077 sound/soc/sti/uniperif_player.c dev_err(player->dev, "Failed to get clock\n"); player 1078 sound/soc/sti/uniperif_player.c return PTR_ERR(player->clk); player 1082 sound/soc/sti/uniperif_player.c if (player->clk_sel) { player 1083 sound/soc/sti/uniperif_player.c ret = regmap_field_write(player->clk_sel, 1); player 1085 sound/soc/sti/uniperif_player.c dev_err(player->dev, player 1093 sound/soc/sti/uniperif_player.c if (player->valid_sel && player 1094 sound/soc/sti/uniperif_player.c (player->id == UNIPERIF_PLAYER_I2S_OUT)) { player 1095 sound/soc/sti/uniperif_player.c ret = regmap_field_write(player->valid_sel, player->id); player 1097 sound/soc/sti/uniperif_player.c dev_err(player->dev, player 1103 sound/soc/sti/uniperif_player.c ret = devm_request_irq(&pdev->dev, player->irq, player 1105 sound/soc/sti/uniperif_player.c dev_name(&pdev->dev), player); player 1107 sound/soc/sti/uniperif_player.c dev_err(player->dev, "unable to request IRQ %d\n", player->irq); player 1111 sound/soc/sti/uniperif_player.c mutex_init(&player->ctrl_lock); player 1112 sound/soc/sti/uniperif_player.c spin_lock_init(&player->irq_lock); player 1115 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_BACK_STALL_REQ_DISABLE(player); player 1116 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_ROUNDING_OFF(player); player 1117 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CTRL_SPDIF_LAT_OFF(player); player 1118 sound/soc/sti/uniperif_player.c SET_UNIPERIF_CONFIG_IDLE_MOD_DISABLE(player); player 1120 sound/soc/sti/uniperif_player.c if (UNIPERIF_TYPE_IS_IEC958(player)) { player 1124 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[0] = 0x00; player 1126 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[1] = player 1129 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[2] = player 1132 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[3] = player 1135 sound/soc/sti/uniperif_player.c player->stream_settings.iec958.status[4] = player 1139 sound/soc/sti/uniperif_player.c player->num_ctrls = ARRAY_SIZE(snd_sti_iec_ctl); player 1140 sound/soc/sti/uniperif_player.c player->snd_ctrls = snd_sti_iec_ctl[0]; player 1142 sound/soc/sti/uniperif_player.c player->num_ctrls = ARRAY_SIZE(snd_sti_pcm_ctl); player 1143 sound/soc/sti/uniperif_player.c player->snd_ctrls = snd_sti_pcm_ctl[0];