Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes a problem with clock settings of HiFiBerry DAC+ADC PRO #3545

Merged
merged 2 commits into from
Apr 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion sound/soc/bcm/hifiberry_dacplusadcpro.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,11 @@ static int snd_rpi_hifiberry_dacplusadcpro_hw_params(
int channels = params_channels(params);
int width = 32;
struct snd_soc_component *dac = rtd->codec_dais[0]->component;
struct snd_soc_dai *dai = rtd->codec_dais[0];
struct snd_soc_dai_driver *drv = dai->driver;
const struct snd_soc_dai_ops *ops = drv->ops;

if (snd_rpi_hifiberry_is_dacpro) {

width = snd_pcm_format_physical_width(params_format(params));

snd_rpi_hifiberry_dacplusadcpro_set_sclk(dac,
Expand All @@ -414,6 +416,13 @@ static int snd_rpi_hifiberry_dacplusadcpro_hw_params(
return ret;
ret = snd_soc_dai_set_tdm_slot(rtd->codec_dais[1], 0x03, 0x03,
channels, width);
if (ret)
return ret;

if (snd_rpi_hifiberry_is_dacpro) {
pelwell marked this conversation as resolved.
Show resolved Hide resolved
if (ops->hw_params)
ret = ops->hw_params(substream, params, dai);
}
return ret;
}

Expand Down