Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8a075ab authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/fix/fsl-ssi', 'asoc/fix/intel',...

Merge remote-tracking branches 'asoc/fix/fsl-ssi', 'asoc/fix/intel', 'asoc/fix/intel-kconfig' and 'asoc/fix/mediatek' into asoc-linus
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -3,11 +3,13 @@ MT8173 with MAX98090 CODEC
Required properties:
Required properties:
- compatible : "mediatek,mt8173-max98090"
- compatible : "mediatek,mt8173-max98090"
- mediatek,audio-codec: the phandle of the MAX98090 audio codec
- mediatek,audio-codec: the phandle of the MAX98090 audio codec
- mediatek,platform: the phandle of MT8173 ASoC platform


Example:
Example:


	sound {
	sound {
		compatible = "mediatek,mt8173-max98090";
		compatible = "mediatek,mt8173-max98090";
		mediatek,audio-codec = <&max98090>;
		mediatek,audio-codec = <&max98090>;
		mediatek,platform = <&afe>;
	};
	};
+2 −0
Original line number Original line Diff line number Diff line
@@ -3,11 +3,13 @@ MT8173 with RT5650 RT5676 CODECS
Required properties:
Required properties:
- compatible : "mediatek,mt8173-rt5650-rt5676"
- compatible : "mediatek,mt8173-rt5650-rt5676"
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
- mediatek,platform: the phandle of MT8173 ASoC platform


Example:
Example:


	sound {
	sound {
		compatible = "mediatek,mt8173-rt5650-rt5676";
		compatible = "mediatek,mt8173-rt5650-rt5676";
		mediatek,audio-codec = <&rt5650 &rt5676>;
		mediatek,audio-codec = <&rt5650 &rt5676>;
		mediatek,platform = <&afe>;
	};
	};
+1 −1
Original line number Original line Diff line number Diff line
@@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
		sub *= 100000;
		sub *= 100000;
		do_div(sub, freq);
		do_div(sub, freq);


		if (sub < savesub) {
		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
			baudrate = tmprate;
			baudrate = tmprate;
			savesub = sub;
			savesub = sub;
			pm = i;
			pm = i;
+1 −1
Original line number Original line Diff line number Diff line
@@ -7,4 +7,4 @@ obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
obj-$(CONFIG_SND_SST_MFLD_PLATFORM) += atom/
obj-$(CONFIG_SND_SST_MFLD_PLATFORM) += atom/


# Machine support
# Machine support
obj-$(CONFIG_SND_SOC_INTEL_SST) += boards/
obj-$(CONFIG_SND_SOC) += boards/
+7 −7
Original line number Original line Diff line number Diff line
@@ -42,6 +42,11 @@
#define MIN_FRAGMENT_SIZE (50 * 1024)
#define MIN_FRAGMENT_SIZE (50 * 1024)
#define MAX_FRAGMENT_SIZE (1024 * 1024)
#define MAX_FRAGMENT_SIZE (1024 * 1024)
#define SST_GET_BYTES_PER_SAMPLE(pcm_wd_sz)  (((pcm_wd_sz + 15) >> 4) << 1)
#define SST_GET_BYTES_PER_SAMPLE(pcm_wd_sz)  (((pcm_wd_sz + 15) >> 4) << 1)
#ifdef CONFIG_PM
#define GET_USAGE_COUNT(dev) (atomic_read(&dev->power.usage_count))
#else
#define GET_USAGE_COUNT(dev) 1
#endif


int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id)
int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id)
{
{
@@ -141,15 +146,9 @@ static int sst_power_control(struct device *dev, bool state)
	int ret = 0;
	int ret = 0;
	int usage_count = 0;
	int usage_count = 0;


#ifdef CONFIG_PM
	usage_count = atomic_read(&dev->power.usage_count);
#else
	usage_count = 1;
#endif

	if (state == true) {
	if (state == true) {
		ret = pm_runtime_get_sync(dev);
		ret = pm_runtime_get_sync(dev);

		usage_count = GET_USAGE_COUNT(dev);
		dev_dbg(ctx->dev, "Enable: pm usage count: %d\n", usage_count);
		dev_dbg(ctx->dev, "Enable: pm usage count: %d\n", usage_count);
		if (ret < 0) {
		if (ret < 0) {
			dev_err(ctx->dev, "Runtime get failed with err: %d\n", ret);
			dev_err(ctx->dev, "Runtime get failed with err: %d\n", ret);
@@ -164,6 +163,7 @@ static int sst_power_control(struct device *dev, bool state)
			}
			}
		}
		}
	} else {
	} else {
		usage_count = GET_USAGE_COUNT(dev);
		dev_dbg(ctx->dev, "Disable: pm usage count: %d\n", usage_count);
		dev_dbg(ctx->dev, "Disable: pm usage count: %d\n", usage_count);
		return sst_pm_runtime_put(ctx);
		return sst_pm_runtime_put(ctx);
	}
	}
Loading