Loading sound/soc/codecs/da7213.c +4 −1 Original line number Diff line number Diff line Loading @@ -1305,7 +1305,10 @@ static int da7213_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) /* By default only 64 BCLK per WCLK is supported */ dai_clk_mode |= DA7213_DAI_BCLKS_PER_WCLK_64; snd_soc_component_write(component, DA7213_DAI_CLK_MODE, dai_clk_mode); snd_soc_component_update_bits(component, DA7213_DAI_CLK_MODE, DA7213_DAI_BCLKS_PER_WCLK_MASK | DA7213_DAI_CLK_POL_MASK | DA7213_DAI_WCLK_POL_MASK, dai_clk_mode); snd_soc_component_update_bits(component, DA7213_DAI_CTRL, DA7213_DAI_FORMAT_MASK, dai_ctrl); snd_soc_component_write(component, DA7213_DAI_OFFSET, dai_offset); Loading sound/soc/codecs/da7213.h +2 −0 Original line number Diff line number Diff line Loading @@ -181,7 +181,9 @@ #define DA7213_DAI_BCLKS_PER_WCLK_256 (0x3 << 0) #define DA7213_DAI_BCLKS_PER_WCLK_MASK (0x3 << 0) #define DA7213_DAI_CLK_POL_INV (0x1 << 2) #define DA7213_DAI_CLK_POL_MASK (0x1 << 2) #define DA7213_DAI_WCLK_POL_INV (0x1 << 3) #define DA7213_DAI_WCLK_POL_MASK (0x1 << 3) #define DA7213_DAI_CLK_EN_MASK (0x1 << 7) /* DA7213_DAI_CTRL = 0x29 */ Loading sound/soc/codecs/da7219.c +8 −2 Original line number Diff line number Diff line Loading @@ -1583,20 +1583,26 @@ static const struct snd_soc_dai_ops da7219_dai_ops = { #define DA7219_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) #define DA7219_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |\ SNDRV_PCM_RATE_96000) static struct snd_soc_dai_driver da7219_dai = { .name = "da7219-hifi", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = DA7219_DAI_CH_NUM_MAX, .rates = SNDRV_PCM_RATE_8000_96000, .rates = DA7219_RATES, .formats = DA7219_FORMATS, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = DA7219_DAI_CH_NUM_MAX, .rates = SNDRV_PCM_RATE_8000_96000, .rates = DA7219_RATES, .formats = DA7219_FORMATS, }, .ops = &da7219_dai_ops, Loading sound/soc/codecs/hdac_hdmi.c +11 −0 Original line number Diff line number Diff line Loading @@ -1854,6 +1854,17 @@ static int hdmi_codec_probe(struct snd_soc_component *component) /* Imp: Store the card pointer in hda_codec */ hdmi->card = dapm->card->snd_card; /* * Setup a device_link between card device and HDMI codec device. * The card device is the consumer and the HDMI codec device is * the supplier. With this setting, we can make sure that the audio * domain in display power will be always turned on before operating * on the HDMI audio codec registers. * Let's use the flag DL_FLAG_AUTOREMOVE_CONSUMER. This can make * sure the device link is freed when the machine driver is removed. */ device_link_add(component->card->dev, &hdev->dev, DL_FLAG_RPM_ACTIVE | DL_FLAG_AUTOREMOVE_CONSUMER); /* * hdac_device core already sets the state to active and calls * get_noresume. So enable runtime and set the device to suspend. Loading sound/soc/codecs/hdmi-codec.c +5 −1 Original line number Diff line number Diff line Loading @@ -439,9 +439,13 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream, if (!ret) { ret = snd_pcm_hw_constraint_eld(substream->runtime, hcp->eld); if (ret) if (ret) { mutex_lock(&hcp->current_stream_lock); hcp->current_stream = NULL; mutex_unlock(&hcp->current_stream_lock); return ret; } } /* Select chmap supported */ hdmi_codec_eld_chmap(hcp); } Loading Loading
sound/soc/codecs/da7213.c +4 −1 Original line number Diff line number Diff line Loading @@ -1305,7 +1305,10 @@ static int da7213_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) /* By default only 64 BCLK per WCLK is supported */ dai_clk_mode |= DA7213_DAI_BCLKS_PER_WCLK_64; snd_soc_component_write(component, DA7213_DAI_CLK_MODE, dai_clk_mode); snd_soc_component_update_bits(component, DA7213_DAI_CLK_MODE, DA7213_DAI_BCLKS_PER_WCLK_MASK | DA7213_DAI_CLK_POL_MASK | DA7213_DAI_WCLK_POL_MASK, dai_clk_mode); snd_soc_component_update_bits(component, DA7213_DAI_CTRL, DA7213_DAI_FORMAT_MASK, dai_ctrl); snd_soc_component_write(component, DA7213_DAI_OFFSET, dai_offset); Loading
sound/soc/codecs/da7213.h +2 −0 Original line number Diff line number Diff line Loading @@ -181,7 +181,9 @@ #define DA7213_DAI_BCLKS_PER_WCLK_256 (0x3 << 0) #define DA7213_DAI_BCLKS_PER_WCLK_MASK (0x3 << 0) #define DA7213_DAI_CLK_POL_INV (0x1 << 2) #define DA7213_DAI_CLK_POL_MASK (0x1 << 2) #define DA7213_DAI_WCLK_POL_INV (0x1 << 3) #define DA7213_DAI_WCLK_POL_MASK (0x1 << 3) #define DA7213_DAI_CLK_EN_MASK (0x1 << 7) /* DA7213_DAI_CTRL = 0x29 */ Loading
sound/soc/codecs/da7219.c +8 −2 Original line number Diff line number Diff line Loading @@ -1583,20 +1583,26 @@ static const struct snd_soc_dai_ops da7219_dai_ops = { #define DA7219_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) #define DA7219_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |\ SNDRV_PCM_RATE_96000) static struct snd_soc_dai_driver da7219_dai = { .name = "da7219-hifi", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = DA7219_DAI_CH_NUM_MAX, .rates = SNDRV_PCM_RATE_8000_96000, .rates = DA7219_RATES, .formats = DA7219_FORMATS, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = DA7219_DAI_CH_NUM_MAX, .rates = SNDRV_PCM_RATE_8000_96000, .rates = DA7219_RATES, .formats = DA7219_FORMATS, }, .ops = &da7219_dai_ops, Loading
sound/soc/codecs/hdac_hdmi.c +11 −0 Original line number Diff line number Diff line Loading @@ -1854,6 +1854,17 @@ static int hdmi_codec_probe(struct snd_soc_component *component) /* Imp: Store the card pointer in hda_codec */ hdmi->card = dapm->card->snd_card; /* * Setup a device_link between card device and HDMI codec device. * The card device is the consumer and the HDMI codec device is * the supplier. With this setting, we can make sure that the audio * domain in display power will be always turned on before operating * on the HDMI audio codec registers. * Let's use the flag DL_FLAG_AUTOREMOVE_CONSUMER. This can make * sure the device link is freed when the machine driver is removed. */ device_link_add(component->card->dev, &hdev->dev, DL_FLAG_RPM_ACTIVE | DL_FLAG_AUTOREMOVE_CONSUMER); /* * hdac_device core already sets the state to active and calls * get_noresume. So enable runtime and set the device to suspend. Loading
sound/soc/codecs/hdmi-codec.c +5 −1 Original line number Diff line number Diff line Loading @@ -439,9 +439,13 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream, if (!ret) { ret = snd_pcm_hw_constraint_eld(substream->runtime, hcp->eld); if (ret) if (ret) { mutex_lock(&hcp->current_stream_lock); hcp->current_stream = NULL; mutex_unlock(&hcp->current_stream_lock); return ret; } } /* Select chmap supported */ hdmi_codec_eld_chmap(hcp); } Loading