我发现似乎主线kernel中的suniv.dtsi设备树中似乎并没有codec方面的定义,也不知道驱动代码有没有?不知道有没有哪个大神搞过这个?
以下由 @哇酷小二 2020-05-11 更新
----------------------------------
13# @wammaw1314 提交f1c100s主线linux声卡patch
31# @pajoke 声卡输出(喇叭)验证成功, 输入(麦克风)未验证, 内核:5.6.11
相关链接:
1. 本站网友@阿黄 提供的 f1c100s 主线linux rtp 驱动补丁
2. 本站网友@shaoxi 提供的 f1c100s 主线linux spi nand补丁
离线
同求
离线
同求
离线
有裸机下的声卡驱动
离线
有裸机下的声卡驱动
厚颜无耻问下,方便分享吗?
最近编辑记录 超级萌新 (2019-03-21 23:21:08)
离线
看来大家都在等现成的了。
离线
参考下晕哥在我的荔枝派音频帖子底下发的司徒的sdk和官方3.10bsp,里面有设备树和驱动,我也在搞,没搞定呢,求大腿
离线
最近还研究了一下f1c100s的音频,我的系统是4.15,这个是不是代表声卡驱动已经安装了。
如果4.15有驱动那之后的版本应该带了驱动,只是没有安装alsa库。你可以这样试下有没有声音cat /dev/dsp > /dev/dsp,如果有沙沙声代表驱动已经安装。
离线
那个驱动不行, 没有声音输出。
离线
最近还研究了一下f1c100s的音频,我的系统是4.15,这个是不是代表声卡驱动已经安装了。
https://whycan.cn/files/members/1315/none.png
如果4.15有驱动那之后的版本应该带了驱动,只是没有安装alsa库。你可以这样试下有没有声音cat /dev/dsp > /dev/dsp,如果有沙沙声代表驱动已经安装。
4.15驱动识别的是loopback声卡,应该不是有效的驱动
离线
声音搞定了没有,大神们?
离线
同求主线声卡驱动:D ,期待大神分享
离线
主线Linux 4.19 f1c100s 声卡支持:
suniv-dma.c 和 suniv-codec.c 是基于 原先的sun4i-dma.c 和 sun4i-codec.c 新增和修改过来的,是外网Mesih Kilinc大神提供到Linux的patch,但未合并;
我重新加了文件,整个修改和新增的包如下,具体修改代码,可以比较下两者源码。
离线
主线Linux 4.19 f1c100s 声卡支持:
suniv-dma.c 和 suniv-codec.c 是基于 原先的sun4i-dma.c 和 sun4i-codec.c 新增和修改过来的,是外网Mesih Kilinc大神提供到Linux的patch,但未合并;
我重新加了文件,整个修改和新增的包如下,具体修改代码,可以比较下两者源码。
感谢分享。要是搞定声卡,我一定唱一曲: 等了好久终于等到今天, 梦了好久终于把梦实现。
离线
补充1:
Linux 4.19 f1c100s 声卡 suniv.dtsi设备树修改:
suniv.dtsi 添加:
dma: dma-controller@1c02000 {
compatible = "allwinner,suniv-dma";
reg = <0x01c02000 0x1000>;
interrupts = <18>;
clocks = <&ccu CLK_BUS_DMA>;
resets = <&ccu RST_BUS_DMA>;
#dma-cells = <2>;
};
codec: codec@1c23c00 {
compatible = "allwinner,suniv-codec";
reg = <0x01c23c00 0x400>;
interrupts = <21>;
clocks = <&ccu CLK_BUS_CODEC>,
<&ccu CLK_CODEC>;
clock-names = "apb", "codec";
resets = <&ccu RST_BUS_CODEC>;
dmas = <&dma 0 12>, <&dma 0 12>;
dma-names = "rx", "tx";
status = "disabled";
};
离线
补充2:
Linux 4.19 f1c100s 声卡 suniv-f1c100s-licheepi-nano.dts 设备树修改:
suniv-f1c100s-licheepi-nano.dts 添加:
&codec {
allwinner,audio-routing =
"Headphone", "HP",
"Headphone", "HPCOM",
"MIC", "Mic";
status = "okay";
};
离线
太棒了, 加上这个 NES 模拟器, 无敌了: https://whycan.cn/t_3535.html
离线
这样一来,f1c声卡的坑也填上了。
离线
补充2:
Linux 4.19 f1c100s 声卡 suniv-f1c100s-licheepi-nano.dts 设备树修改:
suniv-f1c100s-licheepi-nano.dts 添加:&codec { allwinner,audio-routing = "Headphone", "HP", "Headphone", "HPCOM", "MIC", "Mic"; status = "okay"; };
大神,出声音了吗?哈
离线
补充2:
Linux 4.19 f1c100s 声卡 suniv-f1c100s-licheepi-nano.dts 设备树修改:
suniv-f1c100s-licheepi-nano.dts 添加:&codec { allwinner,audio-routing = "Headphone", "HP", "Headphone", "HPCOM", "MIC", "Mic"; status = "okay"; };
大神,我按照patch修改后出现了codec驱动,但是实际播放时只有电流杂音。请问您有测试成功吗?
离线
我试了下,输入是有声音的,输出我没有喇叭测不了,估计问题不大,毕竟MIC都能用
离线
学习一下,打算好好搞一下f1c100s的声卡支持,目前就搞定了USB音频和VLC的支持
离线
哪位大神搞过I2S的支持么,刚下手不知道驱动有没有支持
离线
学习一下,打算好好搞一下f1c100s的声卡支持,目前就搞定了USB音频和VLC的支持
usb音频方便分享一下吗? 我按照论坛的帖子弄好了usb的支持,但插声卡没反应...
离线
usb音频方便分享一下吗? 我按照论坛的帖子弄好了usb的支持,但插声卡没反应...
用的是 https://whycan.cn/t_3087.html 这个内核么,内核配置把sound里面的USB audio下的midi打开就行了,然后看下ls /dev/snd下应该会有声卡,测试需要alsa库和alsa工具
离线
编译错误:
结构体成员名不一样,这是为什么? 是内核不一样?还是Mesih Kilinc书写错误?
发现这个结构体没有成员.use_pmdown_time
static const struct snd_soc_component_driver sun8i_a23_codec_codec = {
.controls = sun8i_a23_codec_codec_controls,
.num_controls = ARRAY_SIZE(sun8i_a23_codec_codec_controls),
.dapm_widgets = sun8i_a23_codec_codec_widgets,
.num_dapm_widgets = ARRAY_SIZE(sun8i_a23_codec_codec_widgets),
.idle_bias_on = 1,
.use_pmdown_time = 1,
.endianness = 1,
.non_legacy_dai_naming = 1,
};
我的内核里结构体声明成员 是 pmdown_time:
/* component interface */
struct snd_soc_component_driver {
const char *name;
/* Default control and setup, added after probe() is run */
const struct snd_kcontrol_new *controls;
unsigned int num_controls;
const struct snd_soc_dapm_widget *dapm_widgets;
unsigned int num_dapm_widgets;
const struct snd_soc_dapm_route *dapm_routes;
unsigned int num_dapm_routes;
int (*probe)(struct snd_soc_component *);
void (*remove)(struct snd_soc_component *);
int (*suspend)(struct snd_soc_component *);
int (*resume)(struct snd_soc_component *);
/* pcm creation and destruction */
int (*pcm_new)(struct snd_soc_pcm_runtime *);
void (*pcm_free)(struct snd_pcm *);
/* component wide operations */
int (*set_sysclk)(struct snd_soc_component *component,
int clk_id, int source, unsigned int freq, int dir);
int (*set_pll)(struct snd_soc_component *component, int pll_id,
int source, unsigned int freq_in, unsigned int freq_out);
int (*set_jack)(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *data);
/* DT */
int (*of_xlate_dai_name)(struct snd_soc_component *component,
struct of_phandle_args *args,
const char **dai_name);
int (*of_xlate_dai_id)(struct snd_soc_component *comment,
struct device_node *endpoint);
void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
int subseq);
int (*stream_event)(struct snd_soc_component *, int event);
int (*set_bias_level)(struct snd_soc_component *component,
enum snd_soc_bias_level level);
const struct snd_pcm_ops *ops;
const struct snd_compr_ops *compr_ops;
/* probe ordering - for components with runtime dependencies */
int probe_order;
int remove_order;
/* bits */
unsigned int idle_bias_on:1;
unsigned int suspend_bias_off:1;
unsigned int pmdown_time:1; /* care pmdown_time at stop */
unsigned int endianness:1;
unsigned int non_legacy_dai_naming:1;
};
sound/soc/sunxi/suniv-codec.c:862:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
.use_pmdown_time = 1,
^~~~~~~~~~~~~~~
pmdown_time
sound/soc/sunxi/suniv-codec.c:1170:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
.use_pmdown_time = 1,
^~~~~~~~~~~~~~~
pmdown_time
sound/soc/sunxi/suniv-codec.c:1198:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
.use_pmdown_time = 1,
^~~~~~~~~~~~~~~
pmdown_time
sound/soc/sunxi/suniv-codec.c:1427:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
.use_pmdown_time = 1,
^~~~~~~~~~~~~~~
pmdown_time
离线
我试了下,输入是有声音的,输出我没有喇叭测不了,估计问题不大,毕竟MIC都能用
你用的mic是哪个mic?
我直接使用arecord的话会IO错误
错误如下
# arecord -Dhw:0,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: pcm_read:2151: read error: Input/output error
#
离线
持续关注中,用music-box配合这个声卡听歌哈
离线
终于等到声卡驱动了,多谢!
离线
你用的mic是哪个mic?
我直接使用arecord的话会IO错误
错误如下# arecord -Dhw:0,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: pcm_read:2151: read error: Input/output error #
mixer配置没有哦,我在没选择之前都是直接卡死
离线
13楼的音频驱动,音频输出已验证,可以使用。
音频输入没有验证。
内核:5.6.11
离线
13楼的音频驱动,音频输出已验证,可以使用。
音频输入没有验证。
内核:5.6.11
感谢验证和反馈信息, 同时也感谢提交 patch的朋友@wammaw1314
离线
13楼的音频驱动,音频输出已验证,可以使用。
音频输入没有验证。
内核:5.6.11
方便提供一个固件么?测试一下手飞的硬件
离线
有大神搞定了4.14内核的声卡吗?我试了一下只有电流声
离线
楼主,请问主线linux4.14是否可以使用?
离线
an image with both USB support and the audio patches would be really great
离线
声卡输出验证成功,可以播放歌曲,补充一点就是打上#13楼的补丁,修改设备树之后,要检查下Device Drivers->Sound card support->Advanced Linux Sound Architecture->ALSA for audio support->Allwinner SoC Audio support->Allwinner F1C100s Codec support有没有勾选
另外有个问题就是每次播放完之后都会有爆音出现,不知道是哪里引起的。。。
离线
5.20内核,加上去出了这个问题,arecord: pcm_read:2122: read error: I/O error,难道io需要配置下?4.15内核也是一样的问题。
最近编辑记录 woaicaiwenbin (2020-06-22 15:50:17)
离线
声卡输出验证成功,可以播放歌曲,补充一点就是打上#13楼的补丁,修改设备树之后,要检查下Device Drivers->Sound card support->Advanced Linux Sound Architecture->ALSA for audio support->Allwinner SoC Audio support->Allwinner F1C100s Codec support有没有勾选
https://whycan.cn/files/members/2474/1441978-20200621134730715-1005027566_20200622-0958.png
另外有个问题就是每次播放完之后都会有爆音出现,不知道是哪里引起的。。。
#37 还有DMA选项需要打开吧
离线
请问解决了吗?
你用的mic是哪个mic?
我直接使用arecord的话会IO错误
错误如下# arecord -Dhw:0,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: pcm_read:2151: read error: Input/output error #
离线
声卡输出验证成功,可以播放歌曲,补充一点就是打上#13楼的补丁,修改设备树之后,要检查下Device Drivers->Sound card support->Advanced Linux Sound Architecture->ALSA for audio support->Allwinner SoC Audio support->Allwinner F1C100s Codec support有没有勾选
https://whycan.cn/files/members/2474/1441978-20200621134730715-1005027566_20200622-0958.png
另外有个问题就是每次播放完之后都会有爆音出现,不知道是哪里引起的。。。
打上补丁,修改设备树之后,ALSA for audio support-> 根本没有 Allwinner SoC Audio support选项,不知道哪里出了问题
离线
找了半天终于找到解决办法了,多谢前辈
离线
分享一下
找了半天终于找到解决办法了,多谢前辈
离线
内核版本差别好大,用主线kernel4.14的编译无法通过,查看得知是版本不兼容。请问一下针对主线kernel4.14的sound部分需做什么修改呢?还是只能切换到高版本内核了
离线
你用的mic是哪个mic?
我直接使用arecord的话会IO错误
错误如下# arecord -Dhw:0,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: pcm_read:2151: read error: Input/output error #
请问一下,这个问题解决了吗
离线
裸机跑AUDIOCODEC 声音播放非常快,是怎么回事,AC PLL时钟设置是24MHz。
离线
有裸机下的声卡驱动
声音播放很快,有解么?
离线
shaoxi2010 说:我试了下,输入是有声音的,输出我没有喇叭测不了,估计问题不大,毕竟MIC都能用
你用的mic是哪个mic?
我直接使用arecord的话会IO错误
错误如下# arecord -Dhw:0,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: pcm_read:2151: read error: Input/output error #
我的也是这个问题,这个问题解决了吗?
离线
声卡输入这个问题有网友解决了呀,思路在这里
https://whycan.com/t_5301.html
我的步骤:
1、先打上#13楼的补丁,应用CODEC补丁后,启动日志中应该出现添加的声卡
cat /proc/asound/cards
2、安装alsa-utils
3、设置默认声卡
vim /etc/asound.conf
defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1
4、打开录音Capture,amixer -c 1 cset numid=14 on
也可以alsamixer后,在图形界面里面按F4,找到ADC Mixer Mic,按空格键开启,我小白啊,愣是不知道咋打开,然后键盘上一个一个按键试出来的,瓜兮兮的不知道看help!
5、设置好mic的值和DAC,不然录的声音惨不忍睹
最后附上我的alsa配置
state.Loopback {
control.1 {
iface PCM
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.2 {
iface PCM
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.3 {
iface PCM
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.4 {
iface PCM
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.5 {
iface PCM
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.6 {
iface PCM
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.7 {
iface PCM
subdevice 1
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.8 {
iface PCM
subdevice 1
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.9 {
iface PCM
subdevice 1
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.10 {
iface PCM
subdevice 1
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.11 {
iface PCM
subdevice 1
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.12 {
iface PCM
subdevice 1
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.13 {
iface PCM
subdevice 2
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.14 {
iface PCM
subdevice 2
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.15 {
iface PCM
subdevice 2
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.16 {
iface PCM
subdevice 2
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.17 {
iface PCM
subdevice 2
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.18 {
iface PCM
subdevice 2
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.19 {
iface PCM
subdevice 3
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.20 {
iface PCM
subdevice 3
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.21 {
iface PCM
subdevice 3
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.22 {
iface PCM
subdevice 3
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.23 {
iface PCM
subdevice 3
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.24 {
iface PCM
subdevice 3
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.25 {
iface PCM
subdevice 4
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.26 {
iface PCM
subdevice 4
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.27 {
iface PCM
subdevice 4
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.28 {
iface PCM
subdevice 4
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.29 {
iface PCM
subdevice 4
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.30 {
iface PCM
subdevice 4
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.31 {
iface PCM
subdevice 5
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.32 {
iface PCM
subdevice 5
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.33 {
iface PCM
subdevice 5
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.34 {
iface PCM
subdevice 5
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.35 {
iface PCM
subdevice 5
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.36 {
iface PCM
subdevice 5
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.37 {
iface PCM
subdevice 6
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.38 {
iface PCM
subdevice 6
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.39 {
iface PCM
subdevice 6
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.40 {
iface PCM
subdevice 6
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.41 {
iface PCM
subdevice 6
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.42 {
iface PCM
subdevice 6
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.43 {
iface PCM
subdevice 7
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.44 {
iface PCM
subdevice 7
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.45 {
iface PCM
subdevice 7
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.46 {
iface PCM
subdevice 7
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.47 {
iface PCM
subdevice 7
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.48 {
iface PCM
subdevice 7
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.49 {
iface PCM
device 1
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.50 {
iface PCM
device 1
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.51 {
iface PCM
device 1
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.52 {
iface PCM
device 1
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.53 {
iface PCM
device 1
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.54 {
iface PCM
device 1
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.55 {
iface PCM
device 1
subdevice 1
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.56 {
iface PCM
device 1
subdevice 1
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.57 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.58 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.59 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.60 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.61 {
iface PCM
device 1
subdevice 2
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.62 {
iface PCM
device 1
subdevice 2
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.63 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.64 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.65 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.66 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.67 {
iface PCM
device 1
subdevice 3
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.68 {
iface PCM
device 1
subdevice 3
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.69 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.70 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.71 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.72 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.73 {
iface PCM
device 1
subdevice 4
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.74 {
iface PCM
device 1
subdevice 4
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.75 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.76 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.77 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.78 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.79 {
iface PCM
device 1
subdevice 5
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.80 {
iface PCM
device 1
subdevice 5
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.81 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.82 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.83 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.84 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.85 {
iface PCM
device 1
subdevice 6
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.86 {
iface PCM
device 1
subdevice 6
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.87 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.88 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.89 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.90 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.91 {
iface PCM
device 1
subdevice 7
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.92 {
iface PCM
device 1
subdevice 7
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.93 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.94 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.95 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.96 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
}
state.Codec {
control.1 {
iface MIXER
name 'DAC Playback Volume'
value 55
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -7308
dbmax 0
dbvalue.0 -928
}
}
control.2 {
iface MIXER
name 'Headphone Playback Volume'
value 54
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -9999999
dbmax 0
dbvalue.0 -900
}
}
control.3 {
iface MIXER
name 'Headphone Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.4 {
iface MIXER
name 'Line In Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.5 {
iface MIXER
name 'FM In Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.6 {
iface MIXER
name 'Mic In Playback Volume'
value 7
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 600
}
}
control.7 {
iface MIXER
name 'Mic Boost Volume'
value 7
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin 0
dbmax 4200
dbvalue.0 4200
}
}
control.8 {
iface MIXER
name 'ADC Capture Volume'
value 3
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 0
}
}
control.9 {
iface MIXER
name 'ADC Mixer Right Out Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.10 {
iface MIXER
name 'ADC Mixer Left Out Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.11 {
iface MIXER
name 'ADC Mixer Line In Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.12 {
iface MIXER
name 'ADC Mixer Right FM In Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.13 {
iface MIXER
name 'ADC Mixer Left FM In Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.14 {
iface MIXER
name 'ADC Mixer Mic Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.15 {
iface MIXER
name 'Left Mixer Right DAC Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.16 {
iface MIXER
name 'Left Mixer Left DAC Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.17 {
iface MIXER
name 'Left Mixer FM In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.18 {
iface MIXER
name 'Left Mixer Line In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.19 {
iface MIXER
name 'Left Mixer Mic In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.20 {
iface MIXER
name 'Right Mixer Left DAC Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.21 {
iface MIXER
name 'Right Mixer Right DAC Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.22 {
iface MIXER
name 'Right Mixer FM In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.23 {
iface MIXER
name 'Right Mixer Line In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.24 {
iface MIXER
name 'Right Mixer Mic In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.25 {
iface MIXER
name 'Headphone Source Playback Route'
value.0 Mixer
value.1 Mixer
comment {
access 'read write'
type ENUMERATED
count 2
item.0 DAC
item.1 Mixer
}
}
}
把这个放在/var/lib/alsa/下面
然后恢复ALSA配置
alsactl restore -f /var/lib/alsa/asound.state
~~~
最最后,有人知道f1c200s安装pyaudio,用它录音之后再播放,发现音频文件时间不对,速度快了好多,跟鬼畜一样,用arecord是一点问题没有…
最最最后,f1c200s跑kocker有没有可能,我安装了docker.io,docker服务启动不起来 ……
离线
主线Linux 4.19 f1c100s 声卡支持:
suniv-dma.c 和 suniv-codec.c 是基于 原先的sun4i-dma.c 和 sun4i-codec.c 新增和修改过来的,是外网Mesih Kilinc大神提供到Linux的patch,但未合并;
我重新加了文件,整个修改和新增的包如下,具体修改代码,可以比较下两者源码。
这个文件怎么使用,我用主线5.2的内核调不出codec的驱动
离线