Skip to content

[BUG]When set capture volume to 0 DMIC 4ch still can capture voice #1799

Closed

Description

@dengyangchao

Describe the bug
When set capture volume to 0 DMIC 4ch still can capture voice, the issue exist on both 0,6 and 0,7

To Reproduce

  1. Reboot system via"sudo reboot"
  2. wait it to suspend status
  3. Use alsamixer to set DMIC capture volume to 0
  4. Arecord via "arecord -Dhw:0,6 -r48000 -c4 -fs16_le 1.wav -vv -i" or "arecord -Dhw:0,7 -r48000 -c4 -fs16_le 1.wav -vv -i"
  5. aplay the capture via "paplay 1.wav -vvvv"

Reproduction Rate
100%

Expected behavior
when set volume to 0, DMIC can't capture voice

Impact
DMIC still can capture voice

Environment
Firmware: 66da4e8 https://github.com/thesofproject/sof/commits/master
Kernel: 2a22b94 https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: file: tools/topology/sof-hda-generic-4ch.tplg same as firmware
platform:ICL-RVP

Screenshots or console output
Screenshot from 2019-08-26 07-55-30

Dmesg

[  159.485089] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50030000: GLB_COMP_MSG: SET_DATA
[  159.485091] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[  159.485120] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[  159.485784] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50030000: GLB_COMP_MSG: SET_DATA
[  159.485789] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.486167] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.486174] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50030000: GLB_COMP_MSG: SET_DATA
[  159.486632] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50030000: GLB_COMP_MSG: SET_DATA
[  159.486635] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.487135] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.487139] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.487473] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.487476] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.487850] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.487853] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.488333] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.488337] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.488672] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.488676] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.489205] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.489209] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.489540] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.489543] sof-audio-pci 0000:00:1f.3: ipc tx: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.489879] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x50010000: GLB_COMP_MSG: SET_VALUE
[  159.489883] sof-audio-pci 0000:00:1f.3: ipc tx: 0x40020000: GLB_PM_MSG: CTX_RESTORE
[  159.490145] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x40020000: GLB_PM_MSG: CTX_RESTORE
[  159.490170] sof-audio-pci 0000:00:1f.3: pcm: open stream 7 dir 1
[  159.490172] sof-audio-pci 0000:00:1f.3: period min 192 max 16384 bytes
[  159.490173] sof-audio-pci 0000:00:1f.3: period count 2 max 16
[  159.490173] sof-audio-pci 0000:00:1f.3: buffer max 65536 bytes
[  159.490355] sof-audio-pci 0000:00:1f.3: pcm: hw params stream 7 dir 1
[  159.490357] sof-audio-pci 0000:00:1f.3: generating page table for 000000005acb3007 size 0xf9c0 pages 16
[  159.490389] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[  159.490471] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[  159.490482] sof-audio-pci 0000:00:1f.3: period_bytes:0x3e40
[  159.490483] sof-audio-pci 0000:00:1f.3: periods:4
[  159.490578] sof-audio-pci 0000:00:1f.3: stream_tag 2
[  159.490582] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[  159.491143] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[  159.491145] sof-audio-pci 0000:00:1f.3: pcm: stream dir 1, posn mailbox offset is 790528
[  159.491180] sof-audio-pci 0000:00:1f.3: nothing to do in IPC IRQ thread
[  159.491644] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 7 dir 1 cmd 1
[  159.491682] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x2024001e successful
[  159.491684] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
[  159.492019] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60040000: GLB_STREAM_MSG: TRIG_START
[  159.985519] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[  159.985569] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[  160.485319] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[  160.485369] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[  166.066474] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 7 dir 1 cmd 0
[  166.066499] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x20240000 successful
[  166.066513] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[  166.066895] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[  166.066907] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[  166.067226] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[  166.067435] sof-audio-pci 0000:00:1f.3: pcm: close stream 7 dir 1
[  166.588940] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[  166.588987] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[  168.079048] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x20140000 successful
[  168.120073] sof-audio-pci 0000:00:1f.3: ipc tx: 0x40010000: GLB_PM_MSG: CTX_SAVE
[  168.120316] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x40010000: GLB_PM_MSG: CTX_SAVE
[  168.120376] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x1010f0f successful
[  168.120388] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0xf0f successful
[  168.120391] sof-audio-pci 0000:00:1f.3: DSP core(s) enabled? 0 : core_mask f
[  168.120431] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000010 at  00000044
[  171.063271] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
[  171.063280] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000040 at  00000048
[  171.063287] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
[  171.066007] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
[  171.066019] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000040 at  00000048
[  171.066088] sof-audio-pci 0000:00:1f.3: loading firmware
[  171.066091] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000002 at  00000048
[  171.066096] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
[  171.066101] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
[  171.066106] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000004 at  00000044
[  171.066107] sof-audio-pci 0000:00:1f.3: booting DSP firmware
[  171.066180] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[  171.066244] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[  171.066247] sof-audio-pci 0000:00:1f.3: period_bytes:0x0
[  171.066249] sof-audio-pci 0000:00:1f.3: periods:1
[  171.066312] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0xf0f0f0f successful
[  171.066389] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0xf0f0f0e successful
[  171.066394] sof-audio-pci 0000:00:1f.3: unstall/run core: core_mask = 1
[  171.066401] sof-audio-pci 0000:00:1f.3: DSP core(s) enabled? 1 : core_mask 1
[  171.067179] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x80000000 successful
[  171.067194] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x1010e0e successful
[  171.067322] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[  171.137462] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x5000001 successful
[  171.146877] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x5 successful
[  171.146903] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x140000 successful
[  171.146914] sof-audio-pci 0000:00:1f.3: Firmware download successful, booting...
[  171.152201] sof-audio-pci 0000:00:1f.3: ipc rx: 0x70000000: FW_READY
[  171.152209] sof-audio-pci 0000:00:1f.3: ipc: DSP is ready 0x70000000 offset 0x81000
[  171.152222] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x70000000: FW_READY
[  171.152312] sof-audio-pci 0000:00:1f.3: firmware boot complete
[  171.152337] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
[  171.152353] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000002 at  00000048
[  171.152370] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000004 at  00000044
[  171.152388] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000044
[  171.152432] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[  171.152477] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[  171.152496] sof-audio-pci 0000:00:1f.3: period_bytes:0x0
[  171.152499] sof-audio-pci 0000:00:1f.3: periods:1
[  171.152527] sof-audio-pci 0000:00:1f.3: stream_tag: 1
[  171.152542] sof-audio-pci 0000:00:1f.3: ipc tx: 0x90030000: GLB_TRACE_MSG
[  171.153214] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x90030000: GLB_TRACE_MSG
[  171.153237] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x14001e successful
[  171.153251] sof-audio-pci 0000:00:1f.3: ipc tx: 0x30010000: GLB_TPLG_MSG: COMP_NEW
[  171.153502] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x30010000: GLB_TPLG_MSG: COMP_NEW

