Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sof nocodec #113

Closed
wants to merge 6 commits into from
Closed

Sof nocodec #113

wants to merge 6 commits into from

Conversation

htot
Copy link
Member

@htot htot commented Jun 4, 2020

Package and install the sof-byt-nocodec

@htot htot mentioned this pull request Jun 4, 2020
Copy link
Contributor

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though my Yocto skills are next to non-existent...

plbossart and others added 6 commits June 7, 2020 23:01
The nocodec mode is required if there is no ACPI codec HID, otherwise
the kernel will throw an error such as

[    9.612127] sof-audio-pci 0000:00:0d.0: error: no matching ASoC
machine driver found - aborting probe
[    9.621634] sof-audio-pci 0000:00:0d.0: error: failed to get
machine info -19
[    9.629027] sof-audio-pci 0000:00:0d.0: error: failed to probe DSP
hardware!

Note that /lib/firmware/intel/sof/sof-byt.ri and
/lib/firmware/intel/sof-tplg/sof-byt.tplg files need to be present for
the probe to succeed, the nocodec mode depends on them

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
To make this work a pulseaudio server needs to be started on edison.
1) create a user
2) systemctl --user start pulseaudio
3) sudo setfacl -m u:<user name>:rw /dev/snd/*
4) paplay "music.wav"

On the host this will play to the Multifunction Composite Gadget input device.

Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
@htot
Copy link
Member Author

htot commented Jun 7, 2020

I force pushed the fixed up install of firmware, dropped old firmware and added a uac2 device to the usb gadget.

I don't know if playing through this gadget uses the sof, but I can use it to play a wav from edison to my desktop PC. There I can again record the stream, I haven't found out yet how to directly play that stream to my speakers.

@htot htot requested a review from andy-shev June 10, 2020 19:41
@htot
Copy link
Member Author

htot commented Jun 10, 2020

@andy-shev this applies @plbossart patch + downloads firmware and install in the correct place on the image. I dropped the legacy firmware as that is currently unused. As I understand sof needs a codec to work, and edison doesn't have one. So we can only really test his once we connect a codec and enable it through acpi.

I believe the old sound driver/firmware also connected to bt but for now sof doesn't, so no bt sound devices are created. That might be a useful way to test sof without adding external hw.

The last 2 patches enable uac2 which creates and gadget source and sink. I tested this by play back (paplay) a wav file. CPU load according to htop was low, irc 4%. But sof is not used by uac2.

Should we apply this now? If so, I want to document getting play back to work first.

Copy link
Contributor

@andy-shev andy-shev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (though I did it briefly and didn't notice anything that could make me worry)!

@htot
Copy link
Member Author

htot commented Jun 12, 2020

Merged, thanks!

@htot htot closed this Jun 12, 2020
@htot htot deleted the sof-nocodec branch June 12, 2020 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants