From: Anssi Hannula <anssi.hannula@iki.fi>
To: Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Alex Deucher <alexander.deucher@amd.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda - Do not assign streams in reverse order
Date: Mon, 07 Apr 2014 23:39:03 +0300 [thread overview]
Message-ID: <53430CE7.9060009@iki.fi> (raw)
In-Reply-To: <1396899398-1293-1-git-send-email-anssi.hannula@iki.fi>
Anssi Hannula wrote:
> Currently stream numbers are assigned in reverse order.
>
> Unfortunately commit 7546abfb8e1f9933b5 ("ALSA: hda - Increment
> default stream numbers for AMD HDMI controllers") assumed this was not
> the case (specifically, it had the "old cards had single device only"
> => "extra unused stream numbers do not matter" assumption), causing
> non-working audio regressions for AMD Radeon HDMI users on v3.14.
>
> Change the stream numbers to be assigned in increasing order instead.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77002
> Reported-by: Christian Güdel <cg@dmesg.ch>
> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
> Tested-by: Christian Güdel <cg@dmesg.ch>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: <stable@vger.kernel.org> # 3.14
> ---
>
> Takashi, please check I didn't miss anything (I'm not that familiar
> with this low-level HDA code). :)
Alex wrote in the above bugreport now that the stream counts are:
Kaveri: 4 streams, 7 endpoints
Kabini: 2 streams, 3 endpoints
Bonaire/Hawaii: 6 streams, 7 endpoints
Trinity/Richland: 4 streams, 6 endpoints
Oland: 2 streams, 2 endpoints
Tahiti/Pitcairn/Verde: 6 streams, 6 endpoints
So we have cards with less streams than converters, if I understood
correctly.
I'd think my patch is still reasonable even if we'll have to fix the
stream counts anyway, the pros and cons I see are:
+ safer in case we/manufacturer get the stream count wrong for some card
- easily hides too high stream count
But your call :)
> sound/pci/hda/hda_intel.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index e354ab1ec20f..7a7b7b10dddf 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -1856,13 +1856,14 @@ azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream)
> struct azx_dev *azx_dev = &chip->azx_dev[dev];
> dsp_lock(azx_dev);
> if (!azx_dev->opened && !dsp_is_locked(azx_dev)) {
> - res = azx_dev;
> - if (res->assigned_key == key) {
> - res->opened = 1;
> - res->assigned_key = key;
> + if (azx_dev->assigned_key == key) {
> + azx_dev->opened = 1;
> + azx_dev->assigned_key = key;
> dsp_unlock(azx_dev);
> return azx_dev;
> }
> + if (!res)
> + res = azx_dev;
> }
> dsp_unlock(azx_dev);
> }
> --
> 1.8.4.5
--
Anssi Hannula
next prev parent reply other threads:[~2014-04-07 20:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 19:36 [PATCH] ALSA: hda - Do not assign streams in reverse order Anssi Hannula
2014-04-07 20:39 ` Anssi Hannula [this message]
2014-04-08 7:35 ` Takashi Iwai
2014-04-08 7:50 ` Anssi Hannula
2014-04-08 7:59 ` Takashi Iwai
2014-04-08 9:36 ` Anssi Hannula
2014-04-08 9:47 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53430CE7.9060009@iki.fi \
--to=anssi.hannula@iki.fi \
--cc=alexander.deucher@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.