[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-27 Thread Mike Pozulp
@John Hoff

> Namely, I followed the same procedure as before with the headphone
patch, but right before I made the new custom kernel I just added the
new candidate CORB values to the new patch_realtek.c file in my new
custom header... so basically just modified the samsung headphone very
quiet fixup (partial sample below).

Looks good to me.

> I guess I can try again with the full halt and restart process as
listed in the openbsd article...

Good idea.

No one promised us that this would work. However, we gave it a try,
which is what Jaroslav asked us to do way back in May (see bugzilla
comment 14 [1]). Can you post your results in the kernel bugzilla and
then ping Jaroslav?

$ ./scripts/get_maintainer.pl sound/pci/hda/patch_realtek.c |grep Jaroslav
Jaroslav Kysela  (maintainer:SOUND)

[1] https://bugzilla.kernel.org/show_bug.cgi?id=207423#c14

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, channel=0

  ProblemType: Bug
  DistroRelease: 

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-26 Thread Mike Pozulp
@John Hoff

> Mike, depending on your answers to my many questions from today, if
the only way we know to proceed is to build and test a patch, could you
help with building the patch (or at least the basic framework of the
patch so I can just plug in the CORB values)?

Absolutely. I'll write a patch and test it on my machine, after which
I'll share it with you. In the mean time you could try Early Patching.
Your Early Patching file will have an enormous [verb] section which will
look like this

[verb]
0x1a 0x707 0xc5
.
.
.

Each line contains three space-separated hex values: Node ID, Verb ID,
and Payload. You will have one line for each verb in the CORB dump, so
that could be 1000s of lines.

I think hda-verb < Early Patching < kernel patch, in the sense that a
kernel patch has the highest-probability of success, hda-verb has the
lowest, and Early Patching is somewhere in between. This is because I
think that some codec values are read-write at initialization time but
then become read-only at runtime (only Realtek, the ALC298 manufacturer,
knows for sure*). A kernel patch allows us to write values at codec
initialization time, whereas hda-verb is at runtime, and Early Patching
is somewhere in between.

*Perhaps we can know: I found a datasheet for the ALC269 [1]. I think
the ALC269 is very similar to the ALC298 codec in our laptops. Among
other things, the datasheet describes verb semantics. It's a nice
supplement to the Intel HDA spec. I don't recall seeing anything about
initialization-time vs runtime, but perhaps I have not read it closely
enough - the datasheet is only somewhat less dense and technical than
the Intel HDA spec so it's not an easy read! :)

[1] https://www.hardwaresecrets.com/datasheets/alc269.pdf

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, 

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-24 Thread Mike Pozulp
@John Hoff

> enable file...

Can you re-attach? I don't see it.

> Anyway, thoughts? Do you have any more clarity on how to replay the
CORB commands?

Take a look at this patch [1]. Use the CORB command recording to write a
similar patch. It will contain a 2034-entry long array of hda_verb
structs [2]. Each hda_verb contains

{Node ID, Verb ID, Payload}

Apply your patch, compile, and run.

[1] 
https://github.com/tespeleta/linux/commit/761cca49e9153b7832fa3f887b875e5ad1517892
[2] 
https://github.com/torvalds/linux/blob/master/include/sound/hda_codec.h#L360-L364

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, channel=0

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: alsa-base 1.0.25+dfsg-0ubuntu5
  ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
  Uname: Linux 5.3.0-19-generic x86_64
  ApportVersion: 2.20.11-0ubuntu8.2
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-23 Thread Mike Pozulp
@PowerKiKi

Wondeful, thank you for clarifying. =)

> I'd love to submit the patch, but I've never done that before. I'll
see if I can figure it out later tonight...

That would be great - go for it! Nick Desaulniers has a good blog post
which describes how to submit a patch [1]. I read it and then ran this
sequence of commands to generate and submit my first patch:

git commit
git format-patch HEAD~1
./scripts/checkpatch.pl 
0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Notebook.patch
git send-email 0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Notebook.patch
./scripts/get_maintainer.pl 
0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Notebook.patch
git send-email \
--cc-cmd='./scripts/get_maintainer.pl 
0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Notebook.patch' \
0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Notebook.patch


[1] 
http://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-23 Thread Mike Pozulp
@John Hoff

John, great work!

> Now what? I am not sure what to do with any of this data

Now the hard part. Here's what I think is going on:

The windows driver running in the VM controls the audio codec. How?
According to section 4.4 of the Intel HDA Spec [1], the driver writes to
a circular buffer known as the Command Output Ring Buffer (CORB). The
HDA controller, which is implemented by the hardware manufacturer and
shipped as firmware in the chipset, takes commands from the CORB and
sends them to the codec.

Qemu provides the memory for the VM. That means qemu can see every time
the VM writes to memory. That's a lot of writes! We only care about the
subset of writes to the memory region allocated for the HDA controller,
which is what we get when we specify "vfio_region_write" event tracing.
My laptop has this HDA controller