dmesg.log
logger.log

Activity

  1. mengdonglin commented on Sep 2, 2019

    @mengdonglin

    @dengyangchao Could you check the volume parameter value sent by IPC for the 4 channels? It should be one IPC for all 4 channels?

    BTW, Seppo mentioned ASoC may only be able to deal with 2 channels.

  2. zrombel commented on Sep 2, 2019

    @zrombel

    Hi,
    I have tested this issue with slim driver with firmware 66da4e8 and master top 008285e and in both cases result are correct:

    image
    Audio format 48kHz 16b/16b 4ch

    And this is the data that we are sending to FW via CompSetValue IPC
    "data": [
    {
    "channel": 0,
    "value": 0
    },
    {
    "channel": 1,
    "value": 0
    },
    {
    "channel": 2,
    "value": 0
    },
    {
    "channel": 3,
    "value": 0
    }
    ]

  3. dengyangchao commented on Sep 2, 2019

    @dengyangchao
    Author

    @mengdonglin only two channel volume can be controlled by amixer/alsamixer:

    numid=8,iface=MIXER,name='PGA10.0 10 Master Capture Volume'
      ; type=INTEGER,access=rw---R--,values=2,min=0,max=70,step=0
      : values=52,51
      | dBscale-min=-50.00dB,step=1.00dB,mute=1
    

    below audio is captured after changing volume to 0 via alsamixer
    Screenshot from 2019-09-02 10-04-29

  4. keyonjie commented on Sep 9, 2019

    @keyonjie

    This should be a tplg bug, it is defined 2 channels for the kcontrol, please see:

    #
    # Controls
    #
    
    # Volume Mixer control with max value of 32
    SectionControlMixer."10 Master Capture Volume" {
    
            # control belongs to this index group
            index "10"
    
            #Channel register and shift for Front Left/Right
            channel."FL" {
                    reg "1"
                    shift "0"
            }
            channel."FR" {
                    reg "1"
                    shift "1"
            }
    
            # control uses bespoke driver get/put/info ID
            ops."ctl" {
                    info "volsw"
                    thesofproject/sof#256 binds the mixer control to volume get/put handlers
                    get "256"
                    put "256"
            }
    
            #
            max "70"
            invert "false"
            #TLV 80 steps from -50dB to +20dB for 1dB
            tlv "vtlv_m50s1"
    
    }
    
    
  5. keyonjie commented on Sep 9, 2019

    @keyonjie

    @singalsu comments?

  6. singalsu commented on Sep 9, 2019

    @singalsu
    Collaborator

    I think there's problem that continuing this way the microphones > 2 should be mapped to ALSA channel maps those were designed for surround speakers system. I wonder if next two microphones could be surround-left (SL) and surround-right(SR). If it could work it could be low effort at topology level. But it could be very confusing since with microphones there's no clear "surround" usage. Also above 6 channels there's no main + surround speakers channels defined (except subwoofer and center channels).

    Alternatively every > 2ch volume controller could be exposed as multiple 2ch volume controllers. This would be cleaner but more effort in driver side. Also changing volumes exactly the same time would be challenge. But I doubt there's requirement for perfectly synchronized volume.

    @kv2019i @juimonen What do you think?

    Edit: Actually there's a lot more speaker locations defined in sound/sof/control.h (SOF_CHMAP_x). Could using those help us forward? Or could we add more like SOF_CHMAP_MICn that would be more logical with microphone arrays?

    Edit2: ALSA channel map is like https://www.kernel.org/doc/html/latest/sound/designs/channel-mapping-api.html or uapi/sound/asound.h.

  7. kv2019i commented on Sep 19, 2019

    @kv2019i
    Collaborator

    @singalsu wrote:

    @kv2019i @juimonen What do you think?

    I think you are right. We need to expose the mixer controls as multiple stereo pair (smaller effort), or extend ALSA with the concept of >2ch mixer controls (much larger as none of the ALSA interfaces and the many tools are equipped to handle this).

  8. plbossart commented on Sep 19, 2019

    @plbossart
    Member

    It may be worth expanding ALSA definitions, e.g. by using USB audio class 3 representations, see table 4.8
    Also for mics there are descriptions in NHLT of the position of each mic, so maybe we can tag text in the ALSA controls to provide additional information. I think in general the Microsoft definitions are used by everyone for mic arrays.

      | Channel Relationship | Acronym | Description
    -- | -- | -- | --
    Generic | RELATIONSHIP_UNDEFINED | UND | Relationship undefined or unknown
    MONO | M | A mono channel
    LEFT | L | A generic Left channel
    RIGHT | R | A generic Right channel
    ARRAY | AR | A channel that is part of an array configuration
    Input-Related | PATTERN_X | PX | The X channel of an X/Y microphone
    PATTERN_Y | PY | The Y channel of an X/Y microphone
    PATTERN_A | PA | The A channel of an A/B microphone
    PATTERN_B | PB | The B channel of an A/B microphone
    PATTERN_M | PM | The M channel of an M/S microphone
    PATTERN_S | PS | The S channel of an M/S microphone
    Output-Related | Front Left | FL | Refer to Figure 4-3
    Front Right | FR | Refer to Figure 4-3
    Front Center | FC | Refer to Figure 4-3
    Front Left of Center | FLC | Refer to Figure 4-3
    Front Right of Center | FRC | Refer to Figure 4-3
    Front Wide Left | FWL | Refer to Figure 4-3
    Front Wide Right | FWR | Refer to Figure 4-3
    Side Left | SL | Refer to Figure 4-3
    Side Right | SR | Refer to Figure 4-3
    Surround Array Left | SAL | Refer to Figure 4-3
    Surround Array Right | SAR | Refer to Figure 4-3
    Back Left | BL | Refer to Figure 4-3
    Back Right | BR | Refer to Figure 4-3
    Back Center | BC | Refer to Figure 4-3
    Back Left of Center | BLC | Refer to Figure 4-3
    Back Right of Center | BRC | Refer to Figure 4-3
    Back Wide Left | BWL | Refer to Figure 4-3
    Back Wide Right | BWR | Refer to Figure 4-3
    Top Center | TC | Refer to Figure 4-3
    Top Front Left | TFL | Refer to Figure 4-3
    Top Front Right | TFR | Refer to Figure 4-3
    Top Front Center | TFC | Refer to Figure 4-3
    Top Front Left of Center | TFLC | Refer to Figure 4-3
    Top Front Right of Center | TFRC | Refer to Figure 4-3
    Top Front Wide Left | TFWL | Refer to Figure 4-3
    Top Front Wide Right | TFWR | Refer to Figure 4-3
    Top Side Left | TSL | Refer to Figure 4-3
    Top Side Right | TSR | Refer to Figure 4-3
    Top Surround Array Left | TSAL | Refer to Figure 4-3
    Top Surround Array Right | TSAR | Refer to Figure 4-3
    Top Back Left | TBL | Refer to Figure 4-3
    Top Back Right | TBR | Refer to Figure 4-3
    Top Back Center | TBC | Refer to Figure 4-3
    Top Back Left Of Center | TBLC | Refer to Figure 4-3
    Top Back Right Of Center | TBRC | Refer to Figure 4-3
    Top Back Wide Left | TBWL | Refer to Figure 4-3
    Top Back Wide Right | TBWR | Refer to Figure 4-3
    Bottom Center | BC | Refer to Figure 4-3
    Bottom Front Left | BFL | Refer to Figure 4-3
    Bottom Front Right | BFR | Refer to Figure 4-3
    Bottom Front Center | BFC | Refer to Figure 4-3
    Bottom Front Left Of Center | BFLC | Refer to Figure 4-3
    Bottom Front Right Of Center | BFRC | Refer to Figure 4-3
    Bottom Front Wide Left | BFWL | Refer to Figure 4-3
    Bottom Front Wide Right | BFWR | Refer to Figure 4-3
    Bottom Side Left | BSL | Refer to Figure 4-3
    Bottom Side Right | BSR | Refer to Figure 4-3
    Bottom Surround Array Left | BSAL | Refer to Figure 4-3
    Bottom Surround Array Right | BSAR | Refer to Figure 4-3
    Bottom Back Left | BBL | Refer to Figure 4-3
    Bottom Back Right | BBR | Refer to Figure 4-3
    Bottom Back Center | BBC | Refer to Figure 4-3
    Bottom Back Left Of Center | BBLC | Refer to Figure 4-3
    Bottom Back Right Of Center | BBRC | Refer to Figure 4-3
    Bottom Back Wide Left | BBWL | Refer to Figure 4-3
    Bottom Back Wide Right | BBWR | Refer to Figure 4-3
    Low Frequency Effects | LFE | Refer to Figure 4-3
    Low Frequency Effects Left | LFEL | Refer to Figure 4-3
    Low Frequency Effects Right | LFER | Refer to Figure 4-3
    Headphone Left | HPL | Refer to Figure 4-3
    Headphone Right | HPR | Refer to Figure 4-3
    
  9. wenqingfu commented on Oct 24, 2019

    @wenqingfu

    @singalsu where should the fix go? do you think you can own this?

  10. singalsu commented on Jan 8, 2020

    @singalsu
    Collaborator

    @wenqingfu Yes I can own this. The fix would be in ALSA, I need to discuss here with @kv2019i how it could go.

    The definitions from USB audio class 3 look useful. Thanks @plbossart !

  11. sinahuang commented on Jan 10, 2020

    @sinahuang

    Issue also can be reproduced on TGL-U RVP with soundwire-latest(commit:921ce33) when arecord with DMIC 4ch(0,3 and 0,4)
    Test recipe

    Kernel:https://github.com/thesofproject/linux/tree/integration/soundwire-latest commit: 921ce33
    FW: https://github.com/thesofproject/sof/commits/master commit: c6baa97
    Tplg: Same with TGL FW branch : sof-tgl-rt711-rt1308.tplg
    Platform:TGL-U RVP with codec ALC711 in SDW mode and RT1308 in I2S mode

  12. singalsu commented on Feb 13, 2020

    @singalsu
    Collaborator

    P2 - I need to increase priority for this. The FW is OK, the fix will be entirely on driver side.

  13. singalsu commented on Feb 18, 2020

    @singalsu
    Collaborator

    This need to be moved to driver side. The driver sends only controls to channels 0 and 1.

        0      2          IPC          19840492.552083       208.750000    src/ipc/handler.c:1042	ipc: hdr 0x50010000 tx (108) > rx (92)
        0      2          IPC          19840496.875000         4.322917    src/ipc/handler.c:1055	ipc: comp 42 -> cmd 2
        0      2         COMP 7.42     19840499.427083         2.552083 udio/volume/volume.c:612 	volume_cmd()
        0      2         COMP 7.42     19840502.187500         2.760417 udio/volume/volume.c:526 	volume_ctrl_set_cmd(), SOF_CTRL_CMD_SWITCH, cdata->comp_id = 42
        0      2         COMP 7.42     19840504.791667         2.604167 udio/volume/volume.c:531 	volume_ctrl_set_cmd(), channel = 0, value = 1
        0      2         COMP 7.42     19840508.072917         3.281250 udio/volume/volume.c:531 	volume_ctrl_set_cmd(), channel = 1, value = 0
        0      2          IPC          19840594.010417        85.937500    src/ipc/handler.c:1042	ipc: hdr 0x50010000 tx (108) > rx (92)
        0      2          IPC          19840598.802083         4.791667    src/ipc/handler.c:1055	ipc: comp 42 -> cmd 0
        0      2         COMP 7.42     19840601.354167         2.552083 udio/volume/volume.c:612 	volume_cmd()
        0      2         COMP 7.42     19840604.010417         2.656250 udio/volume/volume.c:493 	volume_ctrl_set_cmd(), SOF_CTRL_CMD_VOLUME, cdata->comp_id = 42
        0      2         COMP 7.42     19840606.718750         2.708333 udio/volume/volume.c:498 	volume_ctrl_set_cmd(), channel = 0, value = 65536
        0      2         COMP 7.42     19840609.895833         3.177083 udio/volume/volume.c:498 	volume_ctrl_set_cmd(), channel = 1, value = 65536
    
    
  14. transferred this issue fromthesofproject/sofon Feb 18, 2020
  15. 7 remaining items

  16. plbossart commented on Mar 3, 2020

    @plbossart
    Member

    @singalsu it's not 'ugly' for a N>2 channel stream to have a single volume/mute, and then separate volumes if they are 'unlocked'. Even for stereo, it's not uncommon to have a single volume and keep volume changes locked.

  17. singalsu commented on Mar 4, 2020

    @singalsu
    Collaborator

    @plbossart In this case (with the FW based controls extrapolation approach) a 4ch volume would unlock into two controls only. There would be no way to control each gain separately. The use could not know which microphone remains pairs with same gain.

    Two expose control to each channel the topology should for alsamixer convert a N channel volume into N/2 volume instances those appear to be in cascade. But instead of cascade the first instance would control channels 1&2, second 3&4, ... etc.

  18. plbossart commented on Mar 4, 2020

    @plbossart
    Member

    @singalsu if we have 4 channels, I don't understand why we would need 2 pairs of gains.
    usually there is one gain for all channels, or separate gains for each channel. pairing by 2 makes no sense to me.

  19. juimonen commented on Mar 4, 2020

    @juimonen

    @plbossart I think @singalsu tried to explain it above... we don't have easy means of exposing single 4 channel volume control to user space. 2 channels are hard coded in asoc layer mixer creation, even though we would introduce 4-channel volume in topology. I don't know if anyone has seen > 2ch mixer volume control in amixer or alsamixer with asoc code related chip? (not an evil question, I'm just not sure if it is somehow possible).

    So we should change the asoc layer to have multi-channel volume, if above is correct. @singalsu was suggesting as quick remedy to couple 1 stereo volume to 4 ch volume in firmware. As the main problem is to set volume of the whole dmic array or mute it. So that 2 channel don't "leak" as in this bug... and then you could not set individual dmic channels.

    So should we then go for "mono" volume for the whole array?

  20. Liviali155 commented on Apr 13, 2020

    @Liviali155

    This issue also can be reproduced on sof v1.5-rc1 on TGL HDA
    Kernel:4b4681eb Sof-dev
    fw:5f7d4e2 https://github.com/thesofproject/sof/releases/tag/v1.5-rc1

  21. ranj063 commented on Jun 9, 2020

    @ranj063
    Collaborator

    @plbossart I think @singalsu tried to explain it above... we don't have easy means of exposing single 4 channel volume control to user space. 2 channels are hard coded in asoc layer mixer creation, even though we would introduce 4-channel volume in topology. I don't know if anyone has seen > 2ch mixer volume control in amixer or alsamixer with asoc code related chip? (not an evil question, I'm just not sure if it is somehow possible).

    @juimonen where is this limitation coming from? As far as I can tell the control IO functions dont restrict to just stereo and also the channel mapping in the ALSA topology document doesnt mention it. https://www.alsa-project.org/alsa-doc/alsa-lib/group__topology.html

  22. singalsu commented on Jun 15, 2020

    @singalsu
    Collaborator

    If a quick and ugly fix is needed the missing channels 3 and 4 controls can be extrapolated from 1 and 2. It could be done on kernel or firmware side. I don't like such but this has been open soon a full year without found way to do this. Also the channel maps for ALSA are for surround playback. It would be artificial to name mic channels as FR, FL, SR, SL, etc.

  23. added
    dmicIssues related to PCH connected DMIC
    on Sep 22, 2020
  24. singalsu commented on Oct 5, 2020

    @singalsu
    Collaborator

    Patch by @juimonen #2469 fixes this.

  25. keyonjie commented on Oct 12, 2020

    @keyonjie

    pr is merged, can we close it?

  26. juimonen commented on Oct 12, 2020

    @juimonen

    @keyonjie to make the use case working through the whole stack we need:
    thesofproject/sof#3470
    and
    https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/382

    but the kernel part is merged yes.

  27. plbossart commented on Jan 22, 2021

    @plbossart
    Member

    @juimonen can we close this?

  28. juimonen commented on Jan 22, 2021

    @juimonen

    Yes this should be fixed, we might still get new similar issues when folks have mixed versions of kernel/fw/topology, but they can be treated separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ICLApplies to Icelake platformP2Critical bugs or normal featuresTGLApplies to Tiger Lake platformbugSomething isn't workingdmicIssues related to PCH connected DMIC

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions