Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 702132 Details for
Bug 783462
sys-kernel/gentoo-sources Regression with MCP61 High Definition Audio (driver snd_hda_intel)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Workaround
Workaround1.patch (text/plain), 2.84 KB, created by
Sébastien P.
on 2021-04-24 09:43:15 UTC
(
hide
)
Description:
Workaround
Filename:
MIME Type:
Creator:
Sébastien P.
Created:
2021-04-24 09:43:15 UTC
Size:
2.84 KB
patch
obsolete
>diff --git a/sound/hda/hdac_bus.c b/sound/hda/hdac_bus.c >index 9766f6af8743..44d1e309a8b6 100644 >--- a/sound/hda/hdac_bus.c >+++ b/sound/hda/hdac_bus.c >@@ -44,7 +44,6 @@ int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, > mutex_init(&bus->cmd_mutex); > mutex_init(&bus->lock); > INIT_LIST_HEAD(&bus->hlink_list); >- init_waitqueue_head(&bus->rirb_wq); > bus->irq = -1; > > /* >diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c >index b98449fd92f3..abdc0bb1b462 100644 >--- a/sound/hda/hdac_controller.c >+++ b/sound/hda/hdac_controller.c >@@ -218,9 +218,6 @@ void snd_hdac_bus_update_rirb(struct hdac_bus *bus) > else if (bus->rirb.cmds[addr]) { > bus->rirb.res[addr] = res; > bus->rirb.cmds[addr]--; >- if (!bus->rirb.cmds[addr] && >- waitqueue_active(&bus->rirb_wq)) >- wake_up(&bus->rirb_wq); > } else { > dev_err_ratelimited(bus->dev, > "spurious response %#x:%#x, last cmd=%#08x\n", >diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c >index b972d59eb1ec..0b621bd5b5ab 100644 >--- a/sound/pci/hda/hda_controller.c >+++ b/sound/pci/hda/hda_controller.c >@@ -777,9 +777,46 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr, > { > struct azx *chip = bus_to_azx(bus); > struct hda_bus *hbus = &chip->bus; >+ unsigned long timeout; >+ unsigned long loopcounter; >+ int do_poll = 0; >+ bool warned = false; > int err; > > again: >+ timeout = jiffies + msecs_to_jiffies(1000); >+ >+ for (loopcounter = 0;; loopcounter++) { >+ spin_lock_irq(&bus->reg_lock); >+ if (bus->polling_mode || do_poll) >+ snd_hdac_bus_update_rirb(bus); >+ if (!bus->rirb.cmds[addr]) { >+ if (!do_poll) >+ bus->poll_count = 0; >+ if (res) >+ *res = bus->rirb.res[addr]; /* the last value */ >+ spin_unlock_irq(&bus->reg_lock); >+ return 0; >+ } >+ spin_unlock_irq(&bus->reg_lock); >+ if (time_after(jiffies, timeout)) >+ break; >+#define LOOP_COUNT_MAX 3000 >+ if (hbus->core.needs_damn_long_delay || >+ loopcounter > LOOP_COUNT_MAX) { >+ if (loopcounter > LOOP_COUNT_MAX && !warned) { >+ dev_dbg_ratelimited(chip->card->dev, >+ "too slow response, last cmd=%#08x\n", >+ bus->last_cmd[addr]); >+ warned = true; >+ } >+ msleep(2); /* temporary workaround */ >+ } else { >+ udelay(10); >+ cond_resched(); >+ } >+ } >+ > err = snd_hdac_bus_get_response(bus, addr, res); > if (!err) > return 0; >@@ -787,6 +824,16 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr, > if (hbus->no_response_fallback) > return -EIO; > >+ if (!bus->polling_mode && bus->poll_count < 2) { >+ dev_dbg(chip->card->dev, >+ "azx_get_response timeout, polling the codec once: last cmd=0x%08x\n", >+ bus->last_cmd[addr]); >+ do_poll = 1; >+ bus->poll_count++; >+ goto again; >+ } >+ >+ > if (!bus->polling_mode) { > dev_warn(chip->card->dev, > "azx_get_response timeout, switching to polling mode: last cmd=0x%08x\n",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 783462
:
700908
|
702111
| 702132