00:1f.3 Multimedia audio controller [0401]: Intel Corporation Cannon
Point-LP High Definition Audio Controller [8086:9dc8] (rev 11)

so when I see qemu output a trace line that looks like

3064@1591386653.159507:vfio_region_write  (:00:1f.3:region0+0xe,
0x7fff, 2)

I know that the driver wrote to the HDA controller memory because the
pci device id "1f.3" matches the HDA controller. We can decode the rest
of the line by looking at the qemu source code [2]. 0xe is the memory
offset at which the driver wrote, 0x7fff is the data, and 2 is the size
of the data in bytes.

Which vfio_region_write events are CORB writes? The answer requires an
understanding of the CORB protocol. The CORB has a fixed size which may
be up to 256 entries. That means that all CORB writes are made to memory
within a CORBSIZE range of addresses. After the driver writes an HDA
verb to the CORB, the driver writes a value from 0x0 to 0xff to the CORB
Write Pointer (CORBWP) register which tells the HDA controller the last
valid CORB entry offset so the HDA controller knows how far to read
before stopping and waiting for more data.

Enter QemuHDADump (QHDAD). QHDAD is a program that someone wrote and
published on github which attempts to parse vfio_region_write lines from
qemu to determine the CORB address and record all HDA verbs written to
the CORB. The author of QHDAD has his/her own hardware and did not test
it on my laptop or your laptop so it is likely buggy and therefore may
not produce a good recording of verbs. We don't have to use QHDAD; we
just need some way to parse CORB writes from vfio_region_write events.

Because the speaker sound works on Windows that means that if we send
the verbs in the recording to the HDA controller using snd_hda_intel we
may be able to get the speakers work on Linux. Once we demonstrate that
the speakers function after passing all the verbs in the recording we
need to minimize the verbs if we want any hope of our patch being
included in the kernel. Many of the verbs will be "getters" instead of
"setters" which we can delete. After that it may be a tedious trial-and-
error process to see which of the remaining verbs we can delete. The
verb encodings are specified in the Intel HDA Spec which can help us
guess what can be deleted.

The end goal is a patch which looks like this one [3].

[1] 
https://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/high-definition-audio-specification.pdf
[2] https://github.com/qemu/qemu/blob/master/hw/vfio/trace-events
[3] 
https://github.com/torvalds/linux/commit/a2ef03fe617a8365fb7794531b11ba587509a9b9

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-23 Thread Mike Pozulp
@John Hoff @PowerKiKi

Is "Samsung Galaxy Book Ion (NT950XCJ-X716A)" not a correct description
of John's laptop? If not, it doesn't matter to snd_hda_intel which only
looks at the subsystem id (0x144dc18a), but it's worth changing it for
the benefit of any humans who read the kernel code.

I use the output from alsa_info.sh and dmidecode to determine the
subsystem id and what to put for the string description, but I don't
have your hardware so I can't check the output for you, which is how I
(possibly) made a mistake in writing the description string.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, channel=0

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: alsa-base 1.0.25+dfsg-0ubuntu5
  ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
  Uname: Linux 5.3.0-19-generic x86_64
  ApportVersion: 2.20.11-0ubuntu8.2
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  martin 1383 

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-22 Thread Mike Pozulp
@John Hoff

> Is there something I need to do to allow pass through of the
underlying hardware?

Yes. It's called vfio passthrough. Can you try doing what I did in
comment 15 [1]? It is based off of the instructions in the QemuHDADump
wiki [2].

[1] https://bugzilla.kernel.org/show_bug.cgi?id=207423#c15
[2] 
https://github.com/Conmanx360/QemuHDADump/wiki/Setup-and-usage-of-the-program

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, channel=0

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: alsa-base 1.0.25+dfsg-0ubuntu5
  ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
  Uname: Linux 5.3.0-19-generic x86_64
  ApportVersion: 2.20.11-0ubuntu8.2
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  martin 1383 F pulseaudio
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  6 06:20:08 2019
  InstallationDate: Installed on 2019-11-03 (3 days ago)
  InstallationMedia: Ubuntu 

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-19 Thread Mike Pozulp
@John Hoff

The windows VM is the key. It's the top layer of the 3-layer cake. The
middle layer is linux and the bottom layer is the hardware. In linux we
record the windows driver communicating with the audio codec in the
hardware's firmware with the hope that we can play back the recording in
the linux driver.

Comment 19 [1] shows my excitement when I got the VM working.
Specifically, I had a windows VM in which I could play audio and hear it
in the speakers. I could see the windows driver communication with the
audio codec in the VM's IOMMU. I can help you get to this point, which
is where I'm stuck.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=207423#c19

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, channel=0

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: alsa-base 1.0.25+dfsg-0ubuntu5
  ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
  Uname: Linux 5.3.0-19-generic x86_64
  ApportVersion: 2.20.11-0ubuntu8.2
  

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-18 Thread Mike Pozulp
@John Hoff

