diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2019-09-16 14:23:48 -0500 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-10-21 09:50:53 +0530 |
commit | 1b53385e7938d5a093e92044f9c89e4e76106f1b (patch) | |
tree | 3cd0740535d255b39e95a4cb7b5fd046ae5652df /drivers/soundwire/intel.c | |
parent | 807c15bc77871c695e254423f5e3839b2175db03 (diff) | |
download | lwn-1b53385e7938d5a093e92044f9c89e4e76106f1b.tar.gz lwn-1b53385e7938d5a093e92044f9c89e4e76106f1b.zip |
soundwire: cadence_master: improve PDI allocation
PDI number should match dai->id, there is no need to track if a PDI is
allocated or not.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190916192348.467-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/intel.c')
-rw-r--r-- | drivers/soundwire/intel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index f25695e95190..acdec12d748d 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -631,11 +631,10 @@ static int intel_hw_params(struct snd_pcm_substream *substream, if (dma->stream_type == SDW_STREAM_PDM) pcm = false; - /* FIXME: We would need to get PDI info from topology */ if (pcm) - pdi = sdw_cdns_alloc_pdi(cdns, &cdns->pcm, ch, dir); + pdi = sdw_cdns_alloc_pdi(cdns, &cdns->pcm, ch, dir, dai->id); else - pdi = sdw_cdns_alloc_pdi(cdns, &cdns->pdm, ch, dir); + pdi = sdw_cdns_alloc_pdi(cdns, &cdns->pdm, ch, dir, dai->id); if (!pdi) { ret = -EINVAL; |