Unverified Commit 9f1c8677 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: hdmi-codec: Update to modern DAI terminology



As part of retiring the old defines used to specify DAI formats update the
hdmi_codec driver to use the modern names, including the variables in the
struct hdmi_codec_daifmt exported to the DRM drivers.

In updating this I did note that the only use of this information in DRM
drivers is to reject clock provider settings, thinking about what this
hardware is doing I rather suspect that there might not be any hardware
out there which needs the configuration so it may be worth considering
just having hdmi-codec support only clock consumer.

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602103029.3498791-1-broonie@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 55e1c007
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -549,8 +549,9 @@ static int sii902x_audio_hw_params(struct device *dev, void *data,
	unsigned long mclk_rate;
	int i, ret;

	if (daifmt->bit_clk_master || daifmt->frame_clk_master) {
		dev_dbg(dev, "%s: I2S master mode not supported\n", __func__);
	if (daifmt->bit_clk_provider || daifmt->frame_clk_provider) {
		dev_dbg(dev, "%s: I2S clock provider mode not supported\n",
			__func__);
		return -EINVAL;
	}

+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data,
	u8 inputclkfs = 0;

	/* it cares I2S only */
	if (fmt->bit_clk_master | fmt->frame_clk_master) {
	if (fmt->bit_clk_provider | fmt->frame_clk_provider) {
		dev_err(dev, "unsupported clock settings\n");
		return -EINVAL;
	}
+4 −4
Original line number Diff line number Diff line
@@ -1594,12 +1594,12 @@ static int hdmi_audio_hw_params(struct device *dev, void *data,
	struct hdmi_context *hdata = dev_get_drvdata(dev);

	if (daifmt->fmt != HDMI_I2S || daifmt->bit_clk_inv ||
	    daifmt->frame_clk_inv || daifmt->bit_clk_master ||
	    daifmt->frame_clk_master) {
	    daifmt->frame_clk_inv || daifmt->bit_clk_provider ||
	    daifmt->frame_clk_provider) {
		dev_err(dev, "%s: Bad flags %d %d %d %d\n", __func__,
			daifmt->bit_clk_inv, daifmt->frame_clk_inv,
			daifmt->bit_clk_master,
			daifmt->frame_clk_master);
			daifmt->bit_clk_provider,
			daifmt->frame_clk_provider);
		return -EINVAL;
	}

+3 −3
Original line number Diff line number Diff line
@@ -1095,11 +1095,11 @@ static int tda998x_audio_hw_params(struct device *dev, void *data,

	if (!spdif &&
	    (daifmt->bit_clk_inv || daifmt->frame_clk_inv ||
	     daifmt->bit_clk_master || daifmt->frame_clk_master)) {
	     daifmt->bit_clk_provider || daifmt->frame_clk_provider)) {
		dev_err(dev, "%s: Bad flags %d %d %d %d\n", __func__,
			daifmt->bit_clk_inv, daifmt->frame_clk_inv,
			daifmt->bit_clk_master,
			daifmt->frame_clk_master);
			daifmt->bit_clk_provider,
			daifmt->frame_clk_provider);
		return -EINVAL;
	}

+4 −4
Original line number Diff line number Diff line
@@ -1175,12 +1175,12 @@ static int hdmi_audio_hw_params(struct device *dev,
	DRM_DEBUG_DRIVER("\n");

	if ((daifmt->fmt != HDMI_I2S) || daifmt->bit_clk_inv ||
	    daifmt->frame_clk_inv || daifmt->bit_clk_master ||
	    daifmt->frame_clk_master) {
	    daifmt->frame_clk_inv || daifmt->bit_clk_provider ||
	    daifmt->frame_clk_provider) {
		dev_err(dev, "%s: Bad flags %d %d %d %d\n", __func__,
			daifmt->bit_clk_inv, daifmt->frame_clk_inv,
			daifmt->bit_clk_master,
			daifmt->frame_clk_master);
			daifmt->bit_clk_provider,
			daifmt->frame_clk_provider);
		return -EINVAL;
	}

Loading