Woohoo!!! Way to go John! That's great news. I submitted a patch to LKML
(see attached). The content is the same as the patch that worked for
you; all I did was change the commit message. Hopefully it lands in your
favorite kernel distribution soon. :)

> Is there anything I can do to help with the speaker investigation?

Yes, come over to the kernel bugzilla and read what I've written [1].
Comment 28 lists a 2-step process - get a good trace then minimize the
verbs - which has proven to be a significant technical challenge.
Comment 24 describes where I left off in my quest for a trace.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=207423

** Patch added: 
"0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Galaxy-Book-I.patch"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1851518/+attachment/5402575/+files/0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Galaxy-Book-I.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, 

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-17 Thread Mike Pozulp
@John Hoff

> I notice in your comment you did a checkout of v5.8... does that make
a difference?

The fact that you were able to apply the patch and compile makes me
think that a checkout of v5.8 would not make a difference.

Can you try this patch instead? (See attached)

Delete /etc/modprobe.d/alsa-base.conf because you don't need it anymore.
This new patch instructs the driver, snd_hda_intel, to apply the quirk
when it sees your machine, which it identifies by observing your
subsystem id (0x144dc18a).

I did *not* submit this new patch for inclusion in the kernel. I made it
just for you to try. If it works for you then I can add a signed-off-by
line and submit it.

** Patch added: 
"0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Galaxy-Book-I.patch"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1851518/+attachment/5402219/+files/0001-ALSA-hda-realtek-Add-quirk-for-Samsung-Galaxy-Book-I.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: 

[Kernel-packages] [Bug 1851518] Re: [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on internal speakers, very very quiet on headphones

2020-08-17 Thread Mike Pozulp
@John Hoff

This works for me

git clone g...@github.com:torvalds/linux.git
cd linux
git checkout v5.8
git apply 
~/Desktop/0001-ALSA-hda-realtek-Add-model-alc298-samsung-headphone.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1851518

Title:
  [950SBE/951SBE, Realtek ALC298, Speaker, Internal] No sound on
  internal speakers, very very quiet on headphones

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I've been googling this issue for 10's of hours and tried many things.

  Relase of Ubuntu: 19.10

  Expected outcome: Music plays on the internal speakers and headphones.

  Actual outcome: I can barely hear audio using headphones with volume
  turned up to 150%.  Absolutely nothing comes out of the speakers. (The
  speakers sound great under Windows 10.)

  Complete alsa-info output is attached, but here are some snippets:

  !!DMI Information
  !!---

  Manufacturer:  SAMSUNG ELECTRONICS CO., LTD.
  Product Name:  950SBE/951SBE
  Product Version:   P06RES
  Firmware Version:  P06RES.075.190529.SP
  Board Vendor:  SAMSUNG ELECTRONICS CO., LTD.
  Board Name:NP950SBE-K01US

  
  !!Kernel Information
  !!--

  Kernel release:5.3.0-19-generic
  Operating System:  GNU/Linux
  Architecture:  x86_64
  Processor: x86_64
  SMP Enabled:   Yes


  !!ALSA Version
  !!

  Driver version: k5.3.0-19-generic
  Library version:1.1.9
  Utilities version:  1.1.9

  
  !!Loaded ALSA modules
  !!---

  snd_hda_intel

  
  !!Sound Servers on this system
  !!

  Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes

  
  !!Soundcards recognised by ALSA
  !!-

   0 [PCH]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x604b118000 irq 177

  
  !!PCI Soundcards installed in the system
  !!--

  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP
  High Definition Audio Controller (rev 11)

  
  !!Advanced information - PCI Vendor/Device/Subsystem ID's
  !!---

  00:1f.3 0401: 8086:9dc8 (rev 11)
  DeviceName: Onboard - Sound

  
  !!HDA-Intel Codec information
  !!---
  --startcollapse--

  Codec: Realtek ALC298
  Address: 0
  AFG Function Id: 0x1 (unsol 1)
  Vendor Id: 0x10ec0298
  Subsystem Id: 0x144dc812
  Revision Id: 0x100103
  No Modem Function Group found
  Default PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
  Default Amp-In caps: N/A
  Default Amp-Out caps: N/A
  State of AFG node 0x01:
Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
Power: setting=D0, actual=D0
  GPIO: io=8, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC298 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x00 0x00]
Converter: stream=1, channel=0
PCM:
  rates [0x60]: 44100 48000
  bits [0xe]: 16 20 24
  formats [0x1]: PCM
Power states:  D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
  Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
  ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x01, mute=0
Amp-Out vals:  [0x7f 0x7f]
Converter: stream=1, channel=0

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: alsa-base 1.0.25+dfsg-0ubuntu5
  ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
  Uname: Linux 5.3.0-19-generic x86_64
  ApportVersion: 2.20.11-0ubuntu8.2
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  martin 1383 F pulseaudio
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  6 06:20:08 2019
  InstallationDate: Installed on 2019-11-03 (3 days ago)
  InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
  PackageArchitecture: all
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=
   LANG=en_US.UTF-8
   SHELL=/bin/bash