Skip to content

DMIC capture accepts 4ch recording but gives corrupted audio when configured for 2ch #327

Closed

Description

@singalsu

The number of channels (used PDM stereo controllers count) is defined in topology parameters. Now the capture runs but results corrupted audio. Example of this kind of violation is to use topology sof-apl-nocodec.tplg or sof-apl-da7219.m4 and run capture like:

time arecord -Dhw:0,6 -c 4 -f S32_LE -r 48000 -d10 tmp.wav --dump-hw-params

The time print shows that such capture will take 20s instead of requested 10. The 2ch audio samples will be distributed to all 4ch and recording will sound double speed and double pitch.

The proper driver behavior should be to reject capture of non-matching channels count.

Activity

  1. self-assigned this
    on Sep 7, 2018
  2. changed the title [-]DMIC capture accepts 4ch recordin but gives corrupted audio when configured for 2ch[/-] [+]DMIC capture accepts 4ch recording but gives corrupted audio when configured for 2ch[/+] on Sep 7, 2018
  3. lgirdwood commented on Sep 7, 2018

    @lgirdwood
    Member

    @singalsu ok so dmic driver should reject channels if not supported by topology. Host driver does not have internal pipeline logic to do this rejection.

  4. added
    bugSomething isn't working as expected
    P2Critical bugs or normal features
    on Sep 17, 2018
  5. singalsu commented on Oct 12, 2018

    @singalsu
    CollaboratorAuthor

    As update the fix is under construction in SOFT PR #90.

  6. michalgrodzicki commented on Oct 17, 2018

    @michalgrodzicki

    @singalsu PR #90 is closed, what is a status of this issue?

  7. singalsu commented on Oct 18, 2018

    @singalsu
    CollaboratorAuthor

    @michalgrodzicki @lgirdwood @juimonen No, SOFT PR #90 is not. I feel it could be useful for merge if #92 that has a wider scope takes still time to develop. Though #90 seems to need an update. What is your recommendation? This has been open for a long time with first simple fix #90 on hold.

  8. lgirdwood commented on Oct 18, 2018

    @lgirdwood
    Member

    @singalsu merged now, so @juimonen can fix properly after his current commitment.

  9. singalsu commented on Oct 22, 2018

    @singalsu
    CollaboratorAuthor

    This issue can be closed. I just checked that arecord command with four channels is rejected (and two channels works).

    $ arecord -Dhw:0,6 -c 2 -f S32_LE -r 48000 -d 10 tmp.wav
    Recording WAVE 'tmp.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo
    $ arecord -Dhw:0,6 -c 4 -f S32_LE -r 48000 -d 10 tmp.wav
    Recording WAVE 'tmp.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Channels 4
    arecord: set_params:1305: Channels count non available
    
  10. singalsu commented on Oct 22, 2018

    @singalsu
    CollaboratorAuthor

    Closing.

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

Metadata

Metadata

Assignees

Labels

P2Critical bugs or normal featuresbugSomething isn't working as expectedverifiedQA/Bug reporter verifies solution worked.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions