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

Commit f09d4f26 authored by Jeeja KP's avatar Jeeja KP Committed by Takashi Iwai
Browse files

ALSA: hdac: Remove the usage of key for host stream



hdac_ext_stream assign doesn't require key mapping as in case of
hdac_stream. So for host stream, the key to device mapping needs
to be removed.

Signed-off-by: default avatarJeeja KP <jeeja.kp@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ee8bc4df
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -291,17 +291,12 @@ hdac_ext_host_stream_assign(struct hdac_ext_bus *ebus,
	struct hdac_ext_stream *res = NULL;
	struct hdac_stream *stream = NULL;
	struct hdac_bus *hbus = &ebus->bus;
	int key;

	if (!ebus->ppcap) {
		dev_err(hbus->dev, "stream type not supported\n");
		return NULL;
	}

	/* make a non-zero unique key for the substream */
	key = (substream->pcm->device << 16) | (substream->number << 2) |
			(substream->stream + 1);

	list_for_each_entry(stream, &hbus->stream_list, list) {
		struct hdac_ext_stream *hstream = container_of(stream,
						struct hdac_ext_stream,
@@ -320,7 +315,6 @@ hdac_ext_host_stream_assign(struct hdac_ext_bus *ebus,
		spin_lock_irq(&hbus->reg_lock);
		res->hstream.opened = 1;
		res->hstream.running = 0;
		res->hstream.assigned_key = key;
		res->hstream.substream = substream;
		spin_unlock_irq(&hbus->reg_lock);
	}