mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ASoC: rockchip: i2s: Add property 'bclk-fs'
This patch bring back property 'rockchip,bclk-fs' to allow user to set it from DT, though we can set it from machine driver or by 'BCLK_Ratio' control. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Change-Id: Id50833a8899782ac4aac34e146a424b9f6da590d
This commit is contained in:
@@ -1024,7 +1024,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
struct snd_soc_dai_driver *dai;
|
||||
struct resource *res;
|
||||
void __iomem *regs;
|
||||
int ret, i;
|
||||
int ret, i, val;
|
||||
|
||||
i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL);
|
||||
if (!i2s)
|
||||
@@ -1059,6 +1059,10 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
i2s->bclk_ratio = 64;
|
||||
if (!device_property_read_u32(&pdev->dev, "rockchip,bclk-fs", &val)) {
|
||||
if ((val >= 32) && (val % 2 == 0))
|
||||
i2s->bclk_ratio = val;
|
||||
}
|
||||
|
||||
dev_set_drvdata(&pdev->dev, i2s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user