Skip to content

[WHL] bits support for ALC700 codec #251

Closed

Description

@emilchudzik

Platform: WHL RVP
Kernel: 4.18 + SOF and HDA enabled

Check command:

cat /proc/asound/card0/codec#0

Output show that codec support only 16, 20 and 24 bits.
What about 32? SOF topology is set to 32b_LE.
Aplay make linear conversion during playing waves with above bits. So I can't check if driver/codec/FW real support 16, 24 or 32 bit waves.

Codec: Realtek ALC700
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0700
Subsystem Id: 0x10ec10f2
Revision Id: 0x100004
No Modem Function Group found
(...)
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
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x53 0x53]
  Converter: stream=1, channel=0
  PCM:
    rates [0x40]: 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
(...)

Activity

  1. lgirdwood commented on Nov 7, 2018

    @lgirdwood
    Member

    @echudzi what topology file are you using ? The SOF pipeline may use S32_LE internally where the link DMA will automatically convert to 16 or 24 bit is set in topology.

  2. emilchudzik commented on Nov 7, 2018

    @emilchudzik
    Author

    I use for WHL: sof-whl-hda.tplg

  3. changed the title [-][WHL] bits support for ALD700 codec[/-] [+][WHL] bits support for ALC700 codec[/+] on Nov 7, 2018
  4. plbossart commented on Nov 7, 2018

    @plbossart
    Member

    @echudzi What do you mean by "Aplay make linear conversion during playing waves with above bits. So I can't check if driver/codec/FW real support 16, 24 or 32 bit waves." If you use aplay -Dhw: there will be no conversions, it'll just fail if not supported.
    Can you please attach log files (command line and dmesg)?

  5. RanderWang commented on Nov 8, 2018

    @RanderWang

    @echudzi
    pass-through topology is required so no volume component is included. Only one format which is defined in topology file, is supported by our SOF because no format conversion in FW. Now 32le is defined whl_hda_generic.m4, only S32_LE would be reported to ASOC, so you see a conversion with aplay -vvv xxx.wav. If you want to test native 16le or 24le (24_3le is not supported), just replace all the 32le to 16le or 24le in m4 then build it.

    For ALC700 only support 16/20/24bit case, it is a good finding. For 32le pcm, HDA would check the capability of codec and set 24 bit format to codec. But 32le pcm data would be sent to codec (pass through) and 8bit of lsb data would lost. It is not easy to hear the difference but not a perfect solution. I would refine it later

  6. emilchudzik commented on Nov 8, 2018

    @emilchudzik
    Author

    @echudzi What do you mean by "Aplay make linear conversion during playing waves with above bits. So I can't check if driver/codec/FW real support 16, 24 or 32 bit waves." If you use aplay -Dhw: there will be no conversions, it'll just fail if not supported.
    Can you please attach log files (command line and dmesg)?

    Please see below (source file: 48k,2ch,16b). I don't use -Dplughw:0,0 (plug make conversions), despite this alsa make conversions - maybe it is default made by alsa.

    image

    If I use -Dhw:0,0 you have right: I have not supported format.

    So we can close this isse, all is clear now.

    I see thesofproject/soft#121 based on this 251 which fix 32b to 16b format.

  7. added a commit that references this issue on Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions