cs4271.c (4aef2ec9022b217f74d0f4c9b84081f07cc223d9) | cs4271.c (5e518eddd11e8f71aaffc954dc7ee9572fc59808) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * CS4271 ASoC codec driver 4 * 5 * Copyright (c) 2010 Alexander Sverdlin <subaparts@yandex.ru> 6 * 7 * This driver support CS4271 codec being master or slave, working 8 * in control port mode, connected either via SPI or I2C. --- 342 unchanged lines hidden (view full) --- 351 * currently streaming data. This way of bringing the codec in 352 * sync to the current clocks is not explicitly documented in 353 * the data sheet, but it seems to work fine, and in contrast 354 * to a read hardware reset, we don't have to sync back all 355 * registers every time. 356 */ 357 358 if ((substream->stream == SNDRV_PCM_STREAM_PLAYBACK && | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * CS4271 ASoC codec driver 4 * 5 * Copyright (c) 2010 Alexander Sverdlin <subaparts@yandex.ru> 6 * 7 * This driver support CS4271 codec being master or slave, working 8 * in control port mode, connected either via SPI or I2C. --- 342 unchanged lines hidden (view full) --- 351 * currently streaming data. This way of bringing the codec in 352 * sync to the current clocks is not explicitly documented in 353 * the data sheet, but it seems to work fine, and in contrast 354 * to a read hardware reset, we don't have to sync back all 355 * registers every time. 356 */ 357 358 if ((substream->stream == SNDRV_PCM_STREAM_PLAYBACK && |
359 !dai->stream_active[SNDRV_PCM_STREAM_CAPTURE]) || | 359 !snd_soc_dai_stream_active(dai, SNDRV_PCM_STREAM_CAPTURE)) || |
360 (substream->stream == SNDRV_PCM_STREAM_CAPTURE && | 360 (substream->stream == SNDRV_PCM_STREAM_CAPTURE && |
361 !dai->stream_active[SNDRV_PCM_STREAM_PLAYBACK])) { | 361 !snd_soc_dai_stream_active(dai, SNDRV_PCM_STREAM_PLAYBACK))) { |
362 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, 363 CS4271_MODE2_PDN, 364 CS4271_MODE2_PDN); 365 if (ret < 0) 366 return ret; 367 368 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, 369 CS4271_MODE2_PDN, 0); --- 352 unchanged lines hidden --- | 362 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, 363 CS4271_MODE2_PDN, 364 CS4271_MODE2_PDN); 365 if (ret < 0) 366 return ret; 367 368 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, 369 CS4271_MODE2_PDN, 0); --- 352 unchanged lines hidden --- |