- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将音频ADC(wm8782 / pcm1803a)与Beagle Black连接。我已经对文件 davinci-evm , wm8782.c 和BB-BONE-AUDI-01设备树覆盖文件进行了一些更改(请参见下面的代码)。
我的问题是,在加载dtbo文件时,dmesg返回:
"...Codec DAI wm8782-hifi not found"
/*
* ASoC Driver.
*
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/jack.h>
static int evm_wm8782_init(struct snd_soc_pcm_runtime *rtd)
{
return 0;
}
static int evm_wm8782_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
/*return snd_soc_dai_set_bclk_ratio(cpu_dai, 32*2);*/
return 0;
}
/* machine stream operations */
static struct snd_soc_ops evm_wm8782_ops = {
.hw_params = evm_wm8782_hw_params,
};
static struct snd_soc_dai_link evm_wm8782_dai[] = {
{
.name = "PCM1803 board",
.stream_name = "PCM1803 board",
.cpu_dai_name = "davinci-mcasp.0",
.codec_dai_name = "wm8782-hifi",
.platform_name = "davinci-pcm-audio",
.codec_name = "wm8782-codec",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
.ops = &evm_wm8782_ops,
.init = evm_wm8782_init,
},
};
/* audio machine driver */
static struct snd_soc_card snd_wm8782_adc = {
.name = "snd_wm8782_adc",
.dai_link = evm_wm8782_dai,
.num_links = ARRAY_SIZE(evm_wm8782_dai),
};
static int snd_wm8782_probe(struct platform_device *pdev)
{
int ret = 0;
snd_wm8782_adc.dev = &pdev->dev;
ret = snd_soc_register_card(&snd_wm8782_adc);
if (ret)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
return ret;
}
static int snd_wm8782_remove(struct platform_device *pdev)
{
return snd_soc_unregister_card(&snd_wm8782_adc);
}
static struct platform_driver snd_wm8782_driver = {
.driver = {
.name = "snd-wm8782-adc",
.owner = THIS_MODULE,
},
.probe = snd_wm8782_probe,
.remove = snd_wm8782_remove,
};
module_platform_driver(snd_wm8782_driver);
MODULE_AUTHOR("E.E.R");
MODULE_DESCRIPTION("ASoC Driver for pcm1803 ADC");
MODULE_LICENSE("GPL v2");
/*
* sound/soc/codecs/wm8782.c
* simple, strap-pin configured 24bit 2ch ADC
*
* Copyright: 2011 Raumfeld GmbH
* Author: Johannes Stezenbach <js@sig21.net>
*
* based on ad73311.c
* Copyright: Analog Device Inc.
* Author: Cliff Cai <cliff.cai@analog.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/ac97_codec.h>
#include <sound/initval.h>
#include <sound/soc.h>
static struct snd_soc_dai_driver wm8782_dai = {
.name = "wm8782-hifi",
.capture = {
.stream_name = "Capture",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000,
.formats = SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_S24_LE,
},
};
static struct snd_soc_codec_driver soc_codec_dev_wm8782;
static int wm8782_probe(struct platform_device *pdev)
{
return snd_soc_register_codec(&pdev->dev,
&soc_codec_dev_wm8782, &wm8782_dai, 1);
}
static int wm8782_remove(struct platform_device *pdev)
{
snd_soc_unregister_codec(&pdev->dev);
return 0;
}
static struct platform_driver wm8782_codec_driver = {
.driver = {
.name = "wm8782",
.owner = THIS_MODULE,
},
.probe = wm8782_probe,
.remove = wm8782_remove,
};
module_platform_driver(wm8782_codec_driver);
MODULE_DESCRIPTION("ASoC WM8782 driver");
MODULE_AUTHOR("Johannes Stezenbach <js@sig21.net>");
MODULE_LICENSE("GPL");
/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "BB-BONE-AUDI-01";
version = "00A0", "A0";
/* state the resources this cape uses */
exclusive-use =
/* the pin header uses */
"P9.14", /* leds: gpio1_18 */
"P9.16", /* leds: gpio1_19 */
"P9.31", /* mcasp0: mcasp0_aclkx */
"P9.29", /* mcasp0: mcasp0_fsx */
"P9.28", /* mcasp0: mcasp0_axr2 */
"P9.25", /* mcasp0: mcasp0_ahclkx */
/* the hardware ip uses */
"gpio1_18", "gpio1_19",
"mcasp0";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
bone_audio_cape_led_pins: pinmux_bone_audio_cape_led_pins {
pinctrl-single,pins = <
0x48 0x07 /* gpmc_a2.gpio1_18, OUTPUT | MODE7 */
0x4c 0x07 /* gpmc_a3.gpio1_19, OUTPUT | MODE7 */
>;
};
bone_audio_cape_audio_pins: pinmux_bone_audio_cape_audio_pins {
pinctrl-single,pins = <
0x190 0x20 /* mcasp0_aclkx.mcasp0_aclkx, INPUT | MODE0 */
0x194 0x20 /* mcasp0_fsx.mcasp0_fsx, INPUT | MODE0 */
0x19c 0x22 /* mcasp0_ahclkr.mcasp0_axr2, INPUT | MODE2 */
0x1ac 0x22 /* mcasp0_ahclkx.mcasp0_axr3, INPUT | MODE2 */
>;
};
};
};
fragment@1 {
target = <&ocp>;
__overlay__ {
/* avoid stupid warning */
#address-cells = <1>;
#size-cells = <1>;
gpio-leds-cape-audio {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&bone_audio_cape_led_pins>;
audio-led0 {
label = "audio:green:usr0";
gpios = <&gpio2 18 0>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
audio-led1 {
label = "audio:green:usr1";
gpios = <&gpio2 19 0>;
linux,default-trigger = "mmc0";
default-state = "off";
};
};
};
};
fragment@2 {
target = <&mcasp0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&bone_audio_cape_audio_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
num-serializer = <16>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 2 1
0 0 0 0
0 0 0 0
0 0 0 0
>;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
};
};
最佳答案
您可以使编解码器驱动程序与设备树兼容,并进行加载,只需在dts文件中为编解码器添加一个节点即可。
根据您的情况,将此部分添加到编解码器驱动程序中:
.
.
.
#ifdef CONFIG_OF
static const struct of_device_id wm8782_dt_ids[] = {
{ .compatible = "ti,wm8782", },
{ }
};
MODULE_DEVICE_TABLE(of, wm8782_dt_ids);
#endif
static struct platform_driver wm8782_codec_driver = {
.driver = {
.name = "wm8782",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(wm8782_dt_ids),
},
.
.
.
wm8782: wm8782 {
wm8782 = "ti,wm8782";
};
关于audio - BeagleBoneBlack-在ALSA上注册I2S ADC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21611369/
我有一个小型WordPress网站。我做了很多音频工作,并且试图在WordPress的博客条目中发布HTML5音频剪辑。由于某种原因,它不起作用。它可能与我在WordPress网站上使用的样式有关,但
我在让 html5 标签与 Web Audio API .createMediaElementSource() 方法配合使用时遇到问题。请参阅下面的 jsFiddle/代码。任何想法这里出了什么问题将
我尝试安装ffmpeg $ brew install ffmpeg 并运行 ffmpeg $ ffmpeg -i audio.m4a -ar 8000 -ab 12.2k audio.amr 我收到以
我已使用Web Audio API中的getByteFrequencyData方法使用了来自Analyzer节点的FFT数据来创建频谱可视化器,如下所示: 在这种情况下,我有256个数据箱。这个数字到
Google VR刚刚为wwise制作了一个VR插件: https://developers.google.com/vr/audio/wwise-getting-started https://git
如何将新记录追加到现有记录中的选定位置或特定位置? 例如,有一个5秒的录制,我想再次录制,但是将此录制追加到先前录制的特定位置,说出来:在3秒钟的录制长度之后追加此录制。 最佳答案 您可以使用getC
我们基于 Raspberry Pi 和 omxplayer 构建简单的网络控制视频播放器。我们遇到的问题是任何使用 ffmpeg 转码的文件都有音频不同步。在 iPad 上制作并直接上传到 Pi 的视
我正在尝试了解Web Audio API的引入对基于Web的游戏的开发意味着什么。 Flash游戏当然可以执行一些相当高级的音频处理,对于简单的游戏,音频元素也许就足够了。但是Web Audio AP
我已经在如何用简单的音频引擎循环播放声音效果方面进行了广泛的搜索,但是在cocos2d论坛上除了hello with looping sfx之外,它并没有取得太大进展,因为它存在多个问题。如何在Sim
我的任务是打开一个扩展名为 mka 的现有音频文件(Matroska 容器)并提取原始音频数据。 This示例仅显示了从 mp2 文件中提取原始数据的示例。我不知道如何使用 mka 容器执行此操作。我
我是Lync 2013 SDK的新手(现在已经使用了几周),并且能够弄清除此以外的大部分东西…… 当我加入 session 时(使用ConversationManager.JoinConference
我好奇。如何实现有史以来最简单的音频引擎?我有一些类似使用默认音频设备的音频数据流的想法。玩了很多 RtAudio,我认为如果可以放弃一些功能,这是可能的。有人知道从哪里开始吗? 最佳答案 我会这样做
我一直在玩网络音频API。 我正在使用getByteFrequencyData来显示频带的分贝数据,但是我想更改显示频带的整个范围,因为现在重要的音频都被压缩为一对频带。 有关如何执行此操作的任何想法
我想在音频 session 以NAudio开始和结束时接收回调。以下代码正在运行: private void SetupMediaSessionCallbacks() {
我可以用trackPosition,offset以某种方式记录并输出到WAV。当在浏览器中播放时,它工作正常,我只想输出到WAV文件。 for (var i = 0; i 0) {
在哪种情况下,我们可以不将Google Resonance Audio SDK与耳机配合使用,而应将其与真实的扬声器配合使用(例如,安装在360°的音圈设置中)? 还是所有算法都不适用于真实的扬声器输
AudioPannerNode是一个处理节点,用于在三维空间中定位/空间化传入的音频流。有没有一种方法可以将其用于常规LR平移,请记住它使用3D笛卡尔坐标系与侦听器结合使用,该侦听器的位置和方向与平移
我有一个带有两个源的音频对象,分别为M4A和OGG格式。 代码如下: 然后,我可以调用document.getElementById('audio1')。play()并开始播放。 它适用于所有
我正在尝试构建一个允许将时间/节奏(可能是音高)输入到 Web 音频振荡器节点的界面。实际上创建了一个“步进音序器”。 为 Web Audio API 振荡器节点触发预定 NoteOn 的最佳方式是什
是否可以使用 Core Audio 以亚毫秒级延迟播放声音? 我尝试过使用具有不同大小和缓冲区数量的 AudioQueues,也尝试过使用 AudioUnits,但我一直无法将延迟降低到 30 毫秒以
我是一名优秀的程序员,十分优秀!