Commit 14d90774 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next

parents b199b0fc 166a34d2
...@@ -2300,17 +2300,17 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -2300,17 +2300,17 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai,
case 0: case 0:
break; break;
case 1: case 1:
slot = find_first_bit((unsigned long *)&tx_mask, 32); slot = ffs(tx_mask);
snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot);
snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot);
snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot);
snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot);
break; break;
case 2: case 2:
slot = find_first_bit((unsigned long *)&tx_mask, 32); slot = ffs(tx_mask);
snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot);
snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot);
slot = find_next_bit((unsigned long *)&tx_mask, 32, slot + 1); slot = fls(tx_mask);
snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot);
snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot); snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot);
break; break;
...@@ -2341,18 +2341,18 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -2341,18 +2341,18 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai,
case 0: case 0:
break; break;
case 1: case 1:
slot = find_first_bit((unsigned long *)&rx_mask, 32); slot = ffs(rx_mask);
snd_soc_update_bits(codec, AB8500_ADSLOTSEL(slot), snd_soc_update_bits(codec, AB8500_ADSLOTSEL(slot),
AB8500_MASK_SLOT(slot), AB8500_MASK_SLOT(slot),
AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot)); AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot));
break; break;
case 2: case 2:
slot = find_first_bit((unsigned long *)&rx_mask, 32); slot = ffs(rx_mask);
snd_soc_update_bits(codec, snd_soc_update_bits(codec,
AB8500_ADSLOTSEL(slot), AB8500_ADSLOTSEL(slot),
AB8500_MASK_SLOT(slot), AB8500_MASK_SLOT(slot),
AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot)); AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot));
slot = find_next_bit((unsigned long *)&rx_mask, 32, slot + 1); slot = fls(rx_mask);
snd_soc_update_bits(codec, snd_soc_update_bits(codec,
AB8500_ADSLOTSEL(slot), AB8500_ADSLOTSEL(slot),
AB8500_MASK_SLOT(slot), AB8500_MASK_SLOT(slot),
...@@ -2575,6 +2575,8 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev) ...@@ -2575,6 +2575,8 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev)
/* Create driver private-data struct */ /* Create driver private-data struct */
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata), drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata),
GFP_KERNEL); GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
drvdata->sid_status = SID_UNCONFIGURED; drvdata->sid_status = SID_UNCONFIGURED;
drvdata->anc_status = ANC_UNCONFIGURED; drvdata->anc_status = ANC_UNCONFIGURED;
dev_set_drvdata(&pdev->dev, drvdata); dev_set_drvdata(&pdev->dev, drvdